summaryrefslogtreecommitdiff
path: root/kernel/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--kernel/src/main.c46
1 files changed, 11 insertions, 35 deletions
diff --git a/kernel/src/main.c b/kernel/src/main.c
index da5879a..33e4cea 100644
--- a/kernel/src/main.c
+++ b/kernel/src/main.c
@@ -1,52 +1,29 @@
-#include "acpi/acpi.h"
-#include "boot/tag.h"
-#include "cpu/cpu.h"
-#include "drivers/ps2ctrl.h"
-#include "drivers/ps2kb.h"
-#include "drivers/ps2mouse.h"
-#include "interrupt/idt.h"
-#include "interrupt/pic.h"
#include "time.h"
-#include "tty/cursor.h"
-#include "tty/term.h"
-
+#include <drivers/ps2kb.h>
+#include <drivers/ps2mouse.h>
+#include <panic.h>
#include <print.h>
+#include <sys.h>
#include <math.h>
#include <stdint.h>
#include <stdlib.h>
-#include <sys.h>
+#include <term.h>
static double x = 0, y = 0;
-void kernel_boot(void *boot_info) {
- (void)boot_info;
-}
-
-
-void kernel_main(void) {
+void kernel_main(void *boot_info) {
term_init();
- cursor_enable();
-
- rtc_set_timezone(-4);
- rtc_update();
-
- idt_init();
- pic_remap(PIC_REMAP_OFFSET);
-
- // load_boot_info(boot_info);
- // acpi_init();
-
- // memory_init();
- ps2ctrl_init();
+ arch_init(boot_info);
ps2kb_init();
ps2mouse_init();
- init_registers(FPU_REG | SSE_REG);
+ set_timezone(EST);
while(1) {
- int_wait();
+ arch_wait_int();
+ arch_update();
struct Keycode code = ps2kb_get();
if(code.key != KEY_NONE) {
@@ -60,7 +37,7 @@ void kernel_main(void) {
}
if (code.key == KEY_ESCAPE) {
- acpi_poweroff();
+ arch_poweroff();
}
struct MouseEvent event = ps2mouse_get();
@@ -76,6 +53,5 @@ void kernel_main(void) {
}
term_flush();
- rtc_update();
}
}