summaryrefslogtreecommitdiff
path: root/kernel/src/boot
diff options
context:
space:
mode:
authorAleksa Vuckovic <aleksav013@gmail.com>2022-11-26 00:22:10 +0100
committerAleksa Vuckovic <aleksav013@gmail.com>2022-11-27 01:04:18 +0100
commitd43a3388a976a74ae109c5b8b5a31f82a16b45db (patch)
tree51880414ee600ddfb3c7e3486c3d74beced36bfe /kernel/src/boot
parent5d56d1a5b4d52702eb4e4ea6f05e4b6eebf41ca8 (diff)
fixing issues
1) main.c: order of init (multiboot.c must be after heap & paging because it uses heap to allocate pages for framebuffer) 2) paging.c: zeroing new pages allocated via heap 3) multiboot2.c: invalid pointer arithmetic 4) libk/string.c: check for null pointers in memcpy 5) paging: only page_lvl2 should have FLAG_HUGE 6) keyboard.c: kfree(print_buff)
Diffstat (limited to 'kernel/src/boot')
-rw-r--r--kernel/src/boot/multiboot2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/src/boot/multiboot2.c b/kernel/src/boot/multiboot2.c
index 9410273..b111649 100644
--- a/kernel/src/boot/multiboot2.c
+++ b/kernel/src/boot/multiboot2.c
@@ -23,8 +23,8 @@ void init_fb(mb2_tag_fb* tag_fb)
main_fb.bpp = tag_fb->framebuffer_bpp;
// identity map framebuffer address
- map_addr(main_fb.addr, main_fb.addr, FLAG_PRESENT + FLAG_WRITABLE);
- map_addr(main_fb.addr + PAGE_SIZE, main_fb.addr + PAGE_SIZE, FLAG_PRESENT + FLAG_WRITABLE);
+ map_addr(main_fb.addr, main_fb.addr, FLAG_PRESENT | FLAG_WRITABLE | FLAG_USER);
+ map_addr(main_fb.addr + PAGE_SIZE, main_fb.addr + PAGE_SIZE, FLAG_PRESENT | FLAG_WRITABLE | FLAG_USER);
}
void init_mmap(mb2_tag_mmap* tag_mmap)