Page MenuHomeFreeBSD

Support multiple OPAL consoles, and don't crash if uart is not stdout
ClosedPublic

Authored by jhibbits on Jun 29 2018, 7:15 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Sep 24, 2:24 AM
Unknown Object (File)
Fri, Sep 18, 4:59 AM
Unknown Object (File)
Wed, Sep 2, 10:04 AM
Unknown Object (File)
Aug 29 2026, 3:21 PM
Unknown Object (File)
Aug 24 2026, 7:54 AM
Unknown Object (File)
Aug 17 2026, 4:35 AM
Unknown Object (File)
Aug 15 2026, 6:49 PM
Unknown Object (File)
Aug 5 2026, 6:09 AM
Subscribers

Details

Summary

If the chosen console is not the OPAL uart, but OPAL uart devices exist, the console device doesn't attach properly, and faults in the interrupt handler, with a NULL pointer dereference. To fix this, and as a byproduct, also support multiple OPAL consoles, refactor to have the console getc callback use the appropriate softc instead of the global console_sc, which may be NULL in the case of a different device being the console.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 17733
Build 17533: arc lint + arc unit

Event Timeline

Assuming you have tested this and it works, looks great.

This revision is now accepted and ready to land.Jun 29 2018, 7:18 PM
This revision was automatically updated to reflect the committed changes.