Skip to content

Commit

Permalink
efi/fdt: don't expose fdt to kernel
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jongwu committed Jul 6, 2023
1 parent 5740ae5 commit a088e25
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/efi/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,6 @@ pub extern "efiapi" fn install_configuration_table(guid: *mut Guid, table: *mut

for entry in ct.iter_mut() {
if entry.vendor_guid == unsafe { *guid } {
entry.vendor_table = table;
if table.is_null() {
entry.vendor_guid = INVALID_GUID;
entry.vendor_table = null_mut();
Expand Down Expand Up @@ -1115,6 +1114,8 @@ pub fn efi_exec(
let mut ct_index = 0;

// Populate with FDT table if present
// 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
#[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 a088e25

Please sign in to comment.