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).
This commit is contained in:
@@ -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<Self> {
|
||||
@@ -365,6 +372,7 @@ impl AcpiVerb {
|
||||
4 => Self::ExitS2Idle,
|
||||
5 => Self::SetS3WakingVector,
|
||||
6 => Self::EnterS3,
|
||||
7 => Self::SetLpiHint,
|
||||
_ => return None,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user