Page MenuHomeFreeBSD

ACPI SPCR: handle BaudRate=0

Authored by on Apr 14 2019, 10:20 PM.
Referenced Files
Unknown Object (File)
Jan 12 2024, 3:44 PM
Unknown Object (File)
Dec 13 2023, 8:15 AM
Unknown Object (File)
Nov 19 2023, 4:45 PM
Unknown Object (File)
Nov 18 2023, 2:06 PM
Unknown Object (File)
Sep 9 2023, 2:47 PM
Unknown Object (File)
Sep 1 2023, 5:33 AM
Unknown Object (File)
Sep 1 2023, 5:02 AM
Unknown Object (File)
Sep 1 2023, 5:02 AM



The SPCR saga continues… (D19507, D19896)

Really fun commit in EDK2 for the Marvell Armada8k (e.g. MACCHIATObin):

The mcbin (and likely others) have a nonstandard uart clock. This means that the earlycon programming will incorrectly set the baud rate if it is specified. The way around this is to tell the kernel to continue using the preprogrammed baud rate. This is done by setting the baud to 0.

Our drivers (uart_dev_ns8250) do respect zero, but SPCR would error. Let's not error.

(Also, looks like Marvell has made a mess with access widths *on an 8250/16550*… W T F)

Diff Detail

rS FreeBSD src repository - subversion
Lint Not Applicable
Tests Not Applicable

Event Timeline


FYI, I am checking edk2-platforms patch with its author, however this particular patch is IMO fine to land.

On the other hand I think we currently do not support HISI0031 _HID in the FreeBSD. We cannot hardcode acpi_compat_data for it, as only in mainline edk2-platforms, there are 3 platforms, that use different clock-frequency/reg-shift/reg-io-width values. I have a dirty patch adding support for it in sys/dev/uart/uart_dev_snps.c. If you have no objections, and I find time for it, I'll prepare a cleaner version for submission.

Best regards,

About the WTF part of your comment - I've just submitted restoring 32-bit RegisterBitWidth, so that part of controversy should be gone:,,,20,0,0,0::recentpostdate%2Fsticky,,,20,2,0,31189274

This revision is now accepted and ready to land.Apr 24 2019, 10:48 PM
This revision was automatically updated to reflect the committed changes.