[Bug 225512] continued changes to sio->uart and console other than com1 requires yet another documentation change...

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sun Jan 28 23:03:02 UTC 2018


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=225512

            Bug ID: 225512
           Summary: continued changes to sio->uart and console other than
                    com1 requires yet another documentation change...
           Product: Documentation
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Documentation
          Assignee: freebsd-doc at FreeBSD.org
          Reporter: dgilbert at eicat.ca

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");
                break;
        case UART_DEV_DBGPORT:
                cp = kern_getenv("hw.uart.dbgport");
                break;
        default:
                cp = NULL;
                break;
        }

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

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-doc mailing list