fix: kpanic clearing registers and hlt correctly

This commit is contained in:
2025-04-21 13:23:56 +02:00
parent 8e2017bd29
commit e15f0af292
3 changed files with 19 additions and 15 deletions

View File

@ -17,6 +17,7 @@ __attribute__((noreturn)) void kpanic(const char *format, ...)
/* terminal_set_bg_color(VGA_COLOR_BLUE); */
/* terminal_clear(); */
kprintf("kpanic: ");
va_start(va, format);
kvprintf(format, &va);
va_end(va);
@ -31,8 +32,5 @@ __attribute__((noreturn)) void kpanic(const char *format, ...)
/* print_stack(); */
/* kprintf("\n\n"); */
/* kprintf("PRESS SPACE TO REBOOT"); */
clear_registers();
while (terminal_getkey().scan_code != KEY_SPACE)
;
reboot();
__asm__ __volatile__("jmp panic");
}