#include "log.h" #include "vga.h" #include "util.h" __attribute__ ((noreturn)) void panic(const char *filename, uint32_t line, const char *message) { set_log_mode(LOG_PANIC); vga_blank(); logsz("Kernel panic ["); logsz(filename); char nbuf[12] = ":"; u32_dec(line, nbuf + 1); logsz(nbuf); logsz("]: "); logsz(message); logsz("\nHalting."); while (1) asm volatile ("hlt"); }