Page MenuHomeFreeBSD

acpidump: always fetch the RSDP from sysctl
Needs ReviewPublic

Authored by royger on Mar 28 2018, 2:25 PM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 3 2024, 4:08 PM
Unknown Object (File)
Dec 20 2023, 8:37 AM
Unknown Object (File)
Dec 3 2023, 4:25 PM
Unknown Object (File)
Jun 3 2023, 1:45 AM
Unknown Object (File)
May 29 2023, 1:57 AM
Unknown Object (File)
May 14 2023, 6:23 AM
Unknown Object (File)
Dec 28 2022, 8:10 PM
Unknown Object (File)
Dec 11 2022, 5:26 PM
Subscribers
None

Details

Reviewers
jhb
jkim
Summary

The RSDP address hint provided by kenv might not be correct (it's only
a hint), the actual RSDP address used by the kernel can be fetched
from sysctl, so always use it.

Sponsored by: Citrix Systems R&D

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 15847
Build 15855: arc lint + arc unit

Event Timeline

Hmm, what are the cases when the hint is wrong? The kernel always prefers the hint for the acpi0 driver (see sys/x86/acpica/OsdEnvironment.c:AcpiOsGetRootPointer). The hint name is just an implementation detail, it is only set by the loader if the loader actually finds the root pointer via the memory scan or from EFI's system tables.

In D14880#312984, @jhb wrote:

Hmm, what are the cases when the hint is wrong? The kernel always prefers the hint for the acpi0 driver (see sys/x86/acpica/OsdEnvironment.c:AcpiOsGetRootPointer). The hint name is just an implementation detail, it is only set by the loader if the loader actually finds the root pointer via the memory scan or from EFI's system tables.

IMO it seem better to use the address that the kernel is using and reporting in the sysctl. Not specially fuzzed about it, just seemed more correct.

I think it would be fine to prefer the sysctl to the kenv, but imagine booting a kernel with 'hint.acpi.0.disabled=1'. In that case I think you would want acpidump to honor the kenv hint from the loader's memory scan (or from an EFI table) rather than doing the memory scan in acpidump? But also, I don't think the commit log is accurate to say that the hint can be wrong. We currently assume it is correct if set.