aboutsummaryrefslogtreecommitdiff
path: root/stand/efi/loader/arch/arm64/exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'stand/efi/loader/arch/arm64/exec.c')
-rw-r--r--stand/efi/loader/arch/arm64/exec.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/stand/efi/loader/arch/arm64/exec.c b/stand/efi/loader/arch/arm64/exec.c
index 6cf4a4fd8e4d..a8cd80cd0fc6 100644
--- a/stand/efi/loader/arch/arm64/exec.c
+++ b/stand/efi/loader/arch/arm64/exec.c
@@ -81,6 +81,13 @@ elf64_exec(struct preloaded_file *fp)
int err, revision;
void (*entry)(vm_offset_t);
+ /*
+ * Report the RSDP to the kernel. The old code used the 'hints' method
+ * to communicate this to the kernel, but this is now considered legacy.
+ * Instead, move to setting different tunables that start with acpi.
+ * The old 'hints' can be removed before we branch for FreeBSD 15.
+ */
+
rsdp = efi_get_table(&acpi20_guid);
if (rsdp == NULL) {
rsdp = efi_get_table(&acpi_guid);
@@ -88,23 +95,29 @@ elf64_exec(struct preloaded_file *fp)
if (rsdp != NULL) {
sprintf(buf, "0x%016llx", (unsigned long long)rsdp);
setenv("hint.acpi.0.rsdp", buf, 1);
+ setenv("acpi.rsdp", buf, 1);
revision = rsdp->Revision;
if (revision == 0)
revision = 1;
sprintf(buf, "%d", revision);
setenv("hint.acpi.0.revision", buf, 1);
+ setenv("acpi.revision", buf, 1);
strncpy(buf, rsdp->OemId, sizeof(rsdp->OemId));
buf[sizeof(rsdp->OemId)] = '\0';
setenv("hint.acpi.0.oem", buf, 1);
+ setenv("acpi.oem", buf, 1);
sprintf(buf, "0x%016x", rsdp->RsdtPhysicalAddress);
setenv("hint.acpi.0.rsdt", buf, 1);
+ setenv("acpi.rsdt", buf, 1);
if (revision >= 2) {
/* XXX extended checksum? */
sprintf(buf, "0x%016llx",
(unsigned long long)rsdp->XsdtPhysicalAddress);
setenv("hint.acpi.0.xsdt", buf, 1);
+ setenv("acpi.xsdt", buf, 1);
sprintf(buf, "%d", rsdp->Length);
setenv("hint.acpi.0.xsdt_length", buf, 1);
+ setenv("acpi.xsdt_length", buf, 1);
}
}