diff options
| author | Aymeric Wibo <obiwac@FreeBSD.org> | 2025-06-14 15:28:49 +0000 |
|---|---|---|
| committer | Aymeric Wibo <obiwac@FreeBSD.org> | 2026-01-13 22:21:05 +0000 |
| commit | 7669cbd0f06402573fe627e9e6f86c69cfd3d12b (patch) | |
| tree | a27bbc043411eeb1bf8537dba3a011658a9cac00 /contrib/opencsd/decoder/source | |
| parent | 38f941deb6faa0c22ffd5bf2f848c62dc6fce434 (diff) | |
Implement STYPE_SUSPEND_TO_IDLE sleep type added in c43473dc9b83
("sys/power: Generic sleep types").
This is a prerequisite for the firmware to enter the S0ix states. When
suspending to idle, the system stays in an ACPI S0 state, but the CPUs
are idled and devices are suspended/resumed before and after this as
they would be when entering any other sleep type (except for AWAKE and
POWEROFF).
Factor out do_standby, do_sleep, and add a new do_idle function for
idling the CPU (a future patch will make this an idle loop and not just
a simple cpu_idle() call). In do_idle, SCIs (interrupt 9) are enabled to
allow wake events to break the CPU out of idle.
Record all the steps made instead of just the last one in slp_state,
which allows for more flexible unwinding (will be useful to not have to
goto breakout if the SPMC entry call fails when that is committed).
A lot of this borrows from Ben Widawsky's patch: D17675. The main
functional difference with that patch is that suspend-to-idle is a
wholly separate sleep type in this one as opposed to being an
alternative implementation for s2mem (S3).
Reviewed by: emaste, olce
Approved by: olce
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48734
Diffstat (limited to 'contrib/opencsd/decoder/source')
0 files changed, 0 insertions, 0 deletions
