Changeset View
Changeset View
Standalone View
Standalone View
sys/x86/acpica/OsdEnvironment.c
Show All 24 Lines | |||||
* SUCH DAMAGE. | * SUCH DAMAGE. | ||||
*/ | */ | ||||
#include <sys/cdefs.h> | #include <sys/cdefs.h> | ||||
__FBSDID("$FreeBSD$"); | __FBSDID("$FreeBSD$"); | ||||
#include <sys/types.h> | #include <sys/types.h> | ||||
#include <sys/bus.h> | #include <sys/bus.h> | ||||
#include <sys/kernel.h> | |||||
#include <sys/sysctl.h> | #include <sys/sysctl.h> | ||||
#include <contrib/dev/acpica/include/acpi.h> | #include <contrib/dev/acpica/include/acpi.h> | ||||
#include <contrib/dev/acpica/include/actables.h> | #include <contrib/dev/acpica/include/actables.h> | ||||
static u_long acpi_root_phys; | static u_long acpi_root_phys; | ||||
SYSCTL_ULONG(_machdep, OID_AUTO, acpi_root, CTLFLAG_RD, &acpi_root_phys, 0, | SYSCTL_ULONG(_machdep, OID_AUTO, acpi_root, CTLFLAG_RD, &acpi_root_phys, 0, | ||||
Show All 13 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 11.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); | ||||
} | } | ||||
static u_long | static u_long | ||||
acpi_get_root_from_memory(void) | acpi_get_root_from_memory(void) | ||||
Show All 21 Lines |