Refactor etc

rust
E. Almqvist 3 years ago
parent 5097d32bda
commit 572be221b3
  1. 2
      drivers/vga.c
  2. 36
      kernel/kernel.c

@ -16,7 +16,7 @@ void vga_init() {
// Clear screen
// clear_row(0);
clear_screen();
// clear_screen();
set_cursor_pos(0, 0);
}

@ -1,20 +1,6 @@
#include "kernel.h"
char** eos_art = {
"\0"
};
void kernel_init() {
vga_init(); // Initialize the screen first
// i.e. clear the screen et cetera.
// Allocate VGA memory range
pm_malloc_range(VGA_ADDRESS, VGA_ADDRESS_MAX, true); // force alloc the VGA range
// ENABLE PAGING
// TODO: make this work
// enable_paging();
void kernel_motd() {
printalign(" ___ ____ ", BANNER_COLOR, MIDDLE);
printalign(" ___ / _ \\/ ___| ", BANNER_COLOR, MIDDLE);
printalign(" / _ \\ | | \\___ \\ ", BANNER_COLOR, MIDDLE);
@ -25,9 +11,21 @@ void kernel_init() {
printalign("Fun fact: e = lim[h->0] (1+h)^(1/h)", DEFAULT_COLOR, MIDDLE);
printalign("Created by Elias Almqvist", DEFAULT_COLOR, MIDDLE);
}
void kernel_init() {
// Display a nice MOTD
clear_screen();
kernel_motd();
// for(char* line = *eos_art; line; line=*++eos_art) {
// print(":::: ");
// printalign(line, DEFAULT_COLOR);
// }
vga_init(); // Initialize the screen first
// i.e. clear the screen et cetera.
// Allocate VGA memory range
pm_malloc_range(VGA_ADDRESS, VGA_ADDRESS_MAX, true); // force alloc the VGA range
// ENABLE PAGING
// TODO: make this work
// enable_paging();
}

Loading…
Cancel
Save