From 16abfdec5684a915cc4436dfa5bdcb2b095ecf99 Mon Sep 17 00:00:00 2001 From: Vasilito Date: Sat, 18 Apr 2026 21:38:31 +0100 Subject: [PATCH] Refine subsystem planning docs --- docs/02-GAP-ANALYSIS.md | 2 +- local/docs/AMD-FIRST-INTEGRATION.md | 7 ++++--- local/docs/DBUS-INTEGRATION-PLAN.md | 8 ++++---- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/docs/02-GAP-ANALYSIS.md b/docs/02-GAP-ANALYSIS.md index 0abc8162..d0e9e3f9 100644 --- a/docs/02-GAP-ANALYSIS.md +++ b/docs/02-GAP-ANALYSIS.md @@ -19,7 +19,7 @@ Use the matrix below as the authoritative phase summary before reading the older | Layer / Phase | Current repo state | Evidence | |---|---|---| -| P0 ACPI / bare-metal boot | **Materially complete for boot baseline.** Implemented: kernel RSDP/RSDT/XSDT/MADT/FADT parsing, typed `StartupError` in `acpid`, AML mutex real state (`aml_physmem.rs`), EC widened accesses via byte transactions (`ec.rs`), kstop-based shutdown eventing (kernel registers `/scheme/kernel.acpi/kstop`, `acpid` subscribes, `redbear-sessiond` emits D-Bus `PrepareForShutdown`). Sleep state transitions (`\_Sx` beyond `\_S5`) and sleep eventing are **known gaps**. DMAR module present in `acpid` but not wired; effectively owned by `iommu` daemon. | `local/docs/ACPI-FIXES.md`, `local/docs/ACPI-IMPROVEMENT-PLAN.md`, `local/patches/kernel/redox.patch`, `local/patches/base/redox.patch`, `recipes/core/base/source/drivers/acpid/src/main.rs`, `recipes/core/base/source/drivers/acpid/src/aml_physmem.rs`, `recipes/core/base/source/drivers/acpid/src/ec.rs`, `local/recipes/system/redbear-sessiond/source/src/acpi_watcher.rs` | +| P0 ACPI / bare-metal boot | **Materially complete for the historical boot baseline, not release-grade complete.** Implemented: kernel RSDP/RSDT/XSDT/MADT/FADT parsing, typed `StartupError` in `acpid`, AML mutex real state (`aml_physmem.rs`), EC widened accesses via byte transactions (`ec.rs`), kstop-based shutdown eventing (kernel registers `/scheme/kernel.acpi/kstop`, `acpid` subscribes, `redbear-sessiond` emits D-Bus `PrepareForShutdown`). Sleep state transitions (`\_Sx` beyond `\_S5`) and sleep eventing are **known gaps**. DMAR module remains present in `acpid` but not wired; ownership is still transitional/orphaned rather than cleanly transferred. Bare-metal validation remains bounded rather than broad. | `local/docs/ACPI-FIXES.md`, `local/docs/ACPI-IMPROVEMENT-PLAN.md`, `local/patches/kernel/redox.patch`, `local/patches/base/redox.patch`, `recipes/core/base/source/drivers/acpid/src/main.rs`, `recipes/core/base/source/drivers/acpid/src/aml_physmem.rs`, `recipes/core/base/source/drivers/acpid/src/ec.rs`, `local/recipes/system/redbear-sessiond/source/src/acpi_watcher.rs` | | P1 driver infrastructure | Complete in-tree, compile-oriented | `local/recipes/drivers/redox-driver-sys/`, `local/recipes/drivers/linux-kpi/`, `local/recipes/system/firmware-loader/` | | P2 DRM / AMD+Intel display | Complete in-tree, hardware validation pending | `local/docs/P2-AMD-GPU-DISPLAY.md`, `local/recipes/gpu/redox-drm/`, `local/recipes/gpu/amdgpu/` | | P3 POSIX + input | Implemented in-tree; consumer-visible `signalfd`/`timerfd`/`eventfd`/`open_memstream` header-export path fixed in this repo pass; runtime validation still pending | `recipes/core/relibc/source/src/header/`, `recipes/core/relibc/source/include/sys/signalfd.h`, `local/patches/relibc/`, `local/recipes/system/evdevd/`, `local/recipes/system/udev-shim/` | diff --git a/local/docs/AMD-FIRST-INTEGRATION.md b/local/docs/AMD-FIRST-INTEGRATION.md index 9c7bcb0d..ac0c159e 100644 --- a/local/docs/AMD-FIRST-INTEGRATION.md +++ b/local/docs/AMD-FIRST-INTEGRATION.md @@ -40,7 +40,7 @@ take 5+ years. |-----------|--------|--------| | UEFI boot | ✅ Works | x86_64 UEFI bootloader functional | | AMD CPUs | ✅ Works | AMD 32/64-bit supported, Ryzen Threadripper verified | -| ACPI | ✅ Boot-baseline complete | RSDP/SDT checksums, MADT types 0x4/0x5/0x9/0xA, LVT NMI, FADT shutdown/reboot; see `local/docs/ACPI-IMPROVEMENT-PLAN.md` for remaining ownership, robustness, and validation work | +| ACPI | ✅ Boot-baseline complete | RSDP/SDT checksums, MADT types 0x4/0x5/0x9/0xA, LVT NMI, FADT shutdown/reboot; historical bring-up goal met, but not release-grade complete; see `local/docs/ACPI-IMPROVEMENT-PLAN.md` for remaining ownership, robustness, sleep-state, and validation work | | x2APIC | ✅ Works | Auto-detected via CPUID, APIC/SMP functional | | HPET | ✅ Works | Timer initialized from ACPI | | IOMMU | 🚧 In progress | `iommu` daemon now builds, auto-discovers common IVRS table paths, reaches unit detection plus `scheme:iommu` registration in the QEMU/AMD-IOMMU validation path, and now has a guest-driven first-use self-test that initializes both discovered units and drains events successfully in QEMU; real hardware validation is still missing | @@ -65,8 +65,9 @@ Before any GPU or desktop work, Redox must boot reliably on modern AMD hardware. **Historical problem**: Framework AMD Ryzen 7040 crashed because the early ACPI boot baseline was incomplete. -**Current status**: This historical P0 boot-baseline gap is materially complete. The remaining ACPI -work is no longer "make AMD machines boot at all"; it is now ownership cleanup, robustness, +**Current status**: This historical P0 boot-baseline gap is materially complete for the AMD bring-up +goal, but it should not be read as release-grade ACPI completeness. The remaining ACPI work is no +longer "make AMD machines boot at all"; it is now ownership cleanup, robustness, sleep-state scope, consumer integration, and validation depth as tracked in `local/docs/ACPI-IMPROVEMENT-PLAN.md`. **What was done**: diff --git a/local/docs/DBUS-INTEGRATION-PLAN.md b/local/docs/DBUS-INTEGRATION-PLAN.md index cd9d11c9..e7096a0c 100644 --- a/local/docs/DBUS-INTEGRATION-PLAN.md +++ b/local/docs/DBUS-INTEGRATION-PLAN.md @@ -363,8 +363,8 @@ device access control, session management, and power signaling. | `TakeControl(force)` | Records compositor ownership; no kernel-level operation needed (seatd already provides seat arbitration) | | `Activate()` | Sets session as active; signals to compositor via D-Bus | | `SwitchTo(vt)` | Delegates to `inputd -A ` (existing Redox VT switching) | -| `PrepareForSleep` | Generated from ACPI sleep signal via `scheme:acpi` | -| `PrepareForShutdown` | Generated from ACPI shutdown signal via `scheme:acpi` | +| `PrepareForSleep` | Future/conditional: only available once ACPI sleep eventing exists; currently a known gap in the ACPI stack | +| `PrepareForShutdown` | Generated from the current ACPI-backed shutdown signal path via `scheme:acpi` / `kstop` | #### Device Number Mapping @@ -588,14 +588,14 @@ APIs, which relibc provides. | 3.1 | Implement `redbear-upower` — minimal UPower D-Bus service | Registers `org.freedesktop.UPower`, enumerates power devices from `scheme:acpi` | | 3.2 | Implement `redbear-udisks` — minimal UDisks2 D-Bus service | Registers `org.freedesktop.UDisks2`, enumerates block devices from `scheme:` filesystem | | 3.3 | Re-enable D-Bus in kf6-solid (`-DUSE_DBUS=ON`, re-enable UPower backend) | kf6-solid builds with D-Bus enabled, UPower backend active | -| 3.4 | Implement ACPI sleep/shutdown integration in `redbear-sessiond` | `PrepareForSleep` and `PrepareForShutdown` signals emitted from ACPI events | +| 3.4 | Implement ACPI sleep/shutdown integration in `redbear-sessiond` | `PrepareForShutdown` emitted from the current ACPI shutdown event path; `PrepareForSleep` only after ACPI sleep eventing exists | | 3.5 | Validate PowerDevil (if plasma-workspace includes it) | Power management UI shows battery/AC status | **Exit criteria:** - [ ] `org.freedesktop.UPower` registers and enumerates devices - [ ] `org.freedesktop.UDisks2` registers and enumerates block devices - [ ] kf6-solid uses UPower backend for power queries -- [ ] Sleep/shutdown signals flow through login1 D-Bus interface +- [ ] Shutdown signal flows through login1 D-Bus interface now; sleep signal only if ACPI sleep eventing is implemented **Dependencies:** Phase DB-2 complete, ACPI boot-baseline integration working; see `local/docs/ACPI-IMPROVEMENT-PLAN.md` for the remaining ownership, robustness, and validation work