pmm: Fix alignment issue introduced in 3fe8217
diff --git a/common/mm/pmm.s2.c b/common/mm/pmm.s2.c
index d5e244d5..2b6e5dbb 100644
--- a/common/mm/pmm.s2.c
+++ b/common/mm/pmm.s2.c
@@ -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);
