<p>Furquan Shaikh has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/21969">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">intel/common/pmc: Disable all GPEs during pmc_init<br><br>If GPEs are not cleared during pmc_init, it could result in issues if<br>standard wake events are generated while coreboot is<br>initializing. e.g. (Observed on soraka):<br>1. Suspend to S3<br>2. Lidclose<br>3. Lidopen<br>4. EC wakes up the host using WAKE# pin<br>5. On wakeup, pmc_init occurs which does not clear GPEs<br>6. MP init enables SMI<br>7. In order to add wake event to elog, coreboot sets wake mask on the<br>EC, which causes the EC to assert WAKE#.<br>8. Since WAKE# is asserted, it results in an SMI#. However, EC does<br>not de-assert WAKE# until host queries and clears the host event<br>bit (which does not happen since coreboot is stuck in handling the<br>SMIs).<br><br>This is one of the issues that can occur when GPEs are unnecessarily<br>enabled in coreboot. Before the move to PMC common library, SKL PMC<br>driver set all GPEs to 0 and hence this issue did not occur.<br><br>This change explicitly disables all GPEs during pmc init in order to<br>avoid any side-effects.<br><br>BUG=b:67712608<br>TEST=Verified that device resumes fine using lidclose/lidopen to<br>suspend and resume.<br><br>Change-Id: Ic5be02a23a8dbf43c4d7adf00251639ded4a94c9<br>Signed-off-by: Furquan Shaikh <furquan@chromium.org><br>---<br>M src/soc/intel/common/block/pmc/pmclib.c<br>1 file changed, 2 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/69/21969/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/src/soc/intel/common/block/pmc/pmclib.c b/src/soc/intel/common/block/pmc/pmclib.c<br>index b8a14ce..5f8f664 100644<br>--- a/src/soc/intel/common/block/pmc/pmclib.c<br>+++ b/src/soc/intel/common/block/pmc/pmclib.c<br>@@ -558,4 +558,6 @@<br> <br>       /* Set the routes in the GPIO communities as well. */<br>         gpio_route_gpe(dw0, dw1, dw2);<br>+<br>+    pmc_disable_all_gpe();<br> }<br></pre><p>To view, visit <a href="https://review.coreboot.org/21969">change 21969</a>. To unsubscribe, 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/21969"/><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: Ic5be02a23a8dbf43c4d7adf00251639ded4a94c9 </div>
<div style="display:none"> Gerrit-Change-Number: 21969 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Furquan Shaikh <furquan@google.com> </div>