From 2e0975f8ff33bae22f46c13100072e7e71fd83a0 Mon Sep 17 00:00:00 2001 From: Jianyong Wu Date: Wed, 5 Jul 2023 10:14:16 +0000 Subject: [PATCH] aarch64: Don't advertise FDT to kernel to ensure use of ACPI The Linux kernel only enabled ACPI if the provided FDT table is a stub [1]. Although this is a violation of the boot Arm Base Boot Requirement 7.4.3 [2] which requires an FDT table (a stub would be sufficient) for simplicity the FDT table is simply skipped which does not cause issues. Fixes: #261 Signed-off-by: Jianyong Wu [1] https://github.com/torvalds/linux/blob/d528014517f2b0531862c02865b9d4c908019dc4/arch/arm64/kernel/acpi.c#L203 [2] https://developer.arm.com/documentation/den0044/latest --- src/efi/mod.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/efi/mod.rs b/src/efi/mod.rs index 607f96bf..93641768 100644 --- a/src/efi/mod.rs +++ b/src/efi/mod.rs @@ -1115,6 +1115,9 @@ pub fn efi_exec( let mut ct_index = 0; // Populate with FDT table if present + // To ensure ACPI is used during boot do not include FDT table on aarch64 + // https://github.com/torvalds/linux/blob/d528014517f2b0531862c02865b9d4c908019dc4/arch/arm64/kernel/acpi.c#L203 + #[cfg(not(target_arch = "aarch64"))] if let Some(fdt_entry) = info.fdt_reservation() { ct[ct_index] = efi::ConfigurationTable { vendor_guid: Guid::from_fields(