Repository navigation
BooleOS 0.20.0 - Phase 20: Crash handler leads into Safe Mode
BooleOS 0.20.0 - Phase 20: Crash handler leads into Safe Mode
All you need to run it is QEMU; the exact command is in the README.txt inside the ISO package.
booleos-0.20.0-iso-img(originally-nullos).zip: the bootable ISO built from this tag (the image itself still says NullOS, because the project was renamed after this version), the blank disk image when this version has one, and aREADME.txtwith the QEMU command and what this ISO doesbooleos-0.20.0-docs-original.zip: the docs of this version, exactly as they were
Changes
Added
- A crash restarts into Safe Mode. An unhandled CPU exception used to end in
a red screen and ahltloop; nowexception_handler()saves a crash record in
the boot configuration sector (LBA 1, the same one asboot_fail_count), shows
the red screen for ~3 s, and resets the machine (the 8042 pulse, then a triple
fault if it does not answer within ~0.5 s counted on the raw PIT). The next
boot goes straight to Safe Mode with a crash banner (system crashed: #PF Page Fault at EIP 0x...) and a new menu item "6. View last crash details" (exception,
EIP, error code, CR2 and decoded flags for a page fault, uptime). The record
(keyscrash_pending,crash_type,crash_eip,crash_err,crash_cr2,
crash_ticks) is acknowledged by "Reboot normally" and removed after the next
complete normal boot, so entering and leaving Safe Mode never loses it. A crash
that could not be saved (no disk yet, no config sector) halts with the screen
readable, as before, instead of restarting. A second exception during the
handling skips the dump and goes straight to the reset. - The save path depends on nothing that may be broken: polling-only ATA I/O
(ata_crash_read_sector/ata_crash_write_sector,block_*_polled()in the HAL —
no lock, no IRQ, no scheduler, bounded waits, soft reset of a channel left
mid-command), a static buffer, no heap. Newbootcfg_buf_*functions (the text
store on an explicit buffer, hex numbers,bootcfg_remove()),timer_poll_delay_ms(),
power_reboot_request(),exception_name(). - A temporary serial-only trace of every step of the ATA
probe()
([ATADBG], markedTEMP-DEBUG(ata-probe)inkernel/drivers/ata.c) stays in
the kernel to catch the rare intermittent "no disk" at boot (seePROGRESS.md);
it writes to the serial port only. crash <de|pf|gpf>shell command, a debug tool that faults on purpose
(#DE, a read of0xDEADBEEF, #GP) so the whole pipeline can be tested repeatably
withmake run-reboot-test. Documented indocs/safemode.md.
Changed
- Roadmap renumbered: the crash-handler phase took number 20, so every
planned phase after it moved up by one (copy-on-writefork()is now 21,
unlink()22, memory release 23,e100024, AHCI 25, xHCI 26, framebuffer/GUI
27, syscall deprecation 28, audit pass 2 29, polish 30, the DOOM port 31).
References inROADMAP.md,PROGRESS.md, the docs and code comments were
updated; older CHANGELOG entries keep the numbers of their time. power_reboot()was split:power_reboot_request()only pulses the reset line.- Documentation:
docs/safemode.md(the crash handler, the record format, the
flow, how to test),docs/kernel.md,docs/hal.md(the polled block I/O),
docs/shell.md(crash),docs/testing.md(the manual crash test),
docs/setup.md(make run-reboot-testfor the crash test) and the README.
Full history: CHANGELOG.md