5fd2e16b8e
Round-two integrations of the driver-manager migration's D-phase.
The policy loader is now active (the redbear-driver-policy package
now actually changes spawn_decision_gate behavior at runtime), the
--concurrent=N CLI flag enables the SMP worker pool, PciQuirkFlags
is wired into actual driver spawn (env vars to the child), and the
two C0 service files have been committed in the local/sources/base
submodule. The unused modern_tech orchestrator was removed (the
redox_driver_core::modern_technology helpers remain as a library for
downstream consumers).
driver-manager (16 tests, was 13):
- config.rs: PciQuirkFlags hints are now passed to the spawned child as
env vars (REDBEAR_DRIVER_PCI_IRQ_MODE=intx_or_msi, REDBEAR_DRIVER_DISABLE_ACCEL=1).
Adds blacklist_match() consult at probe time before spawn_decision_gate.
- main.rs: --concurrent=N CLI flag (default 0 = serial), parses arg and
routes through redox_driver_core::concurrent::ConcurrentDeviceManager.
Loads /etc/driver-manager.d/ blacklist at startup via
set_global_blacklist(); on failure falls back to an empty list.
- policy.rs: new file. BlacklistFile / BlacklistEntry TOML schema,
load_dir() reads .toml/.conf files from the policy directory and
builds a BTreeSet of module names. Missing directory returns empty
(opt-in). Tests cover missing / valid / invalid-file paths.
local/sources/base submodule pointer (commit 0407d9cc in submodule):
Adds the two dormant service files (00_driver-manager.service in
init.d/ and 40_driver-manager-initfs.service in init.initfs.d/).
Both are gated by ConditionPathExists=!/etc/driver-manager.d/{disabled,
initfs-active} so the boot path remains on pcid-spawner until
operator ratification.
redox-driver-core: unchanged library. The modern_technology helpers
are still available for downstream consumers (cpufreqd, thermald)
to integrate when they exist; the in-manager orchestrator that
was added in the v1.3 round has been removed because it wrote JSON
files that nothing read.
§ 0.5 audit-no-stubs.py: 0 violations across 34 files. 52 tests pass
across the three crates.
5.8 KiB
5.8 KiB
Hardware Validation Matrix — Red Bear OS
| Component | QEMU | Bare Metal | Notes |
|---|---|---|---|
| Storage | |||
| AHCI SATA | ✅ | 🔲 | NCQ structure present, not runtime-validated |
| NVMe | 🔲 | 🔲 | Basic driver, no multiqueue |
| virtio-blk | ✅ | N/A | QEMU only |
| Network | |||
| e1000 | 🔲 | 🔲 | ITR structure present, no offload validation |
| rtl8168 | 🔲 | 🔲 | PHY config present, not runtime-tested |
| virtio-net | ✅ | N/A | QEMU only |
| Audio | |||
| Intel HDA | 🔲 | 🔲 | Codec detection + jack sense added, not validated |
| AC97 | 🔲 | 🔲 | Basic driver |
| Input | |||
| PS/2 | ✅ | 🔲 | QEMU keyboard/mouse work |
| USB HID | ✅ | 🔲 | Keyboard/mouse autospawn via test-usb-qemu.sh (P1 hardening); not validated on real HW |
| USB | |||
| xHCI host controller | ✅ | 🔲 | Interrupt-driven mode proven (test-xhci-irq-qemu.sh); 51-flag quirk table + HCCPARAMS2 gating (P2-A/B); 36-code error recovery (P2-C); not HW-validated |
| EHCI/UHCI/OHCI controllers | 🔲 | 🔲 | Compile clean; runtime enumeration proofs planned (P8-B) |
| USB storage (BOT) | ✅ | 🔲 | usbscsid autospawn + bounded sector readback proven (test-usb-storage-qemu.sh); guest-side write verify open |
| USB hub (non-root) | ✅ | 🔲 | Hub + hub-child enumeration proven in QEMU (test-usb-hub-qemu.sh): hub descriptor/EP1/scan/debounce/reset→enable, and usb-kbd behind hub enumerates to HID subdriver (class 3.1 keyboard); "reactor race" root-caused to startup latency under load (not a deadlock) |
| GPU/Display | |||
| VESA | ✅ | 🔲 | QEMU framebuffer works |
| virtio-gpu | ✅ | N/A | 2D only, QEMU |
| CPU/Power | |||
| cpufreqd | 🔲 | 🔲 | Governors implemented, not HW-validated |
| thermald | 🔲 | 🔲 | ACPI thermal zones, not HW-validated |
| SMP | |||
| x2APIC/SMP | ✅ | ✅ | Multi-core works |
| Driver Manager (driver-manager vs pcid-spawner) | |||
| D1 P0 capabilities (C1 dynids + C2 remove + C3 enable + C4 BAR) | ✅ | 🔲 | Code complete; 52 tests pass; see local/docs/evidence/driver-manager/D5-AUDIT.md |
| D1 P1 SpawnDecision + format coexistence + policy blacklist | ✅ | 🔲 | spawn_decision_gate() consults env/CLI/blacklist; convert_legacy reads legacy pcid.d format |
| D1 P1 PciQuirkFlags wired into spawn | ✅ | 🔲 | driver-manager/src/quirks.rs consumes redox-driver-sys; NEED_FIRMWARE defers probe; NO_MSIX/NO_MSI/FORCE_LEGACY_IRQ signal intx-fallback via env; DISABLE_ACCEL signals accel-disable |
D1 P1 /etc/driver-manager.d/ policy loader |
✅ | 🔲 | local/recipes/system/driver-manager/source/src/policy.rs; reads TOML blacklist; consulted at probe |
D2 SMP concurrent probe (worker pool over std::thread::scope) |
✅ | 🔲 | redox-driver-core/src/concurrent.rs with CountingSemaphore; tested on host; opt-in via --concurrent=N |
| D2 PM hooks (Driver::suspend/resume + signal_then_collect) | ✅ | 🔲 | Real SIGTERM/SIGKILL in DriverConfig; needs iommu/pcid SetPowerState wiring for actual D3 |
| D2 AER foundation (Driver::on_error + ErrorSeverity + RecoveryAction) | ✅ | 🔲 | Trait API complete; needs pcid AER wake source |
| D2 C-state / P-state / IOMMU / MSI-X / NUMA helpers | ✅ Library | 🔲 HW | redox-driver-core/src/modern_technology.rs — concrete implementations; no driver-manager wrapper (orchestrator removed at v1.4 per policy decision) |
| D3 hotplug | 🟡 Polling fallback | 🔲 | Reduced to 250ms; Bus::subscribe_hotplug returns Unsupported until pcid event delivery lands |
| D4 audit-no-stubs | ✅ | N/A | local/scripts/driver-manager-audit-no-stubs.py scans 34 files; 0 violations at v1.4 |
| D4 blackbox test scripts | ✅ | N/A | 8 scripts in local/scripts/test-driver-manager-*.sh |
| C0 dormant service files | ✅ | N/A | Committed in local/sources/base submodule (commit 0407d9cc); both ConditionPathExists-gated |
| D5 feature-complete gate | ✅ Code | 🔲 HW | All code + tests pass; awaiting real-hardware validation on AMD Threadripper + Intel Alder Lake |
✅ = validated 🔲 = implemented, not validated N/A = not applicable
Status note (2026-07-20)
- The login-based QEMU proofs (PS/2 + serio, monotonic timer, IOMMU first-use, USB storage BOT)
now run through
local/scripts/qemu-login-expect.py(stdlib python) instead of the hostexpecttool — no external dependency, per-step timeouts, and safe retry on premature QEMU death. Seelocal/docs/IRQ-AND-LOWLEVEL-CONTROLLERS-ENHANCEMENT-PLAN.md§ "Runtime proof status (2026-07-20)". - MSI-X (virtio-net) and xHCI interrupt-driven mode were re-confirmed on the current
redbear-miniISO — once more on 2026-07-20 ~09:10 JST viatest-lowlevel-controllers-qemu.sh(log-grep legs, unaffected by host contention). - Re-confirmation of the login-based legs (PS/2, timer, BOT) with the new
harness is pending an uncontended host — the current build host runs a parallel QEMU-testing
workload (a concurrent agent session under
~/.claude/jobs/with its own QMP-controlled guest) that SIGKILLs competing QEMU processes; boots reach getty but the login prompt is not observed within the timeout there. The ✅ marks above reflect prior validation of those legs. A retry loop (/tmp/opencode/a2-retry.sh) is armed to run the PS/2, timer, and USB-storage legs automatically once the foreign QEMU workload exits. - The IOMMU first-use leg currently skips on
redbear-miniruns becausebuild/x86_64/redbear-full/harddrive.imgis absent — aredbear-fullbuild is required to re-confirm that leg. - Display boots (
-vga std) can freeze at the fbcondPerforming handoffstep (thereopen_for_handoff()path can block rather than returnEAGAINfor retry). Headless (-vga none) boots avoid it. Tracked separately on the graphics stack.