Skip to content

Commit

Permalink
aarch64: Don't advertise FDT to kernel to ensure use of ACPI
Browse files Browse the repository at this point in the history
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 <[email protected]>

[1] https://github.com/torvalds/linux/blob/d528014517f2b0531862c02865b9d4c908019dc4/arch/arm64/kernel/acpi.c#L203
[2] https://developer.arm.com/documentation/den0044/latest
  • Loading branch information
jongwu authored and retrage committed Jul 21, 2023
1 parent 0be3eff commit 2e0975f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/efi/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 2e0975f

Please sign in to comment.