pmm: Fix alignment issue introduced in 3fe8217

This commit is contained in:
mintsuki 2022-02-28 08:24:44 +01:00
parent 4dbc6831ad
commit 79781941e7

View File

@ -385,8 +385,10 @@ void init_memmap(void) {
memcpy(untouched_memmap, memmap, memmap_entries * sizeof(struct e820_entry_t));
untouched_memmap_entries = memmap_entries;
size_t bootloader_size = ALIGN_UP((uintptr_t)_edata - (uintptr_t)ImageBase, 4096);
// Allocate bootloader itself
memmap_alloc_range((uintptr_t)ImageBase, (uintptr_t)_edata - (uintptr_t)ImageBase,
memmap_alloc_range((uintptr_t)ImageBase, bootloader_size,
MEMMAP_BOOTLOADER_RECLAIMABLE, false, true, false, true);
sanitise_entries(memmap, &memmap_entries, false);