From 2396d8ce76a42da3c01a33dee38bcaa9b37965ca Mon Sep 17 00:00:00 2001 From: vasilito Date: Wed, 22 Jul 2026 22:05:49 +0900 Subject: [PATCH] redox_syscall: add AcpiVerb::SetLpiHint (verb 7) for LPIT MWAIT hint acpid provides the firmware-recommended MWAIT hint from the LPIT native C-state entry_trigger (FFH GAS address). The kernel idle path uses this hint for mwait_loop() instead of the CPUID-max fallback. Write payload: 4-byte LE u32. Read payload: 0 (one-way). --- src/flag.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/flag.rs b/src/flag.rs index 0b7ab0eed5..6bac2d80cb 100644 --- a/src/flag.rs +++ b/src/flag.rs @@ -355,6 +355,13 @@ pub enum AcpiVerb { /// Mirrors Linux 7.1's `enter_sleep_state` / /// `acpi_hw_legacy_sleep` for S3. EnterS3 = 6, + /// Red Bear OS extension (Phase I): acpid provides the + /// firmware-recommended MWAIT hint from the LPIT native + /// C-state entry_trigger (FFH GAS address). The kernel idle + /// path uses this hint for `mwait_loop()` instead of the + /// CPUID-max fallback. Write payload: 4-byte LE u32 (the + /// hint). Read payload: 0 (one-way). + SetLpiHint = 7, } impl AcpiVerb { pub const fn try_from_raw(value: u64) -> Option { @@ -365,6 +372,7 @@ impl AcpiVerb { 4 => Self::ExitS2Idle, 5 => Self::SetS3WakingVector, 6 => Self::EnterS3, + 7 => Self::SetLpiHint, _ => return None, }) }