Page MenuHomeFreeBSD

uart: Don't check SPCR tables if !late_console
ClosedPublic

Authored by cperciva on Jul 13 2022, 12:40 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, May 3, 9:22 AM
Unknown Object (File)
Thu, May 2, 9:23 PM
Unknown Object (File)
Fri, Apr 26, 2:43 PM
Unknown Object (File)
Apr 2 2024, 11:28 PM
Unknown Object (File)
Mar 31 2024, 7:03 AM
Unknown Object (File)
Mar 4 2024, 9:38 AM
Unknown Object (File)
Mar 4 2024, 8:24 AM
Unknown Object (File)
Feb 18 2024, 4:01 PM
Subscribers

Details

Summary

On x86 systems, the debug.late_console tunable makes it possible to set
up the console before we call pmap_bootstrap. (The tunable is turned
on by default; setting late_console=0 results in consoles being probed
early.)

Unfortunately this is not compatible with using the ACPI SPCR table to
find the console, since consulting ACPI tables requires mapping memory
addresses. As such, we skip the call to uart_cpu_acpi_spcr from
uart_cpu_x86 in the !late_console case.

Sponsored by: https://www.patreon.com/cperciva

Diff Detail

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

Event Timeline

sys/dev/uart/uart_cpu_x86.c
47

I'd be tempted to put this in sys/systm.h

sys/dev/uart/uart_cpu_x86.c
47

Yeah, I wasn't sure where to put it. I don't think sys/systm.h really applies since I think the concept of late vs early console only exists on x86; I couldn't find any x86-specific header which it made sense to stuff this into.

sys/dev/uart/uart_cpu_x86.c
47

Other platforms have had it in the past, and others likely will in the future. It's a feature that tends to be grown 'late' in a platform's life... Might not be bad to make it MI...

But that's starting to turn into a bit more effort than foreseen....

sys/dev/uart/uart_cpu_x86.c
47

Are you ok with me doing this for now, and if the concept of late vs early console appears in other platforms we can make it MI in the future?

sys/dev/uart/uart_cpu_x86.c
47

Yes. That's where my thoughts were heading and it seems like I wasn't clear enough in how I communicated it. I'm ok with this for now and maybe a cleanup in the future.

This revision is now accepted and ready to land.Jul 13 2022, 8:54 PM