LG Gram Round 3: kernel SMBIOS scan + IRQ1 skip override + page-fault fix
ALL FOUR SystemQuirkFlags consumers are now wired end-to-end. Round 3 completes the LG Gram consumer-wiring work that was deferred from Round 1 (acpi_irq1_skip_override was the only remaining flag without a consumer). The kernel-side implementation required new infrastructure: New kernel module src/acpi/smbios.rs (~320 lines): - Early-boot SMBIOS / DMI table scanning - Scans 0xF0000-0xFFFFF for _SM3_/_SM_ anchor - Validates checksums, walks structure table - Extracts sys_vendor + product_name + board_name + board_vendor - Defensive: no panics, all errors return None - Runs before Madt::init() so identity is available when ioapic processes IRQ source overrides ioapic.rs wiring (submodule/kernel commit198e59c4): - IRQ1_SKIP_OVERRIDE_VENDORS table: ['LG Electronics'] - should_skip_irq1_override() consults SMBIOS_INFO - handle_src_override: skip IRQ1 ActiveHigh override on matching platforms — keeps DSDT's ActiveLow so i8042 keyboard IRQ fires Kernel page-fault todo!() fix (submodule/kernel commitbb4a97ec): - Two todo!() bombs in memory/mod.rs page fault correction path replaced with warn! + SIGSEGV delivery - Err(PfError::Oom) no longer panics the kernel under memory pressure - Err(PfError::NonfatalInternalError) no longer panics on consistency issues (the name says 'nonfatal') Broad stub sweep across all 8 source forks: - bootloader, installer, redoxfs, userutils, syscall, libredox: 0 stubs - kernel: 2 x86-relevant todo!() fixed; 6 remaining are riscv64/aarch64 (not x86 target) - relibc: 43 unimplemented!() are mostly in commented-out code (awaiting locale_t); active ones are upstream POSIX gaps Build verification deferred per operator directive.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# LG Gram 16Z90TP-G.AL89C — Host Compatibility Plan
|
||||
|
||||
**Created:** 2026-07-20
|
||||
**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. **Round 1 (2026-07-26): `SystemQuirkFlags` consumer wiring landed end-to-end** — `force_s2idle`, `no_legacy_pm1b`, `kbd_deactivate_fixup` now drive real behaviour in acpid and ps2d (`acpi_irq1_skip_override` awaits kernel IRQ-setup work). `load_dmi_acpi_quirks()` stub replaced with real loader; `PANEL_ORIENTATION_TABLE` populated with 10 real Linux DRM entries; misleading "stub" docstring on `try_load_existing()` reframed. **Round 2 (2026-07-26): pre-existing build blockers fixed** (relibc edition-2024 unsafe-block in `epoll::convert_event`; acpid `common` path was using depth-3 notation from a depth-2 crate). **Lid-switch wired symmetrically**: close → `enter_s2idle()`, open → `exit_s2idle()` (idempotent per ACPI 6.5 §3.5.3). Kernel `acpi_irq1_skip_override` consumer deferred to Round 3 (needs SMBIOS scan + build verification). See `local/docs/evidence/lg-gram/ASSESSMENT-2026-07-26.md`.
|
||||
**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. **Round 1 (2026-07-26): `SystemQuirkFlags` consumer wiring landed end-to-end** — `force_s2idle`, `no_legacy_pm1b`, `kbd_deactivate_fixup` now drive real behaviour in acpid and ps2d. `load_dmi_acpi_quirks()` stub replaced with real loader; `PANEL_ORIENTATION_TABLE` populated with 10 real Linux DRM entries. **Round 2 (2026-07-26): pre-existing build blockers fixed** (relibc edition-2024 unsafe-block; acpid `common` path depth bug). **Lid-switch wired symmetrically**: close → `enter_s2idle()`, open → `exit_s2idle()`. **Round 3 (2026-07-26): kernel SMBIOS scan + `acpi_irq1_skip_override` consumer landed** — new `acpi/smbios.rs` module (~320 lines) extracts sys_vendor/product_name/board_name at boot; `ioapic::handle_src_override` now skips IRQ1 ActiveHigh override on LG Electronics platforms (Linux `irq1_level_low_skip_override[]` pattern). Kernel page-fault `todo!()` bombs replaced with SIGSEGV delivery. ALL FOUR `SystemQuirkFlags` consumers now wired end-to-end. See `local/docs/evidence/lg-gram/ASSESSMENT-2026-07-26.md`.
|
||||
**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)
|
||||
|
||||
@@ -1,11 +1,79 @@
|
||||
# LG Gram 16Z90TP-G.AL89C — Compatibility Assessment (2026-07-26)
|
||||
|
||||
**Round:** 2 of N
|
||||
**Scope:** Fix pre-existing build blockers (relibc + base path), wire lid-closed + lid-open → s2idle symmetrically, scan for additional stubs.
|
||||
**Round:** 3 of N
|
||||
**Scope:** Wire `acpi_irq1_skip_override` kernel-side consumer (deferred from Round 2), replace kernel `todo!()` bombs, broad stub sweep across all source forks.
|
||||
**Methodology:** Plan doc cross-checked against full code inventory by explore agent across 15 subsystems + CHANGELOG history + HARDWARE-VALIDATION-MATRIX + boot-logs + evidence directories.
|
||||
|
||||
---
|
||||
|
||||
## Round 3 deliverables (landed 2026-07-26)
|
||||
|
||||
### Kernel SMBIOS scan + `acpi_irq1_skip_override` consumer
|
||||
|
||||
The headline deferred task from Round 2. ALL FOUR `SystemQuirkFlags` consumers are now wired end-to-end:
|
||||
|
||||
| Flag | Consumer | Round |
|
||||
|---|---|---|
|
||||
| `FORCE_S2IDLE` | acpid `set_global_s_state(3)` | Round 1 |
|
||||
| `NO_LEGACY_PM1B` | acpid `set_global_s_state(*)` | Round 1 |
|
||||
| `KBD_DEACTIVATE_FIXUP` | ps2d `Ps2::init()` | Round 1 |
|
||||
| `ACPI_IRQ1_SKIP_OVERRIDE` | kernel `ioapic::handle_src_override` | **Round 3** |
|
||||
|
||||
New kernel module `src/acpi/smbios.rs` (~320 lines):
|
||||
- Minimal SMBIOS / DMI table scanning for early-boot platform identification
|
||||
- Scans 0xF0000-0xFFFFF for `_SM3_`/`_SM_` anchor, validates checksums, walks structure table
|
||||
- Extracts `sys_vendor`, `product_name`, `board_name`, `board_vendor` from Type 1 + Type 2 structures
|
||||
- Defensive: every error returns `None`, no panics, all reads bounds-checked
|
||||
- String lifetimes are `'static` (mapped physical memory is never unmapped)
|
||||
- Runs BEFORE `Madt::init()` so SMBIOS identity is available when ioapic processes IRQ overrides
|
||||
|
||||
ioapic.rs wiring:
|
||||
- New `IRQ1_SKIP_OVERRIDE_VENDORS` table (currently `["LG Electronics"]`)
|
||||
- `should_skip_irq1_override()` consults `SMBIOS_INFO`
|
||||
- `handle_src_override`: if `irq_source == 1` AND polarity is ActiveHigh AND platform matches → skip override
|
||||
- Without this, the LG Gram's i8042 keyboard IRQ stops firing after the MADT override flips it to ActiveHigh
|
||||
|
||||
(kernel commits `198e59c4` + `bb4a97ec` on `submodule/kernel`)
|
||||
|
||||
### Kernel page-fault `todo!()` bombs replaced
|
||||
|
||||
Two `todo!()` calls in the user-space page fault correction path (`memory/mod.rs:1238,1240`) were boot-time bombs:
|
||||
- `Err(PfError::Oom) => todo!("oom")` — panicked kernel under memory pressure
|
||||
- `Err(PfError::NonfatalInternalError) => todo!()` — panicked kernel on internal consistency issues
|
||||
|
||||
Both replaced with `warn!` log + fall-through to SIGSEGV delivery (matching the adjacent `Segv`/`RecursionLimitExceeded` arm). SIGSEGV-to-faulting-process is strictly better than kernel panic; Linux's OOM-killer path is a future-round enhancement.
|
||||
|
||||
(kernel commit `bb4a97ec`)
|
||||
|
||||
### Broad stub sweep across all source forks
|
||||
|
||||
Extended Round 2's sweep to cover `local/sources/{kernel, relibc, bootloader, installer, redoxfs, userutils, syscall, libredox}/`:
|
||||
|
||||
| Fork | `unimplemented!()` / `todo!()` count | Status |
|
||||
|---|---|---|
|
||||
| kernel | 8 → 6 | 2 x86-relevant `todo!()` fixed; remaining 6 are riscv64/aarch64 arch stubs (not x86 target, out of scope) |
|
||||
| relibc | 43 | Mostly in commented-out code (functions awaiting `locale_t` support). Active stubs are upstream POSIX gaps (fenv, time, strings) requiring POSIX implementation expertise. Not Red Bear stubs — upstream active development. |
|
||||
| bootloader | 0 | Clean |
|
||||
| installer | 0 | Clean |
|
||||
| redoxfs | 0 | Clean |
|
||||
| userutils | 0 | Clean |
|
||||
| syscall | 0 | Clean |
|
||||
| libredox | 0 | Clean |
|
||||
|
||||
No Red Bear-original stubs found across any fork. The project's zero-tolerance stub policy is holding.
|
||||
|
||||
### What did NOT change in Round 3
|
||||
|
||||
- LG Gram bare-metal boot validation (Phase 1 — requires hardware + successful build)
|
||||
- Phase 6.2 iwlmld mac80211 ops (multi-week effort, separate scope)
|
||||
- Phase 8 SOF/cAVS audio port (XL effort, separate scope)
|
||||
- Phase 9.1 s2idle MWAIT kernel idle loop (kernel change, separate scope)
|
||||
- External-display detection for lid switch (Linux's `HandleLidSwitchDocked=ignore`)
|
||||
- relibc POSIX function gaps (43 stubs, upstream active development)
|
||||
- Canonical build verification (deferred per operator directive)
|
||||
|
||||
---
|
||||
|
||||
## Round 2 deliverables (landed 2026-07-26)
|
||||
|
||||
### Pre-existing build blockers fixed
|
||||
@@ -159,6 +227,16 @@ The Round 0 explore-agent inventory flagged "single-touch only" for `i2c-hidd` m
|
||||
|
||||
---
|
||||
|
||||
## Round 3 commit map
|
||||
|
||||
| Repo | Branch | Commit | Subject |
|
||||
|---|---|---|---|
|
||||
| RedBear-OS/kernel fork | `submodule/kernel` | `198e59c4` | `acpi+ioapic: kernel SMBIOS scan + acpi_irq1_skip_override wiring` |
|
||||
| RedBear-OS/kernel fork | `submodule/kernel` | `bb4a97ec` | `kernel: replace todo!() in page fault handler with SIGSEGV delivery` |
|
||||
| RedBear-OS (parent) | `0.3.1` | (pending) | `LG Gram Round 3: kernel SMBIOS + IRQ1 skip + page-fault fix + docs` |
|
||||
|
||||
---
|
||||
|
||||
## Round 2 commit map
|
||||
|
||||
| Repo | Branch | Commit | Subject |
|
||||
|
||||
+1
-1
Submodule local/sources/kernel updated: f5baa05d4a...bb4a97ec63
Reference in New Issue
Block a user