[platform][pc] fix memory map handling in multiboot
The starting address of mmap is off by 4 bytes. Signed-off-by: Xi Wang <xi.wang@gmail.com>
This commit is contained in:
committed by
Travis Geiselbrecht
parent
9fa0924c88
commit
63fa995789
@@ -191,7 +191,7 @@ void platform_init_multiboot_info(void)
|
||||
}
|
||||
|
||||
if (_multiboot_info->flags & MB_INFO_MMAP) {
|
||||
memory_map_t *mmap = (memory_map_t *)(uintptr_t)(_multiboot_info->mmap_addr - 4);
|
||||
memory_map_t *mmap = (memory_map_t *)(uintptr_t)_multiboot_info->mmap_addr;
|
||||
mmap = (void *)((uintptr_t)mmap + KERNEL_BASE);
|
||||
|
||||
LTRACEF("memory map:\n");
|
||||
|
||||
Reference in New Issue
Block a user