aboutsummaryrefslogtreecommitdiff
path: root/kernel/panic.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/panic.c')
-rw-r--r--kernel/panic.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/kernel/panic.c b/kernel/panic.c
index 106141b..3a2ddf1 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -1,2 +1,13 @@
#include "panic.h"
-#include "
+#include <stdio.h>
+
+__attribute__((noreturn)) void panic(const char *str, ...)
+{
+ /* no printf formatting for now */
+ printf("KERNEL PANIC: %s", str);
+ for(;;)
+ {
+ asm("cli");
+ asm("hlt");
+ }
+}