#include "../common.h" #include #include "../uart.h" void panic(const char *format, ...) { uart_puts("Kernel panic!"); uart_puts("Reason:"); va_list args = nullptr; va_start(args, format); // Print the reason uart_vprintf(format, args); va_end(args); // Hang asm volatile("wfi"); }