fix: able to read multiboot mmap
This commit is contained in:
@ -9,7 +9,7 @@ uint32_t *page_directory = &boot_page_directory;
|
||||
uint32_t page_table_default[1024] __attribute__((aligned(PAGE_SIZE)));
|
||||
uint32_t multiboot_page_table[1024] __attribute__((aligned(PAGE_SIZE)));
|
||||
uint32_t mem_size;
|
||||
multiboot_uint32_t *mmap_addr;
|
||||
multiboot_memory_map_t *mmap_addr;
|
||||
multiboot_uint32_t mmap_length;
|
||||
|
||||
static void init_multiboot(multiboot_info_t *mbd, uint32_t magic)
|
||||
@ -36,10 +36,10 @@ static void init_multiboot(multiboot_info_t *mbd, uint32_t magic)
|
||||
multiboot_page_table[i + mbd_size] =
|
||||
((mbd_virt->mmap_addr + i * PAGE_SIZE) & PAGE_MASK) |
|
||||
INIT_FLAGS;
|
||||
mmap_addr =
|
||||
(multiboot_uint32_t *)(GET_PAGE_ADDR(1023, mbd_size) +
|
||||
(uint32_t)mbd_virt->mmap_addr % PAGE_SIZE);
|
||||
mmap_length = mbd_virt->mmap_length;
|
||||
mmap_addr = (multiboot_memory_map_t *)(GET_PAGE_ADDR(1023, mbd_size) +
|
||||
(uint32_t)mbd_virt->mmap_addr %
|
||||
PAGE_SIZE);
|
||||
mmap_length = mbd_virt->mmap_length / sizeof(multiboot_memory_map_t);
|
||||
}
|
||||
|
||||
void init_memory(multiboot_info_t *mbd, uint32_t magic)
|
||||
|
Reference in New Issue
Block a user