Skip to content

Commit

Permalink
[platform][pc] fix memory map handling in multiboot
Browse files Browse the repository at this point in the history
The starting address of mmap is off by 4 bytes.

Signed-off-by: Xi Wang <xi.wang@gmail.com>
  • Loading branch information
xiw authored and travisg committed Jul 30, 2017
1 parent 9fa0924 commit 63fa995
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion platform/pc/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 63fa995

Please sign in to comment.