aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/graphics/vesa.c
diff options
context:
space:
mode:
authorMarvin Borner2019-12-16 21:02:08 +0100
committerMarvin Borner2019-12-16 21:02:08 +0100
commit6188eed3863e6087a7d5b7d988e91d711b45064b (patch)
tree920d479a437214ae6d3e164e3fc3a3b72c1b31f8 /src/kernel/graphics/vesa.c
parent31aaf43b77bb86d3668f6903ca48ffdb0812cfe2 (diff)
Single hardcoded pixel drawing in userspace somehow works a bit
Diffstat (limited to 'src/kernel/graphics/vesa.c')
-rw-r--r--src/kernel/graphics/vesa.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/kernel/graphics/vesa.c b/src/kernel/graphics/vesa.c
index da8a61b..5090025 100644
--- a/src/kernel/graphics/vesa.c
+++ b/src/kernel/graphics/vesa.c
@@ -191,11 +191,11 @@ void set_optimal_resolution()
uint32_t fb_size = vbe_width * vbe_height * vbe_bpl;
cursor_buffer = umalloc(fb_size);
for (uint32_t z = 0; z < fb_size; z += 4096) {
+ paging_set_user((uint32_t) fb + z, 1);
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) paging_get_phys((uint32_t) fb), fb_size / 4096);
- serial_write_hex((int) cursor_buffer);
+ serial_write_hex((int) &fb);
serial_write("\n");
if (vbe_height > 1440) vesa_set_font(32);