pmm: Use untouched_memmap instead of memmap in pmm_release_uefi_mem
This commit is contained in:
parent
6f0d7228f1
commit
f176e24376
@ -518,15 +518,13 @@ another_recl:;
|
|||||||
void pmm_release_uefi_mem(void) {
|
void pmm_release_uefi_mem(void) {
|
||||||
EFI_STATUS status;
|
EFI_STATUS status;
|
||||||
|
|
||||||
sanitise_entries(memmap, &memmap_entries, true);
|
for (size_t i = 0; i < untouched_memmap_entries; i++) {
|
||||||
|
if (untouched_memmap[i].type != MEMMAP_USABLE
|
||||||
for (size_t i = 0; i < memmap_entries; i++) {
|
&& untouched_memmap[i].type != MEMMAP_BOOTLOADER_RECLAIMABLE) {
|
||||||
if (memmap[i].type != MEMMAP_USABLE
|
|
||||||
&& memmap[i].type != MEMMAP_BOOTLOADER_RECLAIMABLE) {
|
|
||||||
continue;
|
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) {
|
if (status) {
|
||||||
panic("pmm: FreePages failure (%x)", status);
|
panic("pmm: FreePages failure (%x)", status);
|
||||||
|
@ -36,6 +36,8 @@ COMMENT=Contains legacy entries.
|
|||||||
|
|
||||||
COMMENT=Stivale1 test.
|
COMMENT=Stivale1 test.
|
||||||
|
|
||||||
|
KASLR=no
|
||||||
|
|
||||||
PROTOCOL=stivale
|
PROTOCOL=stivale
|
||||||
KERNEL_PATH=boot:///boot/test.elf
|
KERNEL_PATH=boot:///boot/test.elf
|
||||||
KERNEL_CMDLINE=Hi! This is an example!
|
KERNEL_CMDLINE=Hi! This is an example!
|
||||||
|
Loading…
Reference in New Issue
Block a user