From fb372e6db7ffbf7bde58fd652b4ac03f14c0e767 Mon Sep 17 00:00:00 2001 From: mintsuki Date: Thu, 1 Sep 2022 04:58:18 +0200 Subject: [PATCH] pmm: Make code to reserve page 0 uniform between BIOS and UEFI --- common/mm/pmm.s2.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/common/mm/pmm.s2.c b/common/mm/pmm.s2.c index 07af2e5b..ff19107b 100644 --- a/common/mm/pmm.s2.c +++ b/common/mm/pmm.s2.c @@ -167,7 +167,7 @@ static void sanitise_entries(struct memmap_entry *m, size_t *_count, bool align_ if (m[i].type != MEMMAP_USABLE) continue; - if (bios && m[i].base < 0x1000) { + if (m[i].base < 0x1000) { if (m[i].base + m[i].length <= 0x1000) { goto del_mm1; } @@ -230,8 +230,6 @@ struct memmap_entry *get_memmap(size_t *entries) { pmm_reclaim_uefi_mem(memmap, &memmap_entries); #endif - memmap_alloc_range(0, 0x1000, MEMMAP_RESERVED, MEMMAP_USABLE, false, false, false); - sanitise_entries(memmap, &memmap_entries, true); *entries = memmap_entries;