danos/system/kernel
Daniel Samson e1605e3235
kernel: contain a fatal fault — name the task, release the BKL before halt
Two gaps a real-hardware crash exposed, both in onException's terminal path (and
the panic path):

- The report was anonymous. Add the faulting task's id + name and whether it
  trapped in ring 3 (a user process) or ring 0 (the trusted base) — so a fatal
  fault says WHAT crashed and WHERE, not just the vector. scheduler gains
  currentIdSafe/currentNameSafe (early-boot-guarded, like currentCpuIndex, so the
  reporter can't fault a second time).

- halt() never released the big kernel lock, so a core that died holding it
  deadlocked every other core spinning in acquire() — the whole machine hangs,
  not just the one core the design promises. The BKL now records its owner
  (architecture.cpuLocal(), a unique per-core token); sync.releaseIfHeldHere()
  frees the lock only if this core holds it, called before halt on both fatal
  paths. Caveat: if we held it mid-mutation the shared state may be inconsistent,
  but letting the other cores + the supervisor keep running is strictly more
  recoverable than a guaranteed total hang.
2026-07-14 09:05:10 +01:00
..
architecture/x86_64 display: framebuffer handoff primitive + service design (D1) 2026-07-14 00:54:56 +01:00
console.zig kernel: route routine status to the log, not the framebuffer console 2026-07-14 08:26:55 +01:00
devices-broker.zig display: framebuffer handoff primitive + service design (D1) 2026-07-14 00:54:56 +01:00
font.psf Re-organize the source tree as a monorepo mirroring the FHS 2026-07-10 12:55:56 +01:00
heap.zig Split the `system` contract into boot-handoff / abi / device-abi 2026-07-10 18:08:51 +01:00
ipc-synchronous.zig M6: FAT read/write filesystem server, mounted into the VFS 2026-07-13 15:05:53 +01:00
ipc.zig Re-organize the source tree as a monorepo mirroring the FHS 2026-07-10 12:55:56 +01:00
irq.zig M15: interrupts for PCI devices (ECAM config space + MSI) 2026-07-10 19:59:09 +01:00
kernel.zig kernel: contain a fatal fault — name the task, release the BKL before halt 2026-07-14 09:05:10 +01:00
log.zig Persist the kernel boot log to the USB FAT volume 2026-07-13 18:18:34 +01:00
pmm.zig M14b: DMA memory (dma_alloc / dma_free) 2026-07-10 19:43:59 +01:00
process.zig display: the compositor service — claim, double-buffer, present (D2) 2026-07-14 01:26:25 +01:00
scheduler.zig kernel: contain a fatal fault — name the task, release the BKL before halt 2026-07-14 09:05:10 +01:00
sync.zig kernel: contain a fatal fault — name the task, release the BKL before halt 2026-07-14 09:05:10 +01:00
tests.zig display: layer client API + the display-demo client (D4) 2026-07-14 01:56:37 +01:00
wall-clock.zig Phase 2d (i): a kernel wall-clock from the CMOS RTC 2026-07-13 20:35:03 +01:00