summaryrefslogtreecommitdiffstats
path: root/sys/x86/acpica
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2016-04-14 04:59:51 +0000
committerimp <imp@FreeBSD.org>2016-04-14 04:59:51 +0000
commit4c3365f0f1beadc7e200aafb69275318bb3ac1b6 (patch)
treefe9a1d88c1c4bc8f8964451ce33426ad54a424a5 /sys/x86/acpica
parentaccce1712baaadd9b0391b853eafb19505a53991 (diff)
downloadFreeBSD-src-4c3365f0f1beadc7e200aafb69275318bb3ac1b6.zip
FreeBSD-src-4c3365f0f1beadc7e200aafb69275318bb3ac1b6.tar.gz
Deprecate using hints.acpi.0.rsdp to communicate the RSDP to the
system. This uses the hints mechnanism. This mostly works today because when there's no static hints (the default), this value can be fetched from the hint. When there is a static hints file, the hint passed from the boot loader to the kernel is ignored, but for the BIOS case we're able to find it anyway. However, with UEFI, the fallback doesn't work, so we get a panic instead. Switch to acpi.rsdp and use TUNABLE_ULONG_FETCH instead. Continue to generate the old values to allow for transitions. In addition, fall back to the old method if the new method isn't present. Add comments about all this. Differential Revision: https://reviews.freebsd.org/D5866
Diffstat (limited to 'sys/x86/acpica')
-rw-r--r--sys/x86/acpica/OsdEnvironment.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/sys/x86/acpica/OsdEnvironment.c b/sys/x86/acpica/OsdEnvironment.c
index be612b5..ab8a7fb 100644
--- a/sys/x86/acpica/OsdEnvironment.c
+++ b/sys/x86/acpica/OsdEnvironment.c
@@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$");
#include <sys/types.h>
#include <sys/bus.h>
+#include <sys/kernel.h>
#include <sys/sysctl.h>
#include <contrib/dev/acpica/include/acpi.h>
@@ -59,6 +60,16 @@ acpi_get_root_from_loader(void)
{
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)
return (acpi_root);
OpenPOWER on IntegriCloud