diff options
author | Furquan Shaikh <furquan@google.com> | 2016-08-18 21:31:50 -0700 |
---|---|---|
committer | Furquan Shaikh <furquan@google.com> | 2016-08-20 10:48:27 +0200 |
commit | 3828e55a8c722dc157839a9abab947e655933494 (patch) | |
tree | d14ed5198fa9aee42f52a804c076560ec8981b57 /src/soc/intel | |
parent | 200f11eb872a55d160b69ab336ff6853f7eee27a (diff) | |
download | coreboot-3828e55a8c722dc157839a9abab947e655933494.tar.xz |
intel/apollolake: Do not halt in poweroff if in SMM
Calling halt in poweroff when in SMM prevents SLP_SMI to be triggered
preventing the system from entering sleep state. Fix this by calling
halt only if ENV_SMM is not true.
BUG=chrome-os-partner:56395
BRANCH=None
TEST=Verified lidclose behavior on reef.
Change-Id: If116c8f4e867543abdc2ff235457c167b5073767
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/16257
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/soc/intel')
-rw-r--r-- | src/soc/intel/apollolake/pmutil.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/soc/intel/apollolake/pmutil.c b/src/soc/intel/apollolake/pmutil.c index dabc2683bc..aaa4018683 100644 --- a/src/soc/intel/apollolake/pmutil.c +++ b/src/soc/intel/apollolake/pmutil.c @@ -443,5 +443,12 @@ void vboot_platform_prepare_reboot(void) void poweroff(void) { enable_pm1_control(SLP_EN | (SLP_TYP_S5 << SLP_TYP_SHIFT)); - halt(); + + /* + * Setting SLP_TYP_S5 in PM1 triggers SLP_SMI, which is handled by SMM + * to transition to S5 state. If halt is called in SMM, then it prevents + * the SMI handler from being triggered and system never enters S5. + */ + if (!ENV_SMM) + halt(); } |