Page MenuHomeFreeBSD

Use ACPI SPCR on x86
ClosedPublic

Authored by cperciva on May 22 2019, 6:11 PM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 15 2024, 5:57 PM
Unknown Object (File)
Jan 14 2024, 7:41 PM
Unknown Object (File)
Dec 22 2023, 10:33 PM
Unknown Object (File)
Dec 22 2023, 1:40 AM
Unknown Object (File)
Dec 13 2023, 8:15 AM
Unknown Object (File)
Nov 24 2023, 8:39 AM
Unknown Object (File)
Nov 12 2023, 9:39 AM
Unknown Object (File)
Oct 25 2023, 8:29 AM
Subscribers

Details

Summary

This takes the SPCR code currently in uart_cpu_arm64.c, moves it into a new uart_cpu_acpi.c, and uses it from both arm64 and x86. (In the process there is some refactoring and I added some comments to help me understand the code.)

Test Plan

Test on EC2 i3.metal instance: Successful.

Test on EC2 A1 instances: Successful.

Test on other arm64 instances... hoping that someone can do this for me.

Diff Detail

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

Event Timeline

Tested on Ampere eMAG (along with WIP I brought over from @manu).

That same kernel did not boot on ThunderX2, but I do not know which specific changes were responsible.

val_packett.cool added inline comments.
sys/dev/uart/uart_cpu_acpi.c
132 ↗(On Diff #57708)

Lost comment about zero.. I guess it's not very valuable but still

This revision is now accepted and ready to land.May 22 2019, 10:58 PM

That same kernel did not boot on ThunderX2

Oh, I tested without options NUMA so this is not surprising. @manu retesting on TX2 w/ NUMA

sys/dev/uart/uart_cpu_acpi.c
132 ↗(On Diff #57708)

I disagree, the spec says that value 0-2, 5, 8-255 are reserved so if we handle one of those value differently because $reason we should preserve the comment.

good for me, please just commit with the baudrate 0 comment preserved, I'm sure this will help someone in the future.

please just commit with the baudrate 0 comment preserved

OK in my testing too, agreed on the comment.

sys/dev/uart/uart_cpu_acpi.c
132 ↗(On Diff #57708)

Which spec are you looking at?

https://docs.microsoft.com/en-us/windows-hardware/drivers/serports/serial-port-console-redirection-table

says "0 = as is, operating system relies on the current configuration of serial port until the full featured driver will be initialized."

I'll add the comment back anyway...

This revision was automatically updated to reflect the committed changes.