aboutsummaryrefslogtreecommitdiff
path: root/sys/arm64/acpica/OsdEnvironment.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arm64/acpica/OsdEnvironment.c')
-rw-r--r--sys/arm64/acpica/OsdEnvironment.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/sys/arm64/acpica/OsdEnvironment.c b/sys/arm64/acpica/OsdEnvironment.c
index 6efcee9646d0..535aa18d805e 100644
--- a/sys/arm64/acpica/OsdEnvironment.c
+++ b/sys/arm64/acpica/OsdEnvironment.c
@@ -25,11 +25,9 @@
* SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
-__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>
@@ -60,6 +58,15 @@ acpi_get_root_from_loader(void)
{
long acpi_root;
+ if (TUNABLE_ULONG_FETCH("acpi.rsdp", &acpi_root))
+ return (acpi_root);
+
+ /*
+ * The hints mechanism is considered legacy and 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)
return (acpi_root);