UPSTREAM: intel/skylake: 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=None Signed-off-by: Furquan Shaikh <furquan@google.com> Reviewed-on: https://review.coreboot.org/16259 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Change-Id: I3addc1ea065346fbc5dbec9d1ad49bbd0ae05696 Reviewed-on: https://chromium-review.googlesource.com/373733 Commit-Ready: Furquan Shaikh <furquan@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
parent
96b888c267
commit
7bf1051492
1 changed files with 9 additions and 1 deletions
|
|
@ -25,6 +25,7 @@
|
|||
#include <device/pci_def.h>
|
||||
#include <console/console.h>
|
||||
#include <halt.h>
|
||||
#include <rules.h>
|
||||
#include <stdlib.h>
|
||||
#include <soc/gpio.h>
|
||||
#include <soc/iomap.h>
|
||||
|
|
@ -435,5 +436,12 @@ uint16_t smbus_tco_regs(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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue