P1.7: PCI(e) enumeration through the MCFG ECAM window #101
All Vouch review confidence checks passed
Residual risk 0.20 = Change Risk (0.42) × (1 − Review Confidence (0.54)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.42 · 336 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 87% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.348
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #101"
general
weight: 0.35
garrickdabbs
Summary
Plan task P1.7, the last of Phase 1: PCI(e) is enumerated through the ECAM window the MCFG (P1.6) describes, and the virtio devices show up by name.
Design
platform::pci::enumerate(&summary.ecam)walks each ECAM region: bus 0 first, then the secondary buses of any PCI-to-PCI bridge (header type 1, register 0x19), devices 0–31, functions 0–7 when the header's multi-function bit is set.base + (bus << 20 | dev << 15 | fn << 12)) is mapped into a single scratch slot atKERNEL_MMIO_BASE + 4 MiB, its header read, and the page unmapped again, so enumeration needs no permanent mappings however many buses the MCFG advertises; drivers map their own device page later from the recordedconfig_phys. Configuration space is device memory, so the MMIO path is the right one here (unlike the ACPI tables in #98). Secondary buses are followed only inside the region's bus range.PciDevice::virtio_namenames virtio-net/blk/rng/console/9p by device id (legacy and modern ids).The
uefiandbiossmoke scenarios now requirevirtio-blkandvirtio-netin the output.pci::devices(); interrupt routing waits for the I/O APIC work in P2.8.Tests (AC: boot log lists virtio-blk and virtio-net devices)
pci_enumeration_finds_virtio_blk_and_net: at least one function, the q35 Intel host bridge at 00:00.0, both virtio devices present, and their class codes agree with their names (mass storage 01, network 02).Verification
fmt, clippy (host + kernel), docs-gate clean. PLAN §11: P1.7 done, Phase 1 complete.
Also fixes the ACPI test assertion message from #100 (lists the parsed table signatures instead of a count).
Closes #53
Closes #100
task: P1.7
🤖 Generated with Claude Code