This commit is contained in:
2026-02-25 14:08:27 +01:00
parent 8a8034bd11
commit 4dc05c4151
23 changed files with 554 additions and 66 deletions

View File

@@ -1,3 +1,7 @@
//! Panic handler and diagnostic display.
//!
//! Prints panic information to the kernel log and displays the message on the
//! framebuffer before halting the CPU.
use core::arch::riscv64::wfi;
use alloc::{format, string::ToString};
@@ -6,6 +10,7 @@ use log::error;
use crate::vga::{Color, Vga, FONT_HEIGHT};
#[panic_handler]
/// Kernel panic handler that displays the panic message on the framebuffer and halts.
fn panic(panic_info: &core::panic::PanicInfo) -> ! {
error!("PANIC !");
let mut panic_message = panic_info.message().to_string();