[coreboot-gerrit] Change in coreboot[master]: amd: Don't call halt() when in SMM
Raul Rangel (Code Review)
gerrit at coreboot.org
Sat May 26 00:11:43 CEST 2018
Raul Rangel has uploaded this change for review. ( https://review.coreboot.org/26545
Change subject: amd: Don't call halt() when in SMM
......................................................................
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 at chromium.org>
---
M src/soc/amd/common/block/acpi/halt.c
1 file changed, 8 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/45/26545/1
diff --git a/src/soc/amd/common/block/acpi/halt.c b/src/soc/amd/common/block/acpi/halt.c
index 6038a8c..8fba38d 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();
}
--
To view, visit https://review.coreboot.org/26545
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7874824cad01054c6bdeff12d248e671f27be030
Gerrit-Change-Number: 26545
Gerrit-PatchSet: 1
Gerrit-Owner: Raul Rangel <rrangel at chromium.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180525/69c169b1/attachment.html>
More information about the coreboot-gerrit
mailing list