Changeset View
Changeset View
Standalone View
Standalone View
sys/arm64/acpica/OsdEnvironment.c
Show First 20 Lines • Show All 54 Lines • ▼ Show 20 Lines | AcpiOsTerminate(void) | ||||
return (AE_OK); | return (AE_OK); | ||||
} | } | ||||
static u_long | static u_long | ||||
acpi_get_root_from_loader(void) | acpi_get_root_from_loader(void) | ||||
{ | { | ||||
long acpi_root; | long acpi_root; | ||||
if (TUNABLE_ULONG_FETCH("acpi.rsdp", &acpi_root)) | |||||
return (acpi_root); | |||||
/* | |||||
* The hints mechanism is unreliable (it fails if anybody ever | |||||
* compiled in hints to the kernel). It has been replaced | |||||
* by the tunable method, but is used here as a fallback to | |||||
* retain maximum compatibility between old loaders and new | |||||
* kernels. It can be removed after 14.0R. | |||||
*/ | |||||
if (resource_long_value("acpi", 0, "rsdp", &acpi_root) == 0) | if (resource_long_value("acpi", 0, "rsdp", &acpi_root) == 0) | ||||
return (acpi_root); | return (acpi_root); | ||||
return (0); | return (0); | ||||
} | } | ||||
ACPI_PHYSICAL_ADDRESS | ACPI_PHYSICAL_ADDRESS | ||||
AcpiOsGetRootPointer(void) | AcpiOsGetRootPointer(void) | ||||
{ | { | ||||
if (acpi_root_phys == 0) | if (acpi_root_phys == 0) | ||||
acpi_root_phys = acpi_get_root_from_loader(); | acpi_root_phys = acpi_get_root_from_loader(); | ||||
return (acpi_root_phys); | return (acpi_root_phys); | ||||
} | } |