From e7d88df7a5a7e11677b68303a0d05455bf9a60d6 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Wed, 11 Dec 2019 21:22:15 +0100 Subject: Some user-side graphics --- src/kernel/graphics/vesa.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/kernel/graphics/vesa.c') diff --git a/src/kernel/graphics/vesa.c b/src/kernel/graphics/vesa.c index d673bde..c74b34b 100644 --- a/src/kernel/graphics/vesa.c +++ b/src/kernel/graphics/vesa.c @@ -190,11 +190,11 @@ void set_optimal_resolution() uint32_t fb_size = vbe_width * vbe_height * vbe_bpl; cursor_buffer = kmalloc(fb_size); + paging_set_user((uint32_t) fb, fb_size / 4096); for (uint32_t z = 0; z < fb_size; z += 4096) { - paging_map((uint32_t) fb + z, (uint32_t) fb + z, PT_PRESENT | PT_RW | PT_USED); + paging_map((uint32_t) fb + z, (uint32_t) fb + z, PT_PRESENT | PT_RW | PT_USED | PT_ALL_PRIV); paging_map((uint32_t) cursor_buffer + z, (uint32_t) cursor_buffer + z, PT_PRESENT | PT_RW | PT_USED); } - paging_set_user((uint32_t) fb, fb_size); serial_write_hex((int) &fb); serial_write("\n"); @@ -399,4 +399,4 @@ void vesa_set_color(uint32_t color) { vesa_convert_color(terminal_color, color); vesa_convert_color(terminal_background, default_background_color); -} +} \ No newline at end of file -- cgit v1.2.3