← Back to Pull requests

P1.6: ACPI tables — MADT, HPET and MCFG summary from Limine's RSDP #98

Closed
unknown closed this pull request without merging on Sep 27, 2026 23:55 UTC
View on GitHub
unknown unknown commented on Sep 27, 2026 23:38 UTC
Author

Summary

Plan task P1.6: the kernel reads the ACPI tables and keeps what later tasks need.

Design


  • RSDP comes from Limine's RsdpRequest. The address is treated as HHDM-virtual when it is at or above the HHDM offset, physical otherwise (the protocol's meaning changed across base revisions).

  • Parsing uses the acpi crate 5.x (alloc feature, MIT/Apache, no new transitive deps; cargo deny clean) rather than 6.x, whose handler trait also demands the AML host interface (mutexes, PCI/IO reads, sleep) that the kernel has no use for yet.

  • Handler: tables are reached through the HHDM; if paging::translate shows a page the direct map skipped (as happened for device memory in P1.5), that page is mapped through paging::map_mmio into a 1 MiB bump-allocated window at KERNEL_MMIO_BASE + 1 MiB. Unmap is a no-op: HHDM aliases need none and window pages are few and read once.

  • Summary (platform::acpi::Summary, kept behind a lock): table signatures, RSDP revision, MADT local-APIC address, CPU APIC ids (boot processor first), I/O APICs, HPET base, MCFG ECAM regions (segment, bus range, base) for P1.7.

  • Boot log (QEMU q35, UEFI):

  •   acpi: RSDP at 0x1fec9014 (revision 2), 6 tables: FACP APIC HPET MCFG WAET BGRT
      acpi: MADT: local APIC at 0xfee00000, 1 CPU(s) with APIC id(s) [0] (this CPU: 0), 1 I/O APIC(s) (id 0 at 0xfec00000, GSI base 0)
      acpi: HPET at 0xfed00000
      acpi: MCFG: PCIe segment 0 buses 0-255 ECAM at 0xe0000000
      

    The uefi and bios smoke scenarios now require the acpi: HPET at 0x line.

    Tests (AC: boot log lists APIC id(s) and the HPET address)


  • acpi_summary_lists_apics_hpet_and_ecam: MADT present, at least one CPU whose first APIC id equals the running local APIC's id (apic::id()), an I/O APIC, an HPET base, and an MCFG region for segment 0 starting at bus 0.
  • Verification


    test summary:
      PASS  host unit tests: passed
      PASS  in-kernel tests (QEMU): chisel-test: 14 passed; 0 failed
      PASS  boot smoke (UEFI, BIOS, panic, double fault, page fault, stack overflow, OOM): 7 scenarios passed
    perf: all budgets met
    

    fmt, clippy (host + kernel), cargo deny check, docs-gate clean. PLAN §11 updated (P1.6 done, next P1.7).

    Closes #52
    task: P1.6

    🤖 Generated with Claude Code

    Diff: 289 lines (+216 / -73) across 3 files Reviewer: garrickdabbs Review duration: 16m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.40) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.40 · 289 lines diff across 3 files
    0.40
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    56%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    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.339
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #98"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 39.8% (MEDIUM) · Higher = larger blast radius
    39.8%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 56.8% · Lower = rushed or shallow review
    56.8%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 17.2% · Safe to merge
    17.2%