aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/graphics/vesa.c
diff options
context:
space:
mode:
authorMarvin Borner2019-12-11 21:22:15 +0100
committerMarvin Borner2019-12-11 21:22:15 +0100
commite7d88df7a5a7e11677b68303a0d05455bf9a60d6 (patch)
treec727ea585e21bc68de6add2720e47af7c2506def /src/kernel/graphics/vesa.c
parent68915f46e66ed65ce2d32009fdfa2f5dca116842 (diff)
Some user-side graphics
Diffstat (limited to 'src/kernel/graphics/vesa.c')
-rw-r--r--src/kernel/graphics/vesa.c6
1 files changed, 3 insertions, 3 deletions
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