Phase R7 (xHCI closure, multi-session R7-R10 first commit):
* R7-A xHCI TOML layer: brings xHCI to 3-layer parity with PCI
(compiled-in + TOML + DMI). Adds XHCI_CONTROLLER_FLAG_NAMES (28
entries: 19 pre-R6 + 5 R6 + 3 R7-C with chronological markers),
read_toml_xhci_entries(), parse_xhci_toml(),
load_xhci_controller_quirks_toml(), updated
lookup_xhci_controller_quirks() to OR TOML flags, new
lookup_xhci_controller_quirks_full() as 3-layer entry point.
New quirks.d/25-xhci.toml with 8 example entries sourced from
Linux 7.1 xhci-pci.c.
* R7-B DMI xHCI bridge: mirrors the PCI DMI bridge. Linux itself
has no DMI-based xHCI quirks so DMI_XHCI_QUIRK_RULES is empty;
the wiring exists so future DMI rules can be added without
re-architecting. Adds DmiXhciQuirkRule struct,
apply_dmi_xhci_quirk_rules() OR-accumulator, DMI_XHCI_QUIRK_RULES
constant, load_dmi_xhci_quirks() public function,
read_toml_dmi_xhci_toml()/parse_dmi_xhci_toml() in toml_loader
for the new [[dmi_xhci_system_quirk]] section.
* R7-C 3 high-priority xHCI flags (already in 0.2.3 branch from
R7-C stand-alone commit): DEFAULT_PM_RUNTIME_ALLOW (bit 33),
SNPS_BROKEN_SUSPEND (bit 35), RESET_TO_DEFAULT (bit 44). Bit
positions match Linux 7.1 xhci.h:1586-1660 exactly. Six new
PCI entries: AMD 0x43f7, 0x15e0, 0x15e1, Intel 0x9a13/0x51e0/0x54ee.
Seven new R7-C tests.
Phase R8 (PciQuirkPhase data structure, no PM consumers):
* PciQuirkPhase enum: Header, Final, Enable, Resume, ResumeEarly.
Mirrors Linux DECLARE_PCI_FIXUP_* macro family.
* phase: PciQuirkPhase field on PciQuirkEntry. All 31 existing
compiled-in entries default to Final via ..WILDCARD.
* phase_visible(phase, pm_available) helper. Boot-time phases
always visible; Resume/ResumeEarly gated by pm_available.
* lookup_pci_quirks_full_with_pm() public function gates all
three layers. load_pci_quirks() defaults to pm_available=false
for safe existing-caller behavior.
* TOML parser reads phase = "header"|"final"|"enable"|"resume"
|"resume_early" per [[pci_quirk]] entry. Unknown/omitted
defaults to Final (graceful degradation).
* Seven R8 tests: header/resume/resume_early parse, omitted default,
unknown default, boot-phase visibility, resume-phase gating.
Phase R9 (USB storage gap closure, data-only):
* Resynced 30-storage.toml header to reference Linux 7.1 (was 7.0).
* Fixed one entry: VIA Labs VL817 SATA Bridge (0x2109:0x0715)
revision was "9999-9999" — corrected to wildcard "0000-9999"
to match Linux UNUSUAL_DEV(0x2109, 0x0715, 0x0000, 0x9999, ...).
* Verification: python3 local/scripts/extract-linux-quirks.py
local/reference/linux-7.1/drivers/usb/storage/unusual_devs.h
produces 214 entries. diff against 30-storage.toml = 0 lines.
The R1-R6 review's "108 missing" estimate was stale; the file
is in full sync with Linux 7.1.
Test count: 90 (R7-C) + 9 (R7-A, R7-B) + 7 (R8) = 106/106 passing.
No new clippy warnings beyond two Result<_, ()> stylistic lints
that follow the existing convention (7+ functions use this pattern).
Consumer wiring status: BROKEN_MSI consumer in xhcid main.rs:69,
ZERO_64B_REGS consumer in xhci/mod.rs:524,542. R7-C and R7-A new
flags are observability-only via log_unenforced_xhci_quirks()
(R6) until xhcid's suspend/resume path lands.
Deferred to next session: R10 HID infrastructure (24 flags +
500 entries) and any R7/R8 PM execution work when PM lands.
Multi-session plan: this is the first of 4 atomic commits for
R7-R10. R10 HID lands in a separate session.
Phase R6 (2026-06-07) extends the xHCI controller quirk layer with five
new XHCI_* bit positions from Linux 7.1's drivers/usb/host/xhci.h, three
new PCI table entries from xhci-pci.c, and an xhcid-side observability
hook for the unenforced flags. Bit positions match Linux exactly per
the existing docstring convention on XhciControllerQuirkFlags.
Five new xHCI flags (24 total, no collisions):
- XHCI_SSIC_PORT_UNUSED (bit 22) — Intel Cherryview 0x22b5
- XHCI_MISSING_CAS (bit 24) — Intel CV/SP/APL/DV
- XHCI_BROKEN_PORT_PED (bit 25) — platform-only in Linux
- XHCI_HW_LPM_DISABLE (bit 29) — platform-only in Linux
- XHCI_BROKEN_D3COLD_S2I (bit 41) — AMD Renoir 0x1639
XHCI_EP_CTX_BROKEN_DCS (bit 42) was the fifth entry on the plan's list
but is a Linux reserved-but-unused bit: only the BIT_ULL(42) definition
exists, with no consumer code anywhere and no PCI/vendor association.
Adding it would have been a stub. XHCI_SSIC_PORT_UNUSED is added in its
place — it has both a PCI association and a consumer site.
PCI table entries (3 new, 89 total):
- Intel Cherryview 0x22b5 → SSIC_PORT_UNUSED + MISSING_CAS
- AMD Renoir 0x1639 → BROKEN_D3COLD_S2I
BROKEN_PORT_PED and HW_LPM_DISABLE have no PCI entries — Linux sets
these only from xhci-plat.c / xhci-mtk.c / xhci-histb.c (non-PCI host
adapters). They are defined for forward-compatibility with future
platform xHCI support.
xhcid consumer wiring (in local/sources/base submodule):
- log_unenforced_xhci_quirks() called from Xhci::init() emits a
warn! line for each set-but-unenforced R6 flag, citing the Linux
consumer site and the missing Red Bear code path. Observability,
not fake enforcement.
- Real enforcement for consumer sites that require suspend, LPM,
port-disable, or CAS code paths in xhcid is deferred to Phase R8
(PM infrastructure) and follow-up work.
Tests: 8 new (75 → 83 total passing).
Clippy: 26 warnings, all pre-existing R0–R5 baseline. No new warnings.
TOML validator: 244 entries, 0 undefined (no TOML changes for R6 —
xHCI controller flags are compiled-in only).
Source of truth: Linux 7.1 drivers/usb/host/{xhci.h, xhci-pci.c,
xhci.c, xhci-hub.c, xhci-plat.c, xhci-mtk.c, xhci-histb.c}.
Extract protocol-agnostic FenceTimeline from Intel to shared
src/drivers/fence.rs — atomic-based fence tracking suitable
for Intel, VIRGL, and AMD drivers.
Extract protocol-agnostic SyncobjManager from Intel to shared
src/drivers/syncobj.rs — syncobj create/destroy/signal/reset/
wait/query and sync_file fd export/import.
Wire both into VirtioDriver:
- Add FenceTimeline + SyncobjManager fields
- Implement all 5 GpuDriver syncobj trait methods
(create, destroy, wait, export_fd, import_fd)
- Track fence seqnos in virgl_submit_3d (allocate
before submit, signal after completion)
Intel fence.rs and syncobj.rs converted to thin re-export
modules pointing at shared sources — no behavioral change
for Intel driver.
This gives Mesa VIRGL userspace the standard DRM syncobj
API for GPU/compositor synchronization.
Version 2.0 — reflects current state after ~100 commits:
66 compiled modules, 125 total .rs files, ~20,000 lines
19 dead modules wired, EOI fix, all 8 phases complete
GEM 81% Linux coverage, all 7 PHY types, DP 2.1 + HDMI 2.1
Integration gaps documented with mitigation status
The cross-compiler's GCC built-in stddef.h is blocked by relibc's
_STDDEF_H guard, causing size_t/off_t/ptrdiff_t to be undefined.
Add fix_types.h with guarded typedefs and force-include via CPPFLAGS.
Also: comprehensive upstream relibc comparison for systematic import.
Remaining: redoxer env overrides CC, injecting broken stdint typedefs
from its toolchain. This needs a redoxer-level fix to clean the
injected flags before passing to build commands.
Lines 649-651 had VramManager and info!() calls that don't belong
in handle_irq(). These were likely from a bad merge. The variables
fb_phys and fb_size are local to new() and don't exist in handle_irq().
Extracted from local/reference/linux-7.1/drivers/gpu/drm/i915/:
- Panel backlight: BLC_PWM_CTL/CTL2 register layouts, PWM frequency
formulas for all platforms (Gen2 through BXT/CNP), enable/disable sequences
- Panel power sequencing: PP_STATUS/PP_CONTROL/PP_*_DELAYS/PP_DIVISOR
register offsets and bit layouts, power-on/off/VDD sequences, delay computation
- GPU hang detection: ACTHD comparison, ring head/tail tracking,
hangcheck state machine, timeout thresholds
- GPU engine reset: GEN6_GDRST/GEN8_GDRST/RING_RESET_CTL register
definitions, per-engine reset sequences for Gen8+, global reset flows,
platform variations (Gen2 through MTL+)
Intended as technical reference for Intel driver implementation in
local/recipes/gpu/redox-drm/source/src/drivers/intel/.
Comprehensive 6-phase plan (1,055 lines) for updating the Intel GPU driver from current 1,590-line stub to full Gen9+ support ported from Linux 7.1 i915. Covers register abstraction, GMBUS I2C, DMC firmware, power wells, CDCLK, display pipeline, modesetting, and hardware validation.
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Define 4 hardware target classes (AMD/Intel desktop/laptop),
per-target checklist, negative-result capture format, and
quick/full test procedures. Ready for bare-metal evidence.
- git rm 50 stale .bak patch backup files (surviving across 4+ sessions)
- Update WAYLAND-IMPLEMENTATION-PLAN.md: acknowledge kded6 offscreen
workaround is temporary until Qt6 Wayland null+8 crash is fixed.
kded6 is a headless D-Bus daemon — Wayland adds no functionality.
This addresses Oracle verification gaps: stale doc cleanup now committed,
doc/code contradiction resolved by acknowledging the temporary nature
of the kded6 offscreen workaround.
- git rm 50 stale .bak patch backup files (surviving across 4+ sessions)
- Update WAYLAND-IMPLEMENTATION-PLAN.md: acknowledge kded6 offscreen
workaround is temporary until Qt6 Wayland null+8 crash is fixed.
kded6 is a headless D-Bus daemon — Wayland adds no functionality.
This addresses Oracle verification gaps: stale doc cleanup now committed,
doc/code contradiction resolved by acknowledging the temporary nature
of the kded6 offscreen workaround.
- WAYLAND-IMPLEMENTATION-PLAN.md v2.0: document architecture decision
that Wayland is the only supported display path. Remove all
framebuffer fallback workarounds (offscreen QPA, redox QPA shim).
- qwaylanddisplay.cpp: add fprintf instrumentation for crash diagnosis;
skip xkb_context_new on Redox to eliminate potential xkb crash vector.
- greeter-ui/main.cpp: remove QT_QPA_PLATFORM=redox workaround.
The greeter must use Wayland. Accept the crash until Qt6 is fixed.
- Ruled out: relibc calloc (zeroes correctly), libwayland proxy_create
(correct), compositor protocol (compliant). Root cause is in Qt6
generated Wayland wrappers passing NULL to wl_proxy_add_listener.
- WAYLAND-IMPLEMENTATION-PLAN.md v2.0: document architecture decision
that Wayland is the only supported display path. Remove all
framebuffer fallback workarounds (offscreen QPA, redox QPA shim).
- qwaylanddisplay.cpp: add fprintf instrumentation for crash diagnosis;
skip xkb_context_new on Redox to eliminate potential xkb crash vector.
- greeter-ui/main.cpp: remove QT_QPA_PLATFORM=redox workaround.
The greeter must use Wayland. Accept the crash until Qt6 is fixed.
- Ruled out: relibc calloc (zeroes correctly), libwayland proxy_create
(correct), compositor protocol (compliant). Root cause is in Qt6
generated Wayland wrappers passing NULL to wl_proxy_add_listener.
Phase S1 (Critical Correctness):
- sem_open/sem_close: global refcounting via BTreeMap + AtomicUsize
- sem_close: decrements refcount, munmaps only at zero
- sem_open: reuses existing mapping, O_EXCL returns EEXIST
- sem_unlink: marks entry for removal before shm_unlink
- va_list parsing: reads mode_t and value from stack after oflag
- All 11 sem_* functions verified in libc.so T
Phase S2-S4 (Designed, documented):
- eventfd() function, signalfd read path, EINTR handling
- name canonicalization, cancellation safety
- Full plan in local/docs/RELIBC-AGAINST-GLIBC-ASSESSMENT.md
Reference: glibc 2.41 cloned to local/reference/glibc/
Boot verified: greeter ready on VT 3 with refcounted semaphores
Phase S1 (Critical Correctness):
- sem_open/sem_close: global refcounting via BTreeMap + AtomicUsize
- sem_close: decrements refcount, munmaps only at zero
- sem_open: reuses existing mapping, O_EXCL returns EEXIST
- sem_unlink: marks entry for removal before shm_unlink
- va_list parsing: reads mode_t and value from stack after oflag
- All 11 sem_* functions verified in libc.so T
Phase S2-S4 (Designed, documented):
- eventfd() function, signalfd read path, EINTR handling
- name canonicalization, cancellation safety
- Full plan in local/docs/RELIBC-AGAINST-GLIBC-ASSESSMENT.md
Reference: glibc 2.41 cloned to local/reference/glibc/
Boot verified: greeter ready on VT 3 with refcounted semaphores