Phase II.X.W: extend the AcpiVerb enum with two new variants
for the S3 round-trip:
* AcpiVerb::SetS3WakingVector (= 5): acpid writes the
kernel's S3 resume trampoline address to FACS.
Mirrors Linux 7.1's acpi_set_firmware_waking_vector.
The 8-byte write payload is the address in
little-endian. A zero payload is a sentinel for 'use the
kernel's default trampoline address' (s3_trampoline
symbol).
* AcpiVerb::EnterS3 (= 6): acpid requests the kernel to
enter S3. The kernel's stop::enter_s3() reads the
SLP_TYP value from S3_SLP_TYP and does the PM1 register
write. The actual S3 entry happens via acpid writing
to /scheme/sys/kstop.
Hardware-agnostic: works on any x86_64 system with
standard ACPI S3 support (Dell, HP, Lenovo, LG Gram 14).
On Modern Standby-only systems (LG Gram 16 (2025)), the
kernel never enters S3 so these verbs are no-ops.
Phase I/J: hardware-agnostic s2idle / Modern Standby
support. These AcpiVerb variants are needed on any
platform with Modern Standby firmware (Dell, HP, Lenovo,
LG Gram, etc.), not just LG Gram. They mirror Linux 7.1:
* EnterS2Idle (= 3) — s2idle_enter() in
kernel/power/suspend.c:91
* ExitS2Idle (= 4) — s2idle_wake() in
kernel/power/suspend.c:133
The version field stays at upstream 0.8.1. We do NOT
bump the version — this is the durable overlay pattern
(per AGENTS.md 'GOLDEN RULE — Red Bear adapts to
upstream, never the reverse'). Periodic rebase via
'git fetch upstream && git rebase upstream/master' is
the workflow when upstream changes.
The patch file backing this commit is at
local/patches/syscall/P1-acpiverb-enter-exit-s2idle.patch
in the outer RedBear-OS repo.
Upstream commit: 79cb6d9057642be31623677458a93aa88145864f
Version: 0.8.1
This local fork exists so that [patch.crates-io] and [workspace.dependencies]
in local/sources/base/Cargo.toml can both reference a single local path,
eliminating the dual-source version conflict where git+crates.io sources
of the same version (0.8.1) created incompatible types in the dependency graph.
The previous approach used git URLs for both the workspace dependency and
the patch, which caused Cargo to resolve two separate checkouts of 0.8.1
(one from the git URL, one from crates.io patch), resulting in
'there are multiple different versions of crate syscall in the dependency graph'
compilation errors in scheme-utils and daemon crates.