feature: boot.mgr replace hardcoded init sequence with dependency-driven boot manager

Introduce boot.mgr - a self-registering, dependency-ordered boot
initialization framework with barrier-based phasing and glob pattern
matching. Units now declare their own init procedures and dependencies
via registerBoot()/registerBarrier() in their initialization sections,
boot.mgr.run() topologically sorts and executes them.

- Add src/boot/boot.mgr.pas with topoSort, glob matching, barrier
  two-pass algorithm, and boot tree printer
- Gut src/asuro.pas (kmain): now just stores multiboot info, calls
  System.init(), boot.mgr.run, and yield()
- Add initialization sections with registerBoot() to 53 existing units
- Add new units: core.pas, test.pas, driver.storage.boot.pas,
  app.wasm.pas, app.bsod.pas (factored out of asuro.pas)
- Define 9 barrier phases: immediate -> early -> middle -> storage ->
  bus -> device -> bus.late -> late -> final
- Fix xHCI ISR: exclude PRC/WRC from PORTSC change bit clearing to
  prevent race with port reset busy-wait
- Fix driver.bus.usb.core fire_completion_hooks: guard against uint32
  underflow when CompletionHookCount = 0
- Move auto_mount_volumes from device barrier to late barrier so it
  runs after PCI scan discovers storage controllers
- Add toolchain/compile_initcalls.sh for boot entry extraction
- Add Boot Registration sections to all 51 doc files; create 4 new
  doc files; rewrite boot.mgr.md; update mkdocs.yml nav
This commit is contained in:
t3hn3rd committed 2026-03-13 15:37:43 +00:00
1 parent dd56ffbcb4
commit 2d190c221a
116 files changed
+1922 -465

No files matched your search

+8
View File
@@ -106,8 +106,10 @@ nav:
- Loader: src/arch/x86/proc/arch.x86.proc.loader.md
- Scheduler: src/arch/x86/proc/arch.x86.proc.sched.md
- Boot:
- Boot Manager: src/boot/boot.mgr.md
- Splash Screen: src/boot/boot.splash.md
- Core:
- Core Init: src/core/core.md
- Types: src/core/core.types.md
- Version: src/core/core.version.md
- Utilities: src/core/core.util.md
@@ -188,6 +190,7 @@ nav:
- Storage:
- Types: src/driver/storage/driver.storage.types.md
- Manager: src/driver/storage/driver.storage.mgr.md
- Boot Drive: src/driver/storage/driver.storage.boot.md
- VFS: src/driver/storage/driver.storage.vfs.md
- File Descriptor Table: src/driver/storage/driver.storage.fdtable.md
- File Dispatch: src/driver/storage/driver.storage.filedispatch.md
@@ -234,6 +237,8 @@ nav:
- RTC: src/driver/timer/driver.timer.rtc.md
- Experimental:
- Test Driver: src/driver/exp/driver.exp.testdriver.md
- Test:
- Test Runner: src/test/test.md
- Services:
- Graphics Daemon: src/svc/svc.gfxd.md
- USB Daemon: src/svc/svc.usbd.md
@@ -258,6 +263,7 @@ nav:
- Volume Commands: src/app/app.volcmd.md
- Virtual Terminal: src/app/app.vterminal.md
- WebAssembly:
- Init: src/app/wasm/app.wasm.md
- Runner: src/app/wasm/app.wasm.runner.md
- I/O: src/app/wasm/app.wasm.io.md
- Shim: src/app/wasm/app.wasm.shim.md
@@ -299,3 +305,5 @@ nav:
- Tracer: planning/tracer.md
- VFS: planning/vfs.md
- WASM: planning/wasm.md
- JSON: planning/json.md
- WebGPU: planning/webgpu.md