diff options
author | Marvin Borner | 2020-05-07 00:16:52 +0200 |
---|---|---|
committer | Marvin Borner | 2020-05-07 00:16:52 +0200 |
commit | 31767b532e69c5a63df0106fa08e137e3106a449 (patch) | |
tree | ea7a91347e030c0b120361b7d9975547a5af19d1 /src/kernel/graphics | |
parent | 8083536f321ad8a12ad4668c2bf41a65c3e3b2f6 (diff) |
Some fixes here and there...
Also implemented serial console in userspace
Diffstat (limited to 'src/kernel/graphics')
-rw-r--r-- | src/kernel/graphics/vesa.c | 14 | ||||
-rw-r--r-- | src/kernel/graphics/vesa.h | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/kernel/graphics/vesa.c b/src/kernel/graphics/vesa.c index 176b46f..b2a31d7 100644 --- a/src/kernel/graphics/vesa.c +++ b/src/kernel/graphics/vesa.c @@ -13,7 +13,7 @@ void vbe_error() halt_loop(); } -void vbe_set_mode(unsigned short mode) +void vbe_set_mode(u16 mode) { regs16_t regs; regs.ax = 0x4F02; @@ -109,7 +109,7 @@ void set_optimal_resolution() vbe_height = mode_info->height; vbe_pitch = mode_info->pitch; vbe_bpl = mode_info->bpp >> 3; - fb = (unsigned char *)mode_info->framebuffer; + fb = (u8 *)mode_info->framebuffer; } kfree(mode_info); } @@ -150,7 +150,7 @@ void set_optimal_resolution() vbe_height = mode_info->height; vbe_pitch = mode_info->pitch; vbe_bpl = mode_info->bpp >> 3; - fb = (unsigned char *)mode_info->framebuffer; + fb = (u8 *)mode_info->framebuffer; } kfree(mode_info); } @@ -164,11 +164,11 @@ void set_optimal_resolution() vbe_set_mode(highest); - u32 fb_size = vbe_width * vbe_height * vbe_bpl; + /* u32 fb_size = vbe_width * vbe_height * vbe_bpl; */ /* cursor_buffer = kmalloc(fb_size); */ - for (u32 z = 0; z < fb_size; z += PAGE_S) { - paging_map_user(paging_root_directory, (u32)fb + z, (u32)fb + z); - } + /* for (u32 z = 0; z < fb_size; z += PAGE_S) { */ + /* paging_map_user(paging_root_directory, (u32)fb + z, (u32)fb + z); */ + /* } */ /* dev_make("fb", NULL, (write)fb_write); */ /* struct fs_node *node = (struct fs_node *)kmalloc(sizeof(struct fs_node)); */ diff --git a/src/kernel/graphics/vesa.h b/src/kernel/graphics/vesa.h index c557e95..82b7553 100644 --- a/src/kernel/graphics/vesa.h +++ b/src/kernel/graphics/vesa.h @@ -80,7 +80,7 @@ struct vbe_mode_info { * a video mode code * @param mode The requested video mode code from 0x4F00 call */ -void vbe_set_mode(unsigned short mode); +void vbe_set_mode(u16 mode); /** * Find the highest resolution using 0x4F00 and call |