From 8a82feecd40129125bdfa3bf982adbe75d08ecde Mon Sep 17 00:00:00 2001 From: vasilito Date: Wed, 5 Aug 2026 15:43:08 +0300 Subject: [PATCH] docs(evidence): task-12 namespace-wide _PRW wake-device enumeration --- .../task-12-ryzen-7000-x670e-compat.txt | 120 ++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 .omo/evidence/task-12-ryzen-7000-x670e-compat.txt diff --git a/.omo/evidence/task-12-ryzen-7000-x670e-compat.txt b/.omo/evidence/task-12-ryzen-7000-x670e-compat.txt new file mode 100644 index 0000000000..9a71a67256 --- /dev/null +++ b/.omo/evidence/task-12-ryzen-7000-x670e-compat.txt @@ -0,0 +1,120 @@ +Task: todo 12 of ryzen-7000-x670e-compat +Title: Namespace-wide _PRW wake-device enumeration in acpid +Date: 2026-08-05 + +Objective +--------- +Replace the fixed laptop-oriented wake-device candidate list in +acpid (drivers/acpid/src/wake.rs:176-280) with a namespace-wide walk +that discovers every device exposing a _PRW method, so AMD desktop +GPP* paths are discovered alongside legacy Intel laptop paths +(PC00/CNVW/lid). All _PRW evaluation continues to flow through the +serialized AML executor. + +Implementation +-------------- +- drivers/acpi-rs/src/aml/namespace.rs + Added collect_prw_device_paths() which walks the AML namespace + recursively and returns every device/object path that has a _PRW + method. The walk skips duplicate paths and preserves device + ordering within each branch. + +- drivers/acpid/src/acpi.rs + Added AcpiContext::enumerate_prw_device_paths() that exposes the + namespace walker to acpid. It returns the full path list and + leaves actual _PRW evaluation to the existing serialized AML + executor (evaluate_acpi_method / aml_eval), so the serialized + executor requirement (todo 10) is honored. + +- drivers/acpid/src/wake.rs + Replaced the fixed candidate list in WakeRegistry::enumerate() + with a call to enumerate_prw_device_paths() plus a HashSet guard + to collapse any duplicates. Arm/disarm semantics and the LG Gram + wake-device paths are preserved because the namespace walk + includes them when _PRW is present. + +Tests +----- +Host-runnable tests added in drivers/acpi-rs/src/aml/namespace.rs: +1. collect_prw_discovers_intel_and_amd_devices_with_no_duplicates + - Builds a synthetic namespace with: + \PC00.CNVW._PRW (Intel laptop Wi-Fi / Bluetooth wake) + \GPP0.GPP7._PRW (AMD desktop PCIe root port / device wake) + \_SB.PCI0.LPCB.EC0.LID0._PRW (legacy lid wake) + - Verifies all three are discovered and no path appears twice. + +2. collect_prw_ignores_devices_without_prw + - Builds a namespace where some devices have _PRW and sibling + devices do not. + - Verifies only _PRW-bearing paths are returned. + +RED/GREEN +--------- +RED (before implementation): the two new tests failed to compile +because collect_prw_device_paths() and the AcpiContext wrapper did +not exist; the fixed candidate list in wake.rs also could not +produce the AMD GPP0/GPP7 paths. + +GREEN (after implementation): + +$ cargo test -p acpi +... +test aml::namespace::tests::collect_prw_discovers_intel_and_amd_devices_with_no_duplicates ... ok +test aml::namespace::tests::collect_prw_ignores_devices_without_prw ... ok +... +test result: ok. 22 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out + +$ cargo check -p acpid +Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.10s +(54 pre-existing warnings, none related to the new code) + +Build verification +------------------ +Ran the canonical check-sweep: + +$ ./local/scripts/build-redbear.sh --allow-dirty --check-sweep redbear-mini + +- Check-sweep covered all 52 packages in the target; individual logs + are under /tmp/redbear-build-state.HkdE2r/logs/check-sweep-*.log. +- The base check-sweep log (check-sweep-base.log) shows only + pre-existing warnings; no errors were introduced by the _PRW + changes. +- The subsequent full build phase proceeded past recipe compilation + and failed later with: + + installer: failed to install: No space left on device (os error 28) + + This is an environment/disk-space failure unrelated to the acpid + change and unrelated to the previously observed malformed-patch + issue in rust-native build artifacts. + +Commits +------- +Base submodule (branch submodule/base): + 2db58838 feat(acpid): namespace-wide _PRW wake-device enumeration + (3 files changed, 156 insertions(+), 38 deletions(-)) + +Parent repo (branch 0.3.2): + The local/sources/base gitlink already points to commit + 61d196433ed9e8414eb1bf7a204642d8392639ae, which includes the + namespace-wide _PRW commit 2db58838 as its parent. No additional + gitlink change was required because the parent HEAD already + recorded that submodule hash. + +Constraints honored +------------------- +- Did not change arm/disarm semantics in wake.rs. +- Did not hardcode board-specific paths; all wake candidates are + discovered from the AML namespace. +- Did not introduce unwrap()/expect() in library code. +- Did not edit config/redbear-full.toml or local/cache/pkgar/. +- Left the unrelated pcid working-tree changes from another session + untouched (they remain uncommitted in the base submodule). + +DoneClaim +--------- +Namespace-wide _PRW wake-device enumeration is implemented, +tested, and committed in the base fork. The acpid crate +compiles cleanly and the host-runnable acpi tests pass. +The change is ready for the next full image build once disk-space +is available.