diff options
author | Marvin Borner | 2019-10-23 22:29:38 +0200 |
---|---|---|
committer | Marvin Borner | 2019-10-23 22:29:38 +0200 |
commit | 5329b26ff809798085ef9e6d049ef5ac09c7e435 (patch) | |
tree | 4977471619e0db278e122494c2ed7ee119a9f37a /src/kernel/graphics/vesa.c | |
parent | 44c31c3f130aa5b337eeae73f4875f05cf0440de (diff) |
Fixed page fault and added better resolution logging
Diffstat (limited to 'src/kernel/graphics/vesa.c')
-rw-r--r-- | src/kernel/graphics/vesa.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/kernel/graphics/vesa.c b/src/kernel/graphics/vesa.c index cc2ea84..14db37e 100644 --- a/src/kernel/graphics/vesa.c +++ b/src/kernel/graphics/vesa.c @@ -127,6 +127,12 @@ void set_optimal_resolution() { (mode_info->memory_model != 4 && mode_info->memory_model != 6)) continue; + serial_write("Found mode: "); + serial_write_dec(mode_info->width); + serial_write("x"); + serial_write_dec(mode_info->height); + serial_write("\n"); + if (mode_info->width >= vbe_width) { // (float) mode_info->width / (float) mode_info->height < 2.0 &&) { highest = *mode; @@ -152,7 +158,8 @@ void set_optimal_resolution() { serial_write("\n"); uint32_t fb_size = vbe_width * vbe_height * vbe_bpp; - fb = (unsigned char *) kmalloc_p(fb_size, (uint32_t *) fb); + for (uint32_t z = 0; z <= fb_size; z += 4096) + alloc_frame(get_page((uint32_t) fb + z, 1, kernel_directory), 1, 1); vbe_set_mode(highest); } |