diff --git a/src/flag.rs b/src/flag.rs index 1dd50402a7..72e60c4adf 100644 --- a/src/flag.rs +++ b/src/flag.rs @@ -325,6 +325,28 @@ pub enum AcpiVerb { /// byte) always returns 0. Mirrors Linux 7.1 `s2idle_wake()` in /// `kernel/power/suspend.c:133`. Hardware-agnostic. ExitS2Idle = 4, + /// Red Bear OS extension (Phase II.X.W): acpid writes the + /// 64-bit kernel S3 resume trampoline address to + /// FACS.xfirmware_waking_vector. The kernel's + /// `arch/x86_shared/s3_resume.rs` trampoline is at this + /// address; the platform firmware jumps to it on S3 wake. + /// Write payload: 8-byte little-endian u64 (the trampoline + /// address). Read payload: 0 (no error condition; this verb + /// is one-way). Mirrors Linux 7.1's + /// `acpi_set_firmware_waking_vector` in ACPICA. + /// Hardware-agnostic: works on any x86_64 system with + /// standard ACPI S3 support (Dell, HP, Lenovo, LG Gram 14). + SetS3WakingVector = 5, + /// Red Bear OS extension (Phase II.X.W): acpid requests + /// the kernel to enter S3. The kernel's kstop handler + /// dispatches on the "s3" string arg, dispatches on the + /// SLP_TYP byte, and does the PM1 register write. The + /// acpid has already done the AML prep (`_TTS(3)`, `_PTS(3)`, + /// `_SST(3)`) and written the trampoline address to FACS + /// via `SetS3WakingVector`. No payload needed. + /// Mirrors Linux 7.1's `enter_sleep_state` / + /// `acpi_hw_legacy_sleep` for S3. + EnterS3 = 6, } impl AcpiVerb { pub const fn try_from_raw(value: u64) -> Option { @@ -333,6 +355,8 @@ impl AcpiVerb { 2 => Self::CheckShutdown, 3 => Self::EnterS2Idle, 4 => Self::ExitS2Idle, + 5 => Self::SetS3WakingVector, + 6 => Self::EnterS3, _ => return None, }) }