9e7020bc50
Phase R17 (2026-06-07) — Early-boot chipset quirks. The
data side lands now; the kernel-side consumer walks
the table at boot and dispatches to the imperative
handlers (nvidia_bugs, via_bugs, fix_hypertransport_config,
ati_bugs, intel_remapping_check, intel_graphics_quirks,
force_disable_hpet, apple_airport_reset).
Changes:
1. ChipsetQuirkFlags (mod.rs:483) with 10 bits, one
per Linux 7.1 early_qrk[] callback:
QFLAG_APPLY_ONCE, NVIDIA_BUGS, VIA_BUGS,
AMD_K8_NB_FIXUP, ATI_BUGS, ATI_BUGS_CONTD,
INTEL_REMAPPING_CHECK, INTEL_GRAPHICS_QUIRKS,
FORCE_DISABLE_HPET, APPLE_AIRPORT_RESET.
2. ChipsetQuirkEntry (mod.rs:509) — vendor (0xFFFF
any) + device (0xFFFF any) + class + class_mask.
matches() honours the class-mask semantics from
Linux's early-quirks.c (the (class ^ target) & mask
test).
3. CHIPSET FLAG_NAMES + parse_chipset_toml +
load_chipset_flags (toml_loader.rs) — new
[[chipset_quirk]] TOML table type with vendor +
device + class + class_mask + flags.
4. 1 new unit test: phase_r17_chipset_quirk_entry_matches
exercises NVIDIA + AMD K8 class-mask semantics +
5 match / mismatch combinations.
127/127 tests pass.
5. quirks.d/55-chipset-early.toml (110 lines) — 11 entries
sourced from Linux 7.1
arch/x86/kernel/early-quirks.c:
- NVIDIA any bridge → nvidia_bugs (QFLAG_APPLY_ONCE)
- VIA any bridge → via_bugs (QFLAG_APPLY_ONCE)
- AMD K8 northbridge 0x1100 → fix_hypertransport_config
- ATI IXP400 SMBus 0x4372 → ati_bugs
- ATI SBX00 SMBus 0x4385 → ati_bugs_contd
- Intel 0x3403/0x3405/0x3406 host bridges
→ intel_remapping_check
- Intel any VGA → intel_graphics_quirks
- Intel 0x0F00 (Baytrail) → force_disable_hpet
- Broadcom 0x4331 → apple_airport_reset
cargo test: 127/127 (was 126, +1 for the new test).
cargo check: clean.
The kernel early-pci-scan path will call
load_chipset_flags() for each PCI device it walks and
invoke the named handler before any Rust user code.
Compiled-in chipset_table is empty (handler bodies
are imperative and don't fit a data-driven table).