Page MenuHomeFreeBSD

loader.efi: Parse SPCR table entry in ACPI tables
ClosedPublic

Authored by imp on Oct 11 2024, 9:55 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jan 9, 8:41 PM
Unknown Object (File)
Tue, Jan 7, 6:50 AM
Unknown Object (File)
Fri, Dec 27, 3:01 PM
Unknown Object (File)
Thu, Dec 26, 4:15 PM
Unknown Object (File)
Thu, Dec 19, 12:18 AM
Unknown Object (File)
Dec 3 2024, 9:27 AM
Unknown Object (File)
Nov 25 2024, 7:20 AM
Unknown Object (File)
Nov 25 2024, 2:37 AM
Subscribers

Details

Summary

If there's a SPCR, then use it to create and pass the right values to
the uart.

Ideally, I'd just pass this all in hw.uart.console, but old kernels
completely ignore the value if there's any extra entries. So I have to
pass newly invented values to replace kernel values in a new kenv
hw.uart.console.extra. so we pass xo=-1 in to calcuate the xo from the
baud rate, and pv and pd for PCI Vendor ID and PCI Device ID of the
serial console to use. Old kernels will ignore this and completely get
this data from parsing SPCR itself. New kernels will dig it our of here
w/o needing to parse it.

We don't support Rev3 or Rev4 SPCR yet. It's too new to be in real
hardware yet.

Sponsored by: Netflix

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

imp requested review of this revision.Oct 11 2024, 9:55 PM
stand/efi/loader/main.c
797–801

Are these ACPI_DBG2_* values?

stand/efi/loader/main.c
797–801

Both DBG2 and SPCR use the same tables, from the InterfaceType spec:
"For Revision 2 or higher: See the Serial Port Subtypes in Table 3 of the DBG2 Specification."
which is where I snagged these values from. I don't know which are active in the wild, but I have observed '1' and '3' on systems I have here.

fix checkstyle9.pl issues

This revision was not accepted when it landed; it landed in state Needs Review.Oct 15 2024, 11:19 AM
This revision was automatically updated to reflect the committed changes.