update v2

This commit is contained in:
2025-07-05 14:31:39 +09:00
parent 163ac1668d
commit 152d6de44d
32 changed files with 455 additions and 2121 deletions

27
kernel/src/panic.rs Normal file
View File

@ -0,0 +1,27 @@
//! Panic handler for AIOS v2
use core::panic::PanicInfo;
use crate::console;
#[panic_handler]
fn panic(info: &PanicInfo) -> ! {
console::print("\n!!! KERNEL PANIC !!!\n");
if let Some(location) = info.location() {
console::print("Location: ");
console::print(location.file());
console::print(":");
// TODO: Convert line number to string
console::print("\n");
}
console::print("Message: ");
console::print("Kernel panic occurred\n");
console::print("System halted.\n");
loop {
unsafe {
core::arch::asm!("hlt");
}
}
}