Bug 225512 - continued changes to sio->uart and console other than com1 requires yet another documentation change...
Summary: continued changes to sio->uart and console other than com1 requires yet anoth...
Status: New
Alias: None
Product: Documentation
Classification: Unclassified
Component: Documentation (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-doc (Nobody)
Depends on:
Reported: 2018-01-28 23:03 UTC by dgilbert
Modified: 2018-01-28 23:03 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description dgilbert 2018-01-28 23:03:00 UTC
The story to here.  In the beginning, the words were "recompile the kernel" and the kernel was good.  No.  I'll stop that now.

Anyways... to use a console other than COM1, you needed to recompile the kernel.  At some point, the PR 169544 applied, that is you set hint.sio.n.flags to determine which port was console.

This didn't work, so in UTSL fashion, I found (in /sys/dev/uart/uart_subr.c:

         * Check the environment variables "hw.uart.console" and
         * "hw.uart.dbgport". These variables, when present, specify
         * which UART port is to be used as serial console or debug
         * port (resp).
        switch (devtype) {
        case UART_DEV_CONSOLE:
                cp = kern_getenv("hw.uart.console");
        case UART_DEV_DBGPORT:
                cp = kern_getenv("hw.uart.dbgport");
                cp = NULL;

meaning that you put "hw.uart.console=1" in /boot/loader.conf and you get COM2.  This seems to default to 0 or COM1 (NULL == 0, for the most part).

I have verified that on 11.1-RELEASE, setting either hint.sio.* or hint.uart.* (because, at least as of 11.1-RELEASE, there are no hint.sio anymore) on AMD64 ... DO NOT WORK.

I have also verified hw.uart.console=1 in /boot/loader.conf does work.

This would all be in reference to the documentation that lives at https://www.freebsd.org/doc/handbook/serialconsole-setup.html