aboutsummaryrefslogtreecommitdiff
path: root/src/kernel.c
diff options
context:
space:
mode:
authoraqua <aqua@iserlohn-fortress.net>2022-11-01 21:18:17 +0200
committeraqua <aqua@iserlohn-fortress.net>2022-11-01 21:35:57 +0200
commit2f82430b488878d321276e6efb10c61042ca2930 (patch)
tree34455e48a90eb61f1d814ff2c18cb962c02f89a6 /src/kernel.c
parentAdd uppercase scancodes (diff)
downloadkernel-2f82430b488878d321276e6efb10c61042ca2930.tar.xz
Enable interrupts after enabling the PIC
Diffstat (limited to 'src/kernel.c')
-rw-r--r--src/kernel.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/kernel.c b/src/kernel.c
index 6b3df3f..4698d7a 100644
--- a/src/kernel.c
+++ b/src/kernel.c
@@ -4,11 +4,12 @@
// description: kernel entry point
//=====================================================================
-#include "mem.h"
-#include <stdio.h>
+#include "devices/pic.h"
#include "devices/uart_16550.h"
#include "devices/vga.h"
+#include "mem.h"
#include <conf.h>
+#include <stdio.h>
#include <sys/cpuid.h>
void kmain() {
@@ -16,7 +17,6 @@ void kmain() {
if (uart_init(COM1) != 0) printf("UART self-test failed.\r\n");
printf("glitch [version " VERSION "] [" CC "]\n");
-
{
char vendor[13] = {'\0'};
unsigned int eax;
@@ -26,6 +26,10 @@ void kmain() {
printf("CPU: %s family %u model %u stepping %u\n", vendor, family(v), model(v), v.stepping);
}
+ pic_init();
+ pic_enable();
+ printf("interrupts enabled\n");
+
/*
alloc4M();
char *c = (char *)0xc0700000;