From f176e24376f2743d8afca79963b1c600668590bf Mon Sep 17 00:00:00 2001 From: mintsuki Date: Sun, 31 Oct 2021 21:51:06 +0100 Subject: [PATCH] pmm: Use untouched_memmap instead of memmap in pmm_release_uefi_mem --- stage23/mm/pmm.s2.c | 10 ++++------ test/limine.cfg | 2 ++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/stage23/mm/pmm.s2.c b/stage23/mm/pmm.s2.c index ac31e4c0..11bfbeba 100644 --- a/stage23/mm/pmm.s2.c +++ b/stage23/mm/pmm.s2.c @@ -518,15 +518,13 @@ another_recl:; void pmm_release_uefi_mem(void) { EFI_STATUS status; - sanitise_entries(memmap, &memmap_entries, true); - - for (size_t i = 0; i < memmap_entries; i++) { - if (memmap[i].type != MEMMAP_USABLE - && memmap[i].type != MEMMAP_BOOTLOADER_RECLAIMABLE) { + for (size_t i = 0; i < untouched_memmap_entries; i++) { + if (untouched_memmap[i].type != MEMMAP_USABLE + && untouched_memmap[i].type != MEMMAP_BOOTLOADER_RECLAIMABLE) { continue; } - status = gBS->FreePages(memmap[i].base, memmap[i].length / 4096); + status = gBS->FreePages(untouched_memmap[i].base, untouched_memmap[i].length / 4096); if (status) { panic("pmm: FreePages failure (%x)", status); diff --git a/test/limine.cfg b/test/limine.cfg index 7123ab86..e24437a5 100644 --- a/test/limine.cfg +++ b/test/limine.cfg @@ -36,6 +36,8 @@ COMMENT=Contains legacy entries. COMMENT=Stivale1 test. +KASLR=no + PROTOCOL=stivale KERNEL_PATH=boot:///boot/test.elf KERNEL_CMDLINE=Hi! This is an example!