fix: multiboot using unmapped pd
This commit is contained in:
2
Makefile
2
Makefile
@ -54,7 +54,7 @@ fast-run-iso: fast-iso
|
||||
qemu-system-i386 -cdrom build/$(NAME).iso -vga std
|
||||
|
||||
debug: fast-iso
|
||||
qemu-system-i386 -s -S -cdrom build/$(NAME).iso -vga std -d in_asm,int -M smm=off
|
||||
qemu-system-i386 -s -S -cdrom build/$(NAME).iso -vga std -M smm=off
|
||||
|
||||
clean:
|
||||
make -C libbozo clean
|
||||
|
||||
@ -37,7 +37,8 @@ static void init_vbe(multiboot_info_t *mbd_virt)
|
||||
((mbd_virt->framebuffer_addr + i * PAGE_SIZE) & PAGE_MASK) |
|
||||
INIT_FLAGS;
|
||||
}
|
||||
PD[PDE_VBE] = ((uint32_t)vbe_page_table - VIRT_OFFSET) | INIT_FLAGS;
|
||||
uint32_t *pd = &boot_page_directory;
|
||||
pd[PDE_VBE] = ((uint32_t)vbe_page_table - VIRT_OFFSET) | INIT_FLAGS;
|
||||
display.buff = (uint32_t *)PTE2VA(PDE_VBE, 0) +
|
||||
(mbd_virt->framebuffer_addr % PAGE_SIZE);
|
||||
display.height = mbd_virt->framebuffer_height;
|
||||
@ -51,7 +52,8 @@ void init_multiboot(multiboot_info_t *mbd, uint32_t magic)
|
||||
if (magic != MULTIBOOT_BOOTLOADER_MAGIC)
|
||||
kpanic("invalid magic number! (git gud skill issue)");
|
||||
|
||||
PD[PDE_MULTIBOOT] =
|
||||
uint32_t *pd = &boot_page_directory;
|
||||
pd[PDE_MULTIBOOT] =
|
||||
((uint32_t)multiboot_page_table - VIRT_OFFSET) | INIT_FLAGS;
|
||||
size_t pt_index = CEIL(
|
||||
(uint32_t)mbd % PAGE_SIZE + sizeof(multiboot_info_t), PAGE_SIZE);
|
||||
|
||||
Reference in New Issue
Block a user