<p>Furquan Shaikh has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/22087">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">soc/intel/skylake: Define mask for SMI handlers that can be run in SCI mode<br><br>This change adds a mask to allow SMI handlers to be run even in SCI<br>mode. This prevents any SMI handlers from accidentally taking<br>unnecessary action in SCI mode.<br><br>Add APM_STS and SMI_ON_SLP_EN_STS to this mask to allow gsmi and sleep<br>to work in SCI mode.<br><br>BUG=b:67874513<br><br>Change-Id: I298f8f6ce28c9746cbc1fb6fc96035b98a17a9e3<br>Signed-off-by: Furquan Shaikh <furquan@chromium.org><br>---<br>M src/soc/intel/skylake/smihandler.c<br>1 file changed, 18 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/87/22087/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/src/soc/intel/skylake/smihandler.c b/src/soc/intel/skylake/smihandler.c<br>index 20c4109..211432c 100644<br>--- a/src/soc/intel/skylake/smihandler.c<br>+++ b/src/soc/intel/skylake/smihandler.c<br>@@ -510,6 +510,13 @@<br>      [MONITOR_STS_BIT] = southbridge_smi_monitor,<br> };<br> <br>+#define SMI_HANDLER_SCI_EN(__bit)        (1 << (__bit))<br>+<br>+/* SMI handlers that should be serviced in SCI mode too. */<br>+uint32_t smi_handler_sci_mask =<br>+      SMI_HANDLER_SCI_EN(APM_STS_BIT) |<br>+    SMI_HANDLER_SCI_EN(SMI_ON_SLP_EN_STS_BIT);<br>+<br> /*<br>  * Interrupt handler for SMI#<br>  */<br>@@ -524,6 +531,17 @@<br>         */<br>   smi_sts = pmc_clear_smi_status();<br> <br>+ /*<br>+    * In SCI mode, execute only those SMI handlers that have<br>+     * declared themselves as available for service in that mode<br>+  * using smi_handler_sci_mask.<br>+        */<br>+  if (pmc_read_pm1_control() & SCI_EN)<br>+             smi_sts &= smi_handler_sci_mask;<br>+<br>+      if (!smi_sts)<br>+                return;<br>+<br>    /* Call SMI sub handler for each of the status bits */<br>        for (i = 0; i < ARRAY_SIZE(southbridge_smi); i++) {<br>                if (smi_sts & (1 << i)) {<br></pre><p>To view, visit <a href="https://review.coreboot.org/22087">change 22087</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/22087"/><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: I298f8f6ce28c9746cbc1fb6fc96035b98a17a9e3 </div>
<div style="display:none"> Gerrit-Change-Number: 22087 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Furquan Shaikh <furquan@google.com> </div>