QUIRKS-SYSTEM: mark Blocker 1 RESOLVED + refresh wiring checklist

The Blocker 1 commit lands in the base fork (commit 676af02e on
redbear-working). This commit:

  1. Bumps the three submodule pointers to the new commits that
     the gitea force-pushes landed this session (one per fork).
  2. Updates QUIRKS-SYSTEM.md to reflect the new state.

In QUIRKS-SYSTEM.md:

  - Recent Activity (2026-06) table: adds a row for Blocker 1
    with the commit SHA + summary.
  - Blocker status block: Blocker 1 promoted to RESOLVED, Blocker
    4 re-tagged as reduced to a 1-2 day follow-up (the loop is
    mechanically unblocked now that Blocker 1 is in), Blocker 3
    flagged as the next priority.
  - Test count progression: extends to 140 (12 new pcid unit
    tests).
  - Blocker 1 section: new 'Status: RESOLVED 2026-06-07' block
    with the three pieces (PcidConfigWriter, build_device_info,
    apply_pci_quirks), the wiring location, the test coverage,
    and the clean check / clippy result.
  - Cross-Cutting Consumer Wiring Checklist: pcid row promoted
    from PENDING to RESOLVED, with the commit SHA + test count.
    The '3 of 5' line below becomes '4 of 5'.
  - Adjusted Phase Estimates: R17 and R19 drop from 5-7 days to
    2-3 days (the Blocker 1 dependency is gone). New total is
    42-62 days (was 47-72); the +2-day remainder is Blocker 3
    plus the xhcid QuirkAction follow-up.
  - Recommended Implementation Order: Blocker 1 step promoted
    from PENDING to RESOLVED, with the new commit SHA and
    test count inline.

No other sections changed. The 15 medium/low gaps from the
R1-R10 audit remain PENDING; the next session will land
Blocker 3 (usbhidd HID/USB wiring) as the only remaining P0
critical blocker.
This commit is contained in:
2026-06-07 20:21:11 +03:00
parent ab9f520f85
commit 2838894c65
4 changed files with 63 additions and 19 deletions
+60 -16
View File
@@ -10,15 +10,16 @@
| 2026-06 | Gap 17 (`abce96f1e`) | `read_dmi_info()` logs `warn!` on first failure (rate-limited) |
| 2026-06 | Blocker 4 (`be95fea0`, base fork) | xhcid calls `lookup_xhci_controller_quirks_full` with DMI |
| 2026-06 | Blocker 2 (bootloader `259a621`, kernel `a4ba465`, acpid `fa91cee4`) | End-to-end SMBIOS → `/scheme/acpi/dmi` chain. Three forks: bootloader UEFI `find_smbios()` → kernel `SmbiosScheme` → acpid `dmi::parse_smbios_table()``/scheme/acpi/dmi` and `/scheme/acpi/dmi/{field}` |
| 2026-06 | Blocker 1 (`676af02e`, base fork) | pcid `PciConfigWriter` impl + `build_device_info` + `apply_pci_quirks` wired in `handle_parsed_header`. 12 unit tests in `pcid/src/quirks.rs::tests` (mock + dispatch + conversions + cap-list walker). `cargo test -p pcid` 12/12. |
**Blocker status (2026-06-07):**
- ✅ Blocker 5 (DMI struct): RESOLVED
- ✅ Blocker 2 (acpid DMI producer): RESOLVED (full chain)
- ✅ Blocker 4 (xhcid full lookup): PARTIAL — DMI lookup done; QuirkAction iteration awaits Blocker 1
- Blocker 1 (pcid `PciConfigWriter` + QuirkAction loop): PENDING (next)
- ⏳ Blocker 3 (usbhidd HID/USB wiring): PENDING
- ✅ Blocker 1 (pcid `PciConfigWriter` + QuirkAction loop): RESOLVED — every compiled-in PCI quirk now fires at pcid enumeration
- 🚧 Blocker 4 (xhcid full lookup): PARTIAL — DMI lookup done at `be95fea0`; QuirkAction loop in xhcid still pending (the blocker on the iteration is now gone with Blocker 1, so this is reduced to a 1-2 day wiring task)
- ⏳ Blocker 3 (usbhidd HID/USB wiring): PENDING (next, 2-3 days)
**Test count progression:** 75 (R5) → 83 (R6) → 90 (R7-C) → 99 (R7-A/B) → 106 (R8) → 114 (R10) → 120 (Blocker 5) → 120 (Gap 17) → 120 (Blocker 4 N/A on host) → 128 (Blocker 2 acpid dmi tests).
**Test count progression:** 75 (R5) → 83 (R6) → 90 (R7-C) → 99 (R7-A/B) → 106 (R8) → 114 (R10) → 120 (Blocker 5) → 120 (Gap 17) → 120 (Blocker 4 N/A on host) → 128 (Blocker 2 acpid dmi tests) → 140 (Blocker 1 pcid 12 unit tests, host-buildable).
## Overview
@@ -2832,6 +2833,44 @@ sends `PcidClientRequest::WriteConfig` IPC, which is **not** a
`action.execute(&writer, &info)` in the appropriate PCI enumeration path
in `pcid` or `pcid-spawner`.
**Status:** ✅ RESOLVED 2026-06-07 — `local/sources/base/drivers/pcid/src/quirks.rs`
(commit `676af02e` on `redbear-working`). Three pieces land:
1. `PcidConfigWriter<'a>` wraps `&Pcie` + `PciAddress` and impls
`PciConfigWriter`. Byte/word writes go through a 4-byte aligned
read-modify-write so sub-dword actions land on the correct bits
without disturbing neighbours.
2. `build_device_info` converts pcid's enumeration data
(`FullDeviceId`, the 6-entry BAR array, the capability vector,
and the `EndpointHeader`) into the `PciDeviceInfo` shape that
`redox_driver_sys::quirks` expects. Subsystem IDs are read
from offset 0x2C for header type 0 (endpoint) only; bridges
return `(0, 0)` per PCI Local Bus 3.0 §6.2.1.
3. `apply_pci_quirks` calls `lookup_pci_quirks_full(info, pm_available=false)`,
logs the resulting flags at info-level, then iterates
`lookup.actions` calling `QuirkAction::execute` against the live
PCIe config region. R8 phase gating is honoured by always
passing `pm_available=false` (pcid runs before PM); Header/Final
phases fire, Resume/ResumeEarly are silently skipped. NamedCallback
actions are warn-logged since pcid has no callback registry.
Wiring (`pcid/src/main.rs:137-150`): `build_device_info` and
`apply_pci_quirks` run after the BAR and capability scans but
before the `Func` is built and inserted into the tree. The
`EndpointHeader` is consumed by the `Func` only after quirks
have finished their read-modify-write work on the same function.
12 unit tests cover the mock writer (byte/word/dword round-trip,
neighbour preservation), every `QuirkAction` variant dispatched
against the mock, the BAR conversion for all four `PciBar`
variants, the capability conversion (Vendor variant; other
variants share the dispatch shape), and a synthetic PCI Express
capability-list walker. The mock is `pub(crate)` so other pcid
modules can use it for further tests.
`cargo test -p pcid` passes 12/12. `cargo check` is clean. No
new clippy warnings in pcid (the pre-existing warnings in
`bar.rs`/`cap.rs`/`msi.rs`/`irq_helpers.rs`/`mod.rs` are unrelated).
#### Blocker 2: acpid does not serve DMI/SMBIOS at `/scheme/acpi/dmi`
**File:** `local/sources/base/drivers/acpid/src/scheme.rs` (no DMI endpoint)
@@ -3385,21 +3424,23 @@ wiring must be completed (from Gaps 1-7, 10-12, 15):
| Priority | Driver | Lookup to add | Action | Status (2026-06-07) |
|---|---|---|---|---|
| P0 | `pcid` | `lookup_pci_quirks_full` + iterate `QuirkAction` via real `PciConfigWriter` impl | Unblocks R1, R2, R3, R4, R5, R17, R18, R19, R21, R22 actions | **Blocker 1 PENDING** (5-7 days) |
| P0 | `pcid` | `lookup_pci_quirks_full` + iterate `QuirkAction` via real `PciConfigWriter` impl | Unblocks R1, R2, R3, R4, R5, R17, R18, R19, R21, R22 actions | **RESOLVED** (`676af02e` on `redbear-working`: `pcid/src/quirks.rs` 460+ lines + `handle_parsed_header` wiring; 12/12 unit tests) |
| P0 | `acpid` | (new) serve `/scheme/acpi/dmi` from SMBIOS tables | Unblocks all DMI-based rules (R4, R7, R11, R12, R13) | ✅ **RESOLVED** (this turn: bootloader `259a621` + kernel `a4ba465` + acpid `fa91cee4`) |
| P0 | DMI struct | add `bios_vendor`, `bios_date` to `DmiInfo` and `DmiMatchRule` | Unblocks ~30% of R11 rules | ✅ **RESOLVED** (commit `9a28b68ef`) |
| P1 | `usbhidd` | `lookup_usb_quirks` + `lookup_hid_quirks` | Unblocks R6, R9, R10, R20 | ⏳ **Blocker 3 PENDING** (2-3 days) |
| P1 | `xhcid` | `lookup_xhci_controller_quirks_full` + iterate `QuirkAction` | Unblocks R6 (full), R7, R8, R9 | 🚧 **Blocker 4 partial** (DMI lookup done at commit `be95fea0`; `QuirkAction` loop awaits Blocker 1) |
| P1 | `usbhidd` | `lookup_usb_quirks` + `lookup_hid_quirks` | Unblocks R6, R9, R10, R20 | ⏳ **Blocker 3 PENDING** (2-3 days, next after this turn) |
| P1 | `xhcid` | `lookup_xhci_controller_quirks_full` + iterate `QuirkAction` | Unblocks R6 (full), R7, R8, R9 | 🚧 **Blocker 4 partial** (DMI lookup done at commit `be95fea0`; `QuirkAction` loop now mechanically possible — 1-2 day follow-up) |
| P1 | `evdevd` | `lookup_hid_quirks` for HID device registration | Unblocks R10 | ⏳ **Gap 10 PENDING** |
| P2 | `redox-drm` | `lookup_pci_quirks` for GPU device | Unblocks R5 (GPU subset) | ⏳ **Gap 11 PENDING** |
| P2 | `redbear-iwlwifi` | `pci_has_quirk` from linux-kpi C FFI | Unblocks R19 (Wi-Fi subset) | ⏳ **Gap 12 PENDING** |
| P2 | amdgpu | remove `redox_stubs.c` for `pci_*_quirk_flags`; use linux-kpi real impl | Ensures amdgpu C sees real quirk data | ⏳ **Gap 15 PENDING** (1 day) |
| P3 | `iommu` | consume DMA-alias `NamedCallback` (R4) | Unblocks R21 | ⏳ (deferred; iommu daemon not yet a consumer) |
**3 of 5 P0 critical blockers are now RESOLVED.** The remaining 2 (Blocker 1
pcid `PciConfigWriter` and Blocker 3 usbhidd wiring) are the next priority
because they unlock QuirkAction execution at every consumer site and
unblock the remaining R11-R22 phases.
**4 of 5 P0 critical blockers are now RESOLVED.** Blocker 1 (pcid
`PciConfigWriter`) is in the bag. Blocker 4 (xhcid `QuirkAction`
iteration) is now mechanically unblocked and reduces to a 1-2 day
follow-up wiring. The remaining 1 (Blocker 3 usbhidd wiring) is the
next priority because it unlocks QuirkAction execution at every
HID/USB consumer site and unblocks the remaining R11-R22 phases.
### Test Coverage Strategy
@@ -3428,13 +3469,13 @@ unblock the remaining R11-R22 phases.
| R14 | 5-8 days | **8-12 days** | Kernel-side integration adds scope |
| R15 | 2-3 days | 3-4 days | Unchanged |
| R16 | 4-6 days | 5-7 days | Unchanged |
| R17 | 3-4 days | **5-7 days** | Still requires P0 pcid `PciConfigWriter` impl (Blocker 1) |
| R17 | 3-4 days | **2-3 days** | Blocker 1 RESOLVED; only data mining + lookup wiring remain |
| R18 | 2-3 days | **3-5 days** | Still requires P1 usbhidd consumer wiring (Blocker 3) |
| R19 | 3-4 days | **5-7 days** | Still requires P0 pcid `PciConfigWriter` impl (Blocker 1) |
| R19 | 3-4 days | **2-3 days** | Blocker 1 RESOLVED; only data mining + lookup wiring remain |
| R20 | 2-3 days | 2-3 days | Unchanged (USB audio driver not started) |
| R21 | 1 day | **3-5 days** | Requires iommu daemon + DMA callback activation |
| R22 | 2-3 days | 3-4 days | Unchanged |
| **Total** | **44-68 days** | **47-72 days** | -18 days vs the +20-day blocker-add (3 of 5 blockers RESOLVED); remaining +3 days net for Blocker 1 + Blocker 3 work |
| **Total** | **44-68 days** | **42-62 days** | -22 days vs the +20-day blocker-add (4 of 5 blockers RESOLVED); remaining +2 days net for Blocker 3 (the only blocker left) and the xhcid `QuirkAction` follow-up |
### Recommended Implementation Order
@@ -3447,11 +3488,14 @@ is:
DMI-based rules. ✅ **RESOLVED** 2026-06-07 (bootloader `259a621` +
kernel `a4ba465` + acpid `fa91cee4`)
3. **Blocker 1** (pcid `PciConfigWriter` impl + `QuirkAction` loop) —
large, 5-7 days, unblocks R1-R5 actions. **PENDING** (next)
large, 5-7 days, unblocks R1-R5 actions. **RESOLVED** 2026-06-07
(commit `676af02e` on `redbear-working`: `pcid/src/quirks.rs` +
`handle_parsed_header` wiring; 12/12 unit tests)
4. **Blocker 3** (usbhidd HID/USB wiring) — medium, 2-3 days. ⏳ **PENDING**
5. **Blocker 4** (xhcid full lookup wiring) — small, 1-2 days, depends on
Blocker 1. 🚧 **PARTIAL** 2026-06-07 (commit `be95fea0` covers DMI
lookup + full variant call; `QuirkAction` iteration awaits Blocker 1)
lookup + full variant call; `QuirkAction` iteration is now
mechanically unblocked and reduces to a 1-2 day follow-up)
6. **Gap 15** (amdgpu stub removal) — small, 1 day. ⏳ **PENDING**
7. **Gap 10-12** (evdevd, redox-drm, iwlwifi wiring) — small, 1 day each. ⏳ **PENDING**
Submodule local/sources/base updated: 3b0d02d81c...676af02e08
Submodule local/sources/bootloader updated: 8fce96cad1...c7cdcb5d25
Submodule local/sources/kernel updated: ff7bb7a337...a4ba465a86