driver-manager: v3.0 — major assessment + plan realignment to Linux-driver reuse
Assessment (local/docs/evidence/driver-manager/ASSESSMENT-2026-07-22.md) from three parallel audits (pcid layer, linux-kpi binding model, Linux 7.1 PCI core) + full first-hand review: Blockers found: - B1: /scheme/pci/<addr>/bind never existed in pcid — the P3 bind/aer/uevent patches are orphaned (path-fork recipes don't apply patches). Every probe would ENOENT -> defer forever. Resolution: claim collapses into pcid's existing channel ENOLCK exclusivity (the pcid-spawner model) — driver-manager-only change, no fork surgery. - B2: linux-kpi pci_register_driver and driver-manager are two competing claim systems with zero mutual awareness; amdgpu (redox-drm FFI) and redbear-iwlwifi (manual scan CLI) bypass both. linux-kpi covers ~15% of the PCI API surface; MSI is synthetic. - B3: /scheme/pci/pciehp and /scheme/acpi/aer have no producers; both listeners were inert fail-soft loops. Plan v3.0: - Removes stale claims (bind endpoint 'done', pciehp/AER listeners 'done', exclusive_with as 'the CachyOS pattern' — CachyOS actually uses probe-time -ENODEV handoff (ahci->intel-nvme-remap in 6.17.9 patch) + userspace modprobe.d blacklists; modern_tech 'wired' was advisory theater). - New work program: P0 correctness blockers (claim-via-channel, orphan-patch resolution, modern_tech/exec.rs cleanup, QEMU runtime gate) -> LDR Linux-Driver-Reuse (unified claim model, spawned-mode pci_register_driver honoring PCID_CLIENT_CHANNEL, iwlwifi/amdgpu onboarding, linux_loader TOML pipeline, linux-kpi API completion: real MSI via pcid_interface, request_regions, pcie_capability, PM) -> P2 operator/event surface (pcid AER/pciehp producers, scheme bind/unbind/new_id/remove_id/driver_override/rescan endpoints, trigger-based deferred retry) -> P3 policy/hygiene (quirk pass phases, AER recovery actions, per-vendor firmware packaging). - D5 audit gains a Runtime column: no capability counts without a QEMU boot proving it.
This commit is contained in:
+1
-1
@@ -65,7 +65,7 @@ console-to-KDE plan.
|
||||
- `../local/docs/ACPI-IMPROVEMENT-PLAN.md` — ACPI ownership, robustness, validation
|
||||
- `../local/docs/IRQ-AND-LOWLEVEL-CONTROLLERS-ENHANCEMENT-PLAN.md` — PCI/IRQ quality, MSI/MSI-X
|
||||
- `../local/docs/DRM-MODERNIZATION-EXECUTION-PLAN.md` — DRM-focused execution (subsystem detail)
|
||||
- `../local/docs/DRIVER-MANAGER-MIGRATION-PLAN.md` (v2.2, 2026-07-22) — D-Phase (parallel development) + C-Phase (cutover & validation) plan to replace `pcid-spawner` with `driver-manager` (driver-manager built in parallel, not enabled before D5 ratifies; never deletes pcid-spawner; cross-references Linux 7.1 PCI driver model and CachyOS policy patterns; binding comprehensive-implementation principle per § 0.5). **Status v2.2: D-phase fully implemented + ninth-round integrations** — 94 tests passing across `redox-driver-core` (33 lib + 5 dynid) and `driver-manager` (56); 0 audit-no-stubs violations; concurrent probe path invokes the real `Driver::probe()` from worker threads (Arc-shared drivers, priority-ordered candidates incl. dynids, serial-equivalent semantics); redox-target build fixed (`SchemeSync::write` trait match, per-handle `/modalias` results, `syscall::flag` O_* constants); double-claim bug fixed (single pcid bind threaded to spawn); driver registry wired at startup (`exclusive_with` + `/modalias` now functional); real SIGCHLD/SIGHUP handlers installed via `libc::signal`; heartbeat counters + AER `route_to_driver` wired; zero crate-local warnings on host and redox target; pcid_interface reads `REDBEAR_DRIVER_PCI_IRQ_MODE` and `REDBEAR_DRIVER_DISABLE_ACCEL` env vars end-to-end; observability CLI flags `--list-drivers`, `--dry-run`, `--export-blacklist`; SMP worker pool (smart scheduler for serial-vs-concurrent based on device count), C-state/P-state advisors (library), IOMMU/MSI-X/NUMA helpers (library), PciQuirkFlags wired into driver spawn (env vars), runtime PM hooks, AER foundation, hotplug polling-fallback (250ms), `/etc/driver-manager.d/` blacklist consulted at probe, heartbeat publisher (JSON every 5s), AER listener (polls /scheme/acpi/aer), `SharedBlacklist::replace()` for live reload + SIGHUP reload worker, **SIGCHLD reaper thread**, `async_probe` configurable via env, `DRIVER_MANAGER_CONFIG_DIR` env var, six QEMU-functional test scripts, `/modalias` scheme endpoint (write MODALIAS → get driver name back), `linux_loader.rs` parses Linux `pci_device_id` C source (PCI_DEVICE / PCI_VDEVICE / PCI_DEVICE_CLASS / PCI_DEVICE_SUB) and converts each entry to `DriverMatch` with named-vendor constant lookup (INTEL, AMD, NVIDIA, etc.) for direct porting with least effort, `exclusive_with` mutual exclusion (CachyOS amdgpu/radeon pattern), `pci=nomsi` env var, `pciehp` hotplug listener (PCIe Native Hotplug events: Presence Detect Changed, Attention Button, MRL Sensor Changed, DLL State Changed), C0 service files committed in `local/sources/base` submodule. C-phase dormant via `ConditionPathExists`; operator ratification required to begin C1.
|
||||
- `../local/docs/DRIVER-MANAGER-MIGRATION-PLAN.md` (v3.0, 2026-07-22) — D-Phase (parallel development) + C-Phase (cutover & validation) plan to replace `pcid-spawner` with `driver-manager` (driver-manager built in parallel, not enabled before D5 ratifies; never deletes pcid-spawner; cross-references Linux 7.1 PCI driver model and CachyOS; binding comprehensive-implementation principle per § 0.5). **Status v3.0: major assessment round** — see `../local/docs/evidence/driver-manager/ASSESSMENT-2026-07-22.md` (findings B1–G10). The `<addr>/bind` claim endpoint never existed in pcid (P0-1: claim collapses into channel `ENOLCK` exclusivity — the pcid-spawner model); pciehp/AER listeners inert pending pcid producers (P2-1); linux-kpi vs driver-manager claim split unified under the LDR Linux-Driver-Reuse track (spawned-mode `pci_register_driver`, iwlwifi/amdgpu onboarding, linux-kpi API completion); `modern_tech` advisory theater stripped (P0-3); runtime validation is now a hard gate (P0-4). 94 tests passing across `redox-driver-core` (33 lib + 5 dynid) and `driver-manager` (56); 0 audit-no-stubs violations; zero crate-local warnings on host and redox target. Earlier delivered capabilities: concurrent probe path with real `Driver::probe()` from worker threads (Arc-shared drivers, priority-ordered candidates incl. dynids, serial-equivalent semantics); driver registry wired at startup; real SIGCHLD/SIGHUP handlers; heartbeat counters; AER `route_to_driver`; pcid_interface reads `REDBEAR_DRIVER_PCI_IRQ_MODE` and `REDBEAR_DRIVER_DISABLE_ACCEL` env vars end-to-end; observability CLI flags; SMP worker pool; PciQuirkFlags wired into driver spawn; deferred probe; `/etc/driver-manager.d/` blacklist; `/modalias` scheme endpoint; `linux_loader.rs` Linux `pci_device_id` parser; `exclusive_with` mutual exclusion; `pci=nomsi` env var; pciehp/AER event parsers; C0 service files committed in `local/sources/base` submodule. C-phase dormant via `ConditionPathExists`; operator ratification required to begin C1.
|
||||
- `../local/docs/WAYLAND-IMPLEMENTATION-PLAN.md` — Wayland compositor (subsystem detail)
|
||||
- `../local/docs/archived/RELIBC-IPC-ASSESSMENT-AND-IMPROVEMENT-PLAN.md` — relibc IPC surface
|
||||
- `../local/docs/GREETER-LOGIN-IMPLEMENTATION-PLAN.md` — greeter/login design
|
||||
|
||||
Reference in New Issue
Block a user