feat(ke): logging and consoles

This commit is contained in:
Loïc Grégoire
2026-03-28 01:01:36 -04:00
parent 76e13c3b7a
commit a589b5a56f
7 changed files with 653 additions and 29 deletions
+2 -9
View File
@@ -5,15 +5,8 @@ const ki = ke.private;
/// Panics!
pub fn panic(comptime fmt: []const u8, args: anytype) noreturn {
ki.log.debug_lock.acquire_no_ipl();
// FIXME: this is probably broken.
std.log.err("KERNEL PANIC: " ++ fmt, args);
var buf: [1024]u8 = undefined;
const str = std.fmt.bufPrint(&buf, fmt, args) catch unreachable;
ki.log.print("Panic!\n");
ki.log.print(str);
ki.log.debug_lock.release_no_ipl();
while (true) {}
}