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.

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 OK
Unit
No Unit Test Coverage
Build Status
Buildable 15239
Build 15303: arc lint + arc unit

Event Timeline

imp created this revision.Feb 23 2018, 11:30 PM
imp added a reviewer: jhb.
imp abandoned this revision.Feb 23 2018, 11:48 PM

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.

imp added a comment.Feb 24 2018, 12:14 AM

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)