mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-11-01 23:18:21 +00:00
Panic and interrupts
Added a basic kernel panic function and interrupt support for x86_64 (mostly for exception handling)
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
#include <arch/panic.h>
|
||||
#include <stdio.h>
|
||||
|
||||
__attribute((noreturn)) void _panic(char* reason){
|
||||
|
||||
// TODO stack trace and register print
|
||||
|
||||
printf("Kernel panic.\nWhy: %s\nWhere: TODO\nWho: TODO\n", reason);
|
||||
|
||||
while(1){
|
||||
asm("cli;hlt;");
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user