We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8ca8a7a commit 9fb7eb3Copy full SHA for 9fb7eb3
src/bin/uefi.rs
@@ -59,9 +59,12 @@ fn efi_main(image: Handle, st: SystemTable<Boot>) -> Status {
59
rsdp_addr: {
60
use uefi::table::cfg;
61
let mut config_entries = system_table.config_table().iter();
62
- config_entries
63
- .find(|entry| matches!(entry.guid, cfg::ACPI_GUID | cfg::ACPI2_GUID))
64
- .map(|entry| PhysAddr::new(entry.address as u64))
+ // look for an ACPI2 RSDP first
+ let acpi2_rsdp = config_entries.find(|entry| matches!(entry.guid, cfg::ACPI2_GUID));
+ // if no ACPI2 RSDP is found, look for a ACPI RSDP
65
+ let rsdp = acpi2_rsdp
66
+ .or_else(|| config_entries.find(|entry| matches!(entry.guid, cfg::ACPI_GUID)));
67
+ rsdp.map(|entry| PhysAddr::new(entry.address as u64));
68
},
69
};
70
0 commit comments