diff --git a/local/docs/LG-GRAM-16Z90TP-COMPATIBILITY-PLAN.md b/local/docs/LG-GRAM-16Z90TP-COMPATIBILITY-PLAN.md index 417634aaca..440acecb85 100644 --- a/local/docs/LG-GRAM-16Z90TP-COMPATIBILITY-PLAN.md +++ b/local/docs/LG-GRAM-16Z90TP-COMPATIBILITY-PLAN.md @@ -1,7 +1,7 @@ # LG Gram 16Z90TP-G.AL89C — Host Compatibility Plan **Created:** 2026-07-20 -**Status:** Planning — no implementation started +**Status:** Implementation in progress — Phases 0, 3.2, 3.4, 3.5, 3.6, 4.1–4.4, 5.0–5.5, 6.1, 9.6 complete; Phase 9.1 partial **Source evidence:** Host dmesg (Linux 7.1.3-1-MANJARO), six-point codebase recon (drivers/PCI-ID inventory, redox-drm Intel state, redbear-iwlwifi state, IOMMU/kernel state, ACPI/power state, USB/input/audio state) @@ -60,7 +60,7 @@ Legend: ✅ = expected to work today (code match + mature path) · 🟡 = code e | Thermal zones | TZ00 | `acpid`+`thermald` | 🟡 | `_TMP`/`_PSV`/`_CRT` + passive cooling via cpufreq works; fan is soft-model only | | CPU freq | ARL-H | `cpufreqd` HWP/EPP | ✅ | Code explicitly notes Arrow Lake-H HWP; MSR path generic | | CPU temp/RAPL | — | `coretempd`, `redbear-power` | ✅ | MSR 0x19C/0x1A2/0x606+; no model gating needed | -| Suspend | S0ix/LPIT | `acpid` s2idle | 🟡→❌ | Prep sequence exists; **no LPIT parser, MWAIT loop unwired, no _PRW wake mgmt**; S3 absent on this host | +| Suspend | S0ix/LPIT | `acpid` s2idle | 🟡→🟡 | Prep sequence exists; **LPIT parser + _PRW wake enumeration + FADT S0-idle detection done** (2026-07-22, acpid/wake.rs); MWAIT loop + GPE wake re-arm remain; S3 absent on this host | | Shutdown/reboot | S5/reset | `acpid`/kernel | ✅ | Implemented; robustness tracked in ACPI-IMPROVEMENT-PLAN | | IOMMU (VT-d) | DMAR | `iommu` daemon | ✅ (safe no-op) | AMD-Vi only; detects DMAR, logs, registers empty scheme; **do not set REDBEAR_DMAR_INIT=1** (gl_sts hang risk) | | LPC/SMBus/SPI/UART/MEI/GNA/VPU/PMC/ISH/TPM | various | — | ❌ | No drivers; none are boot-critical | @@ -83,6 +83,49 @@ is too broad. **Must fix (Phase 0) — add `subclass = 0x00`.** - PCI root ports/LPC/host bridge: bus-layer devices, no userspace driver needed by design. - x2APIC: fully supported; IRQ remapping absence does not block MSI/MSI-X delivery. +### 2.3 ACPICA assessment (2026-07-22) + +**Verdict: Do NOT port ACPICA as a C library. Port its useful data structures and algorithms into the existing Rust stack.** + +ACPICA (~87K lines C + ~9K headers) is Intel's reference ACPI implementation. Porting it +wholesale would create a C dependency in the core ACPI path, violating the project's +Rust-first driver architecture. Instead, we port ACPICA's battle-tested algorithms into +the existing `acpi-rs` vendored fork + `acpid` daemon: + +| ACPICA component | Status | Action | +|---|---|---| +| AML interpreter (acpi-rs) | ✅ Already vendored + Notify fixed | Continue extending opcode coverage | +| LPIT table parser | ✅ Ported (2026-07-22) | `acpid/wake.rs` — LpitInfo::parse() | +| _PRW wake device enumeration | ✅ Ported (2026-07-22) | `acpid/wake.rs` — WakeRegistry::enumerate() | +| FADT S0-idle detection | ✅ Ported (2026-07-22) | `Fadt::supports_s0_idle()` — bit 21 | +| GPE block handling | ✅ Already in acpid/gpe.rs | FADT-driven, write-1-to-clear, enable preserve | +| EC query protocol | ✅ Already in acpid/ec.rs | SCI_EVT poll/IRQ, QR_EC drain, bounded at 32 | +| Fixed event dispatch | ✅ Already in acpid/power_events.rs | PM1_STS PWRBTN/SLPBTN/RTC | +| Sleep/wake (S0ix entry) | 🟡 Partial | `enter_s2idle()` prep exists; MWAIT loop + GPE re-arm remain | +| Namespace management | ✅ In acpi-rs | AmlSymbols with RwLock | +| Table manager (RSDT/XSDT) | ✅ In acpid/acpi.rs | SdtHeader parse + checksum + DSDT/SSDT/FADT/FACS/ECDT | + +### 2.4 pcid assessment (2026-07-22) + +**Verdict: pcid is correct and well-wired. No changes needed.** + +Reviewed `local/sources/base/drivers/pcid/src/main.rs` (411 lines): + +- **Enumeration**: scans buses 0 and 0x80 (Arrow Lake PCH workaround, documented FIXME). + Bridge secondary buses discovered recursively. +- **BAR parsing**: IO/Memory32/Memory64 handled correctly with 64-bit BAR slot skip. +- **Quirks**: PIIX4/PIIX5 IDE legacy-BAR quirk (fixed ports 0x1F0/0x3F6/0x170/0x376/0xC0C0). + vgaarb boot VGA identification (logging). +- **Capability list**: proper `has_capability_list()` check before parsing. +- **ROM BAR**: correct read-modify-write-restore sequence. +- **Device enable**: bus mastering + memory + IO enable. MSI/MSI-X disabled before re-enable. +- **IRQ routing**: legacy IRQ via device-tree-style `interrupt_map` with pin/line mapping. +- **Wiring**: registers `/scheme/pci` via `register_sync_scheme`. Registers with acpid via + `/scheme/acpi/register_pci` for ACPI integration. pcid-spawner spawns drivers on detection. +- **Known limitations** (documented FIXMEs, not bugs): + - Bus 0x80 hardcoded scan (should come from ACPI bus enumeration) + - MCFG only describes first host bridge (multi-CPU systems need ACPI enumeration) + --- ## 3. Boot Path Analysis (redbear-mini on this host) @@ -431,7 +474,7 @@ real wireless connectivity, not bounded simulation. | # | Item | Notes | Effort | |---|---|---|---| -| 9.1 | **Suspend (s2idle) completion**: LPIT parser (ACPI 6.5 §5.2.9.9), MWAIT idle-loop wiring, `_PRW` wake-device enumeration, GPE wake re-arm. The host has **no S3** — this is the only suspend path | `acpid`, kernel idle | L | +| 9.1 | **Suspend (s2idle) completion**: LPIT parser (ACPI 6.5 §5.2.9.9), MWAIT idle-loop wiring, `_PRW` wake-device enumeration, GPE wake re-arm. The host has **no S3** — this is the only suspend path | `acpid`, kernel idle | L → 🟡 PARTIAL (2026-07-22) — LPIT parser + _PRW wake enumeration + FADT S0-idle detection done (acpid/wake.rs); MWAIT idle loop and GPE wake re-arm remain (needs kernel idle-loop support) | | 9.2 | LG WMI hotkeys: WMI subsystem (PNP0C14 GUID dispatch) → brightness/rfkill/volume events → evdev | new `redbear-wmi` | M | | 9.3 | UVC camera: new `redbear-uvcd` (UVC 1.1/1.5) — well-specified; reference Linux `drivers/media/usb/uvc/` | new recipe | L | | 9.4 | ISH sensor hub (8087:0AC2): only if a consumer exists (auto-rotate/ALS). Lowest priority | — | M | diff --git a/local/sources/base b/local/sources/base index cf2abc64b0..a12fb9fc7c 160000 --- a/local/sources/base +++ b/local/sources/base @@ -1 +1 @@ -Subproject commit cf2abc64b00509d5344ca540a17f2d37109dbdee +Subproject commit a12fb9fc7c4da779cc62b4e30ce5b88d9c440196