mirror of
https://github.com/Leonmmcoset/cleonos.git
synced 2026-04-21 10:40:00 +00:00
1.7 KiB
1.7 KiB
CLeonOS Stage24
Stage Goal
- Add a kernel shell command
panic. - Trigger a deliberate kernel panic from shell command input.
- Show a dedicated panic screen in framebuffer mode for manual panic and CPU exceptions.
What Was Implemented
- New panic subsystem:
clks/include/clks/panic.hclks/kernel/panic.c
- Panic subsystem behavior:
- disable interrupts before panic halt
- write panic summary to serial (
-serial stdio) - draw full-screen panic page on framebuffer
- halt forever after panic
- Exception path integration:
clks/kernel/interrupts.cnow routesvector < 32toclks_panic_exception(...)
- Shell integration:
clks/kernel/shell.caddspaniccommandpaniccommand callsclks_panic("MANUAL PANIC FROM KERNEL SHELL")helpoutput includespanic
- Stage banner updated:
CLEONOS Stage24 START
Acceptance Criteria
- Kernel boots and prints
CLEONOS Stage24 START. helplistspanic.- Typing
panicin kernel shell shows panic page and system halts. - Triggering CPU exceptions (if any) also enters the same panic screen flow.
Build Targets
make setupmake userappsmake isomake runmake debug
QEMU Command
qemu-system-x86_64 -M q35 -m 1024M -cdrom build/CLeonOS-x86_64.iso -serial stdio
Common Bugs and Debugging
paniccommand not found:- Confirm
helpoutput containspanicand shell dispatch includesclks_shell_cmd_panic().
- Confirm
- Panic screen not visible but serial has panic logs:
- Ensure framebuffer is available from Limine and
clks_fb_ready()is true.
- Ensure framebuffer is available from Limine and
- Exception still prints old logs instead of panic page:
- Check
clks_interrupt_dispatch()exception branch routes toclks_panic_exception(...).
- Check