From ccfe87e93369494c173f3a8807924dfdc6de5621 Mon Sep 17 00:00:00 2001 From: Jarl Evanson Date: Sun, 16 Apr 2023 16:48:15 -0400 Subject: [PATCH] Implemented sorting of uefi memory maps --- uefi/src/main.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/uefi/src/main.rs b/uefi/src/main.rs index 7b0aa5af..93dfb6c7 100644 --- a/uefi/src/main.rs +++ b/uefi/src/main.rs @@ -137,7 +137,9 @@ fn main_inner(image: Handle, mut st: SystemTable) -> Status { ); log::trace!("exiting boot services"); - let (system_table, memory_map) = st.exit_boot_services(); + let (system_table, mut memory_map) = st.exit_boot_services(); + + memory_map.sort(); let mut frame_allocator = LegacyFrameAllocator::new(memory_map.entries().copied().map(UefiMemoryDescriptor));