Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Unreleased

- Uefi: Look for an ACPI2 RSDP first ([#174](https://github.com/rust-osdev/bootloader/pull/174))

# 0.10.5 – 2021-05-21

- Fix build on latest Rust nightlies by updating `uefi-rs` dependency ([#170](https://github.com/rust-osdev/bootloader/pull/170))
Expand Down
9 changes: 6 additions & 3 deletions src/bin/uefi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,12 @@ fn efi_main(image: Handle, st: SystemTable<Boot>) -> Status {
rsdp_addr: {
use uefi::table::cfg;
let mut config_entries = system_table.config_table().iter();
config_entries
.find(|entry| matches!(entry.guid, cfg::ACPI_GUID | cfg::ACPI2_GUID))
.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
Comment thread
phil-opp marked this conversation as resolved.
Outdated
let rsdp = acpi2_rsdp
.or_else(|| config_entries.find(|entry| matches!(entry.guid, cfg::ACPI_GUID)));
rsdp.map(|entry| PhysAddr::new(entry.address as u64));
},
};

Expand Down