Page MenuHomeFreeBSD

The console name has to match the /dev name for /dev/console to work.
AbandonedPublic

Authored by imp on Feb 23 2018, 11:30 PM.
Tags
None
Referenced Files
F80141926: D14494.diff
Thu, Mar 28, 12:24 PM
Unknown Object (File)
Jan 30 2024, 1:57 AM
Unknown Object (File)
Jan 29 2024, 10:26 PM
Unknown Object (File)
Jan 29 2024, 10:23 PM
Unknown Object (File)
Dec 20 2023, 3:32 AM
Unknown Object (File)
Apr 7 2023, 4:20 PM
Unknown Object (File)
Mar 21 2023, 11:50 AM
Unknown Object (File)
Jan 12 2023, 9:19 PM
Subscribers
None

Details

Reviewers
ed
marcel
jhb
Summary

This wasn't happening on serial consoles, so set the console name to
ttyuX. This requires that we track the unit number as well. Provide a
mechanism to specify it as part of the hw.uart.console env
var. un=X. We also parse the 'legacy' hints flags on x86 to get this.
With these changes my serial console on /dev/ttyu2 is back in
business.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 15239
Build 15303: arc lint + arc unit

Event Timeline

OK. This was caused by loading uart int the boot loader and having it in the kernel. Abandoning.

This is opposite the direction taken already. The low-level console is defined in terms of hardware resources only. The uart(4) driver will map the low-level console to the newbus device during bus enumeration. The unit number is not a hardware resource. It's a newbus device property.

As such, the changes are architecturally wrong. Instead, we need support for setting or changing the name in the consider structure during bus enumeration. If that basic support is already there (say, by virtue of the kernel not using the name until after bus enumeration) then the fix is to set the name during bus enumeration when we have a device that maps the the low-level console.

This is opposite the direction taken already. The low-level console is defined in terms of hardware resources only. The uart(4) driver will map the low-level console to the newbus device during bus enumeration. The unit number is not a hardware resource. It's a newbus device property.

As such, the changes are architecturally wrong. Instead, we need support for setting or changing the name in the consider structure during bus enumeration. If that basic support is already there (say, by virtue of the kernel not using the name until after bus enumeration) then the fix is to set the name during bus enumeration when we have a device that maps the the low-level console.

Yes. I agree. I misdiagnosed this because I had uart_load=yes in my loader.conf, and that breaks things even though it is kinda unused (but only for device, the console stuff is loaded a second time which is too late to be used as a console, but it interfers just enough to hoze things)