diff options
author | Raul E Rangel <rrangel@chromium.org> | 2018-05-25 16:11:39 -0600 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2018-05-27 01:04:10 +0000 |
commit | 06bc4d712c4276115c4e7692836fb8928689217a (patch) | |
tree | b4ccf5eac6ae7dba826857695355cc98ab62c5e6 /src/soc/amd/common | |
parent | 2db06bba0fdeb2465108da487b0b2d1ecedef985 (diff) |
amd: Don't call halt() when in SMM
This copies what Intel does.
BUG=b:80295434
TEST=grunt: Made sure that the S5 SMI interrupt gets fired.
Change-Id: I7874824cad01054c6bdeff12d248e671f27be030
Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Reviewed-on: https://review.coreboot.org/26545
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/soc/amd/common')
-rw-r--r-- | src/soc/amd/common/block/acpi/halt.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/soc/amd/common/block/acpi/halt.c b/src/soc/amd/common/block/acpi/halt.c index 6038a8c736..8fba38dc03 100644 --- a/src/soc/amd/common/block/acpi/halt.c +++ b/src/soc/amd/common/block/acpi/halt.c @@ -20,5 +20,12 @@ void poweroff(void) { outl((SLP_TYP_S5 << SLP_TYP_SHIFT) | SLP_EN, pm_acpi_pm_cnt_blk()); - 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(); } |