Page MenuHomeFreeBSD

ACPI SPCR: handle BaudRate=0
ClosedPublic

Authored by val_packett.cool on Apr 14 2019, 10:20 PM.
Tags
Referenced Files
Unknown Object (File)
Thu, Mar 14, 6:25 AM
Unknown Object (File)
Mon, Mar 11, 4:14 PM
Unknown Object (File)
Sat, Mar 9, 8:47 PM
Unknown Object (File)
Sat, Mar 9, 8:47 PM
Unknown Object (File)
Sat, Mar 9, 8:46 PM
Unknown Object (File)
Sat, Mar 9, 8:33 PM
Unknown Object (File)
Sat, Mar 9, 3:38 PM
Unknown Object (File)
Thu, Mar 7, 3:43 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 Skipped
Unit
Tests Skipped

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.