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
F102951854: D35794.id108153.diff
Tue, Nov 19, 3:17 AM
Unknown Object (File)
Tue, Oct 22, 1:06 AM
Unknown Object (File)
Oct 19 2024, 1:07 PM
Unknown Object (File)
Oct 19 2024, 1:07 PM
Unknown Object (File)
Oct 19 2024, 1:07 PM
Unknown Object (File)
Oct 19 2024, 12:46 PM
Unknown Object (File)
Oct 11 2024, 7:29 AM
Unknown Object (File)
Oct 1 2024, 7:43 AM
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