From e1561995d4064847de60daf5342f8e7ff69e7e30 Mon Sep 17 00:00:00 2001 From: Richard Qin Date: Sat, 2 May 2026 01:32:13 +0800 Subject: feat: implement kernel logging and formatted output subsystems --- na/lib/panic.cc | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 na/lib/panic.cc (limited to 'na/lib/panic.cc') diff --git a/na/lib/panic.cc b/na/lib/panic.cc deleted file mode 100644 index 753f910..0000000 --- a/na/lib/panic.cc +++ /dev/null @@ -1,34 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-or-later */ -/* Copyright (C) 2026 Richard Qin */ - -/* - * Kernel Panic — minimal fatal error handler. - * - * Before console_init(): silent death (no UART). - * After console_init(): prints message then halts. - * - * Reference: docs/specs/global_init.md §6 - */ - -#include -#include -#include -#include - -extern "C" [[noreturn]] void kernel_panic(const char* msg, const char* detail) { - arch::cpu::intr_off(); - - early_puts("\n*** KERNEL PANIC: "); - if (msg) { - early_puts(msg); - } - if (detail) { - early_puts(": "); - early_puts(detail); - } - early_puts(" ***\n"); - - while (true) { - arch::cpu::halt_until_interrupt(); - } -} -- cgit v1.2.3