2024-09-22 03:54:56 -04:00
|
|
|
#include "debug.h"
|
|
|
|
#include "keyboard.h"
|
|
|
|
#include "kprintf.h"
|
|
|
|
#include "power.h"
|
|
|
|
#include "terminal.h"
|
|
|
|
|
|
|
|
void kpanic(const char *format, ...)
|
|
|
|
{
|
|
|
|
va_list va;
|
|
|
|
|
|
|
|
terminal_set_bg_color(VGA_COLOR_BLUE);
|
|
|
|
terminal_clear();
|
|
|
|
va_start(va, format);
|
|
|
|
kvprintf(format, va);
|
|
|
|
va_end(va);
|
|
|
|
kprintf("\n\n");
|
|
|
|
print_stack();
|
|
|
|
kprintf("\n\n");
|
|
|
|
kprintf("PRESS SPACE TO REBOOT");
|
|
|
|
while (terminal_getkey().scan_code != KEY_SPACE)
|
|
|
|
;
|
|
|
|
reboot();
|
2024-09-26 10:18:06 -04:00
|
|
|
}
|