<p>Raul Rangel has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/26545">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">amd: Don't call halt() when in SMM<br><br>This copies what Intel does.<br><br>BUG=b:80295434<br>TEST=grunt: Made sure that the S5 SMI interrupt gets fired.<br><br>Change-Id: I7874824cad01054c6bdeff12d248e671f27be030<br>Signed-off-by: Raul E Rangel <rrangel@chromium.org><br>---<br>M src/soc/amd/common/block/acpi/halt.c<br>1 file changed, 8 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/45/26545/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/soc/amd/common/block/acpi/halt.c b/src/soc/amd/common/block/acpi/halt.c</span><br><span>index 6038a8c..8fba38d 100644</span><br><span>--- a/src/soc/amd/common/block/acpi/halt.c</span><br><span>+++ b/src/soc/amd/common/block/acpi/halt.c</span><br><span>@@ -20,5 +20,12 @@</span><br><span> void poweroff(void)</span><br><span> {</span><br><span>      outl((SLP_TYP_S5 << SLP_TYP_SHIFT) | SLP_EN, pm_acpi_pm_cnt_blk());</span><br><span style="color: hsl(0, 100%, 40%);">-       halt();</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+     /*</span><br><span style="color: hsl(120, 100%, 40%);">+     * Setting SLP_TYP_S5 in PM1 triggers SLP_SMI, which is handled by SMM</span><br><span style="color: hsl(120, 100%, 40%);">+         * to transition to S5 state. If halt is called in SMM, then it prevents</span><br><span style="color: hsl(120, 100%, 40%);">+       * the SMI handler from being triggered and system never enters S5.</span><br><span style="color: hsl(120, 100%, 40%);">+    */</span><br><span style="color: hsl(120, 100%, 40%);">+   if (!ENV_SMM)</span><br><span style="color: hsl(120, 100%, 40%);">+         halt();</span><br><span> }</span><br><span></span><br></pre><p>To view, visit <a href="https://review.coreboot.org/26545">change 26545</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/26545"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I7874824cad01054c6bdeff12d248e671f27be030 </div>
<div style="display:none"> Gerrit-Change-Number: 26545 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Raul Rangel <rrangel@chromium.org> </div>