...
This commit is contained in:
14
src/kernel.c
14
src/kernel.c
@@ -4,7 +4,7 @@
|
||||
#include "string.h"
|
||||
#include "vga.h"
|
||||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
#include "multiboot.h"
|
||||
|
||||
void handle_keypress(const keyboard_event_t* event)
|
||||
{
|
||||
@@ -14,12 +14,18 @@ void handle_keypress(const keyboard_event_t* event)
|
||||
}
|
||||
}
|
||||
|
||||
void kmain()
|
||||
void kmain(multiboot_info_t* multiboot_info)
|
||||
{
|
||||
vga_clear();
|
||||
pic_remap();
|
||||
remap_pic();
|
||||
|
||||
if (cpu_has_apic())
|
||||
{
|
||||
disable_pic();
|
||||
enable_apic();
|
||||
}
|
||||
|
||||
enable_interrupts();
|
||||
init_keyboard();
|
||||
register_keypress_handler(handle_keypress);
|
||||
|
||||
kprintf("Welcome to nub OS\n");
|
||||
|
||||
Reference in New Issue
Block a user