Page MenuHomeFreeBSD

ACPI SPCR: handle BaudRate=0
ClosedPublic

Authored by greg_unrelenting.technology on Apr 14 2019, 10:20 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
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

mw added a subscriber: mw.Apr 15 2019, 6:52 AM

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

mw added a comment.Apr 15 2019, 3:25 PM

@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

bcran accepted this revision as: bcran.Apr 24 2019, 10:48 PM
This revision is now accepted and ready to land.Apr 24 2019, 10:48 PM
imp accepted this revision.Apr 25 2019, 12:39 AM
This revision was automatically updated to reflect the committed changes.