mm/efi: Fix issue where in-use bootloader memory may be erroneously allocated

This commit is contained in:
mintsuki 2022-04-19 22:28:21 +02:00
parent 8cb61a95d2
commit 1af09d0749
2 changed files with 3 additions and 2 deletions

View File

@ -213,8 +213,6 @@ retry:
asm volatile ("cli" ::: "memory");
pmm_reclaim_uefi_mem();
// Go through new EFI memmap and free up bootloader entries
size_t entry_count = efi_mmap_size / efi_desc_size;

View File

@ -226,6 +226,9 @@ del_mm1:
}
struct e820_entry_t *get_memmap(size_t *entries) {
#if uefi == 1
pmm_reclaim_uefi_mem();
#endif
sanitise_entries(memmap, &memmap_entries, true);
*entries = memmap_entries;