[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:
Xi Wang
2017-07-28 20:39:46 -07:00
committed by Travis Geiselbrecht
parent 9fa0924c88
commit 63fa995789

View File

@@ -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");