feat: cleanup init code, small other refactors
This commit is contained in:
@@ -3,9 +3,11 @@
|
||||
//
|
||||
|
||||
#include <string.h>
|
||||
#include <myke/drivers/vgascreen.h>
|
||||
|
||||
#include <myke/drivers/ports.h>
|
||||
#include <myke/drivers/vgascreen.h>
|
||||
#include <myke/libk/kprint.h>
|
||||
#include <myke/util/init.h>
|
||||
|
||||
char *_vga_character_memory = (char *) VGA_CHARACTER_MEMORY_LOCATION;
|
||||
|
||||
@@ -136,3 +138,14 @@ int get_offset_row(int offset) {
|
||||
int get_offset_col(int offset) {
|
||||
return (offset - (get_offset_row(offset) * 2 * VGA_COL_MAX)) / 2;
|
||||
}
|
||||
|
||||
void vga_init() {
|
||||
vga_clear_screen();
|
||||
kprint_register(vga_kprint);
|
||||
}
|
||||
|
||||
INIT_FUNCTION(100) = {
|
||||
.name = "vga",
|
||||
.stage = INIT_STAGE_EARLY_BOOT_0,
|
||||
.init = vga_init,
|
||||
};
|
||||
Reference in New Issue
Block a user