Page MenuHomeFreeBSD

ACPI SPCR: handle BaudRate=0
ClosedPublic

Authored by val_packett.cool on Apr 14 2019, 10:20 PM.
Tags
Referenced Files
F103492117: D19914.diff
Mon, Nov 25, 5:16 PM
Unknown Object (File)
Sun, Nov 24, 10:20 AM
Unknown Object (File)
Sun, Nov 24, 10:20 AM
Unknown Object (File)
Sat, Nov 23, 11:55 AM
Unknown Object (File)
Fri, Nov 22, 5:54 AM
Unknown Object (File)
Wed, Nov 20, 9:07 AM
Unknown Object (File)
Fri, Nov 15, 12:07 PM
Unknown Object (File)
Oct 16 2024, 7:06 PM

Details

Summary

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

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

Event Timeline

Hi @greg_unrelenting.technology

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,
Marcin

@greg_unrelenting.technology

About the WTF part of your comment - I've just submitted restoring 32-bit RegisterBitWidth, so that part of controversy should be gone:
https://edk2.groups.io/g/devel/topic/edk2_platforms_patch/31189274?p=,,,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.