x86: skip unaddressable memory for multiboot2

On 32-bit x86, when booting under multiboot1 the physical memories
above 4GB are skipped and not included as usable memory regions.
Make sure we also do this when booting under multiboot2.

Signed-off-by: Liu, Chang <cl91tp@gmail.com>
This commit is contained in:
Liu, Chang
2025-10-22 17:06:19 +08:00
committed by Indan Zupancic
parent 7099f9d543
commit aa329f9476

View File

@@ -671,6 +671,7 @@ static BOOT_CODE bool_t try_boot_sys_mbi2(
printf("\tPhysical Memory Region from %llx size %llx type %u\n", m->addr, m->size, m->type);
if (m->addr != (uint64_t)(word_t)m->addr) {
printf("\t\tPhysical memory region not addressable\n");
continue;
}
if (m->type == MULTIBOOT_MMAP_USEABLE_TYPE && m->addr >= HIGHMEM_PADDR) {