Skip to content

Commit a088e25

Browse files
committed
efi/fdt: don't expose fdt to kernel
There is a check that if fdt is stub when ACPI table initialized in linux kernel [1]. So, if full fdt is given, fdt will be used insdead of ACPI. It is aginst our primary goal to use UEFI. So, full fdt can't be given here. For simplicity, just neglict it here. It can be improved by making a stub fdt and pass it through configuration table. Maybe later. Fixes: #261 Signed-off-by: Jianyong Wu <[email protected]> [1] https://github.com/torvalds/linux/blob/d528014517f2b0531862c02865b9d4c908019dc4/arch/arm64/kernel/acpi.c#L203
1 parent 5740ae5 commit a088e25

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/efi/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,6 @@ pub extern "efiapi" fn install_configuration_table(guid: *mut Guid, table: *mut
614614

615615
for entry in ct.iter_mut() {
616616
if entry.vendor_guid == unsafe { *guid } {
617-
entry.vendor_table = table;
618617
if table.is_null() {
619618
entry.vendor_guid = INVALID_GUID;
620619
entry.vendor_table = null_mut();
@@ -1115,6 +1114,8 @@ pub fn efi_exec(
11151114
let mut ct_index = 0;
11161115

11171116
// Populate with FDT table if present
1117+
// To boot with ACPI, we can't offer full fdt. Simply, neglect it. See https://github.com/torvalds/linux/blob/d528014517f2b0531862c02865b9d4c908019dc4/arch/arm64/kernel/acpi.c#L203
1118+
#[cfg(not(target_arch = "aarch64"))]
11181119
if let Some(fdt_entry) = info.fdt_reservation() {
11191120
ct[ct_index] = efi::ConfigurationTable {
11201121
vendor_guid: Guid::from_fields(

0 commit comments

Comments
 (0)