Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 05 Jan 2026 20:42:54 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 292206] loader generates invalid hw.uart.console value when serial console redirection is disabled, preventing system from booting
Message-ID:  <bug-292206-227@https.bugs.freebsd.org/bugzilla/>

index | next in thread | raw e-mail

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

            Bug ID: 292206
           Summary: loader generates invalid hw.uart.console value when
                    serial console redirection is disabled, preventing
                    system from booting
           Product: Base System
           Version: 15.0-RELEASE
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: misc
          Assignee: bugs@FreeBSD.org
          Reporter: jarmo.jaakkola@roskakori.fi

FreeBSD 15.0 fails to boot with UEFI on a Dell PowerEdge T310 when serial
console redirection is off.  EFI framebuffer information is printed and the
system them reboots before any kernel messages are printed.

When serial console redirection is off on this system, loader sets
hw.uart.console to

    OK show hw.uart.console
    db:8,dt:ns8250,mm:0,rs:-4,rw:1,pa:none,br:0,xo=0

Notice mm of 0 and rs of -4.  This value causes system to reboot.  For
comparison, when serial console redirection to COM1 is on, the value is

    OK show hw.uart.console
    db:8,dt:ns8250,io:0x3f8,pa:none,br=115200,xo=0

Unsetting the invalid value or setting it to a valid one (e.g. COM1 one) allows
the system to boot.

The problem is that check_acpi_spcr() fails to account for an ACPI SPCR entry
for disabled serial console redirection, i.e. one where the "Base Address"
field (SerialPort in the struct) is zero.  The invalid value is set if the
table of disabled redircetion presents a non-PCI device (vendor ID and device
ID are 0xffff).

https://learn.microsoft.com/en-us/windows-hardware/drivers/bringup/serial-port-console-redirection-table

Here is what ACPI SPCR contains on the system when serial console redirection
is off:

    # acpidump -T SPCR
    /*
      SPCR: Length=80, Revision=1, Checksum=235,
            OEMID=DELL, OEM Table ID=PE_SC3, OEM Revision=0x1,
            Creator ID=DELL, Creator Revision=0x1
            InterfaceType=0 (Fully 16550-compatible)
            SerialPort=0x0000000000000000:0[0] (Memory)
            InterruptType=0x3 (PC/AT IRQ,I/O APIC)
            PcInterrupt=4 (Valid)
            Interrupt=4
            BaudRate=0 (0)
            Parity=0
            StopBits=1
            FlowControl=2
            TerminalType=1 (Extended VT100)
            PciDeviceId=0xffff
            PciVendorId=0xffff
            PciBus=0
            PciDevice=0
            PciFunction=0
            PciFlags=0
            PciSegment=0
     */

Note that on some systems disabling console redirection removes the ACPI SPCR
table instead of presenting a disabled one (e.g. Lenovo ThinkStation P500).

I have prepared a patch, for which I will shortly create a GitHub pull request
and link it here.

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

home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-292206-227>