<p>Subrata Banik has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/28337">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">soc/intel/common: Don't clear GPE status register<br><br>As per EDS definition for GPE Status register is RW/1C/V, hence<br>writting mask bit into GPE status will force clear GPE status bit.<br><br>This will lead into device side "IRQ timeout" problem as soc code<br>might relying on GPE status read to know the interrupt status.<br><br>TEST=Don't see IRQ timeout issue for TPM.<br><br>Change-Id: I27fabb3612251fd8d04f58c05ff9fb2a42ad64b3<br>Signed-off-by: Subrata Banik <subrata.banik@intel.com><br>---<br>M src/soc/intel/common/block/pmc/pmclib.c<br>1 file changed, 3 insertions(+), 5 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/37/28337/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/soc/intel/common/block/pmc/pmclib.c b/src/soc/intel/common/block/pmc/pmclib.c</span><br><span>index 339e674..7f106f4 100644</span><br><span>--- a/src/soc/intel/common/block/pmc/pmclib.c</span><br><span>+++ b/src/soc/intel/common/block/pmc/pmclib.c</span><br><span>@@ -460,7 +460,7 @@</span><br><span>     return acpi_sleep_from_pm1(pmc_read_pm1_control()) == ACPI_S3;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-/* Read and clear GPE status (defined in arch/acpi.h) */</span><br><span style="color: hsl(120, 100%, 40%);">+/* Read GPE status (defined in arch/acpi.h) */</span><br><span> int acpi_get_gpe(int gpe)</span><br><span> {</span><br><span>    int bank;</span><br><span>@@ -474,17 +474,15 @@</span><br><span>    bank = gpe / 32;</span><br><span>     mask = 1 << (gpe % 32);</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-       /* Wait up to 1ms for GPE status to clear */</span><br><span style="color: hsl(120, 100%, 40%);">+  /* Wait up to 1ms for GPE status to trigger */</span><br><span>       stopwatch_init_msecs_expire(&sw, 1);</span><br><span>     do {</span><br><span>                 if (stopwatch_expired(&sw))</span><br><span>                      return rc;</span><br><span> </span><br><span>               sts = inl(ACPI_BASE_ADDRESS + GPE0_STS(bank));</span><br><span style="color: hsl(0, 100%, 40%);">-          if (sts & mask) {</span><br><span style="color: hsl(0, 100%, 40%);">-                   outl(mask, ACPI_BASE_ADDRESS + GPE0_STS(bank));</span><br><span style="color: hsl(120, 100%, 40%);">+               if (sts & mask)</span><br><span>                  rc = 1;</span><br><span style="color: hsl(0, 100%, 40%);">-         }</span><br><span>    } while (sts & mask);</span><br><span> </span><br><span>        return rc;</span><br><span></span><br></pre><p>To view, visit <a href="https://review.coreboot.org/28337">change 28337</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/28337"/><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: I27fabb3612251fd8d04f58c05ff9fb2a42ad64b3 </div>
<div style="display:none"> Gerrit-Change-Number: 28337 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Subrata Banik <subrata.banik@intel.com> </div>