File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 11# Unreleased
22
3+ - Uefi: Look for an ACPI2 RSDP first ([ #174 ] ( https://github.com/rust-osdev/bootloader/pull/174 ) )
4+
35# 0.10.5 – 2021-05-21
46
57- Fix build on latest Rust nightlies by updating ` uefi-rs ` dependency ([ #170 ] ( https://github.com/rust-osdev/bootloader/pull/170 ) )
Original file line number Diff line number Diff line change @@ -59,9 +59,12 @@ fn efi_main(image: Handle, st: SystemTable<Boot>) -> Status {
5959 rsdp_addr : {
6060 use uefi:: table:: cfg;
6161 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 ) )
62+ // look for an ACPI2 RSDP first
63+ let acpi2_rsdp = config_entries. find ( |entry| matches ! ( entry. guid, cfg:: ACPI2_GUID ) ) ;
64+ // if no ACPI2 RSDP is found, look for a ACPI1 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 ) )
6568 } ,
6669 } ;
6770
You can’t perform that action at this time.
0 commit comments