<p>Patrick Rudolph has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/22514">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">ec/lenovo/h8/acpi: Fix regression<br><br>Fix a regression introduced by #21227 0709dc04.<br>The commit causes Windows to crash as EC reads aren't allowed in the fan<br>device or it's powerresource's methods. Implement the same approach as all<br>other platforms using a GNVS variable named FLVL.<br>In addition to EC reads writing to FIELD elements in another ACPI scope<br>seems to be broken. Introduce a new method to set the fan disengage mode.<br><br>Tested on Windows 7 and Lenovo T500.<br><br>Change-Id: Ia99f8814ac14194578dcd1aa50a63e3f35c042dd<br>Signed-off-by: Patrick Rudolph <siro@das-labor.org><br>---<br>M src/ec/lenovo/h8/acpi/ec.asl<br>M src/ec/lenovo/h8/acpi/thermal.asl<br>2 files changed, 30 insertions(+), 10 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/14/22514/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/src/ec/lenovo/h8/acpi/ec.asl b/src/ec/lenovo/h8/acpi/ec.asl<br>index 750121d..944858f 100644<br>--- a/src/ec/lenovo/h8/acpi/ec.asl<br>+++ b/src/ec/lenovo/h8/acpi/ec.asl<br>@@ -286,6 +286,22 @@<br> ^HKEY.RTAB (0xA)<br> }<br> <br>+ /*<br>+ * Set FAN disengage:<br>+ * Arg0: 1: Run at full speed<br>+ * 0: Automatic fan control<br>+ */<br>+ Method (FANE, 1, Serialized)<br>+ {<br>+ If (Arg0) {<br>+ Store (One, FAND)<br>+ Store (Zero, FANA)<br>+ } Else {<br>+ Store (Zero, FAND)<br>+ Store (One, FANA)<br>+ }<br>+ }<br>+<br> Device (HKEY)<br> {<br> Name (_HID, EisaId ("IBM0068"))<br>diff --git a/src/ec/lenovo/h8/acpi/thermal.asl b/src/ec/lenovo/h8/acpi/thermal.asl<br>index 83c966a..103bd16 100644<br>--- a/src/ec/lenovo/h8/acpi/thermal.asl<br>+++ b/src/ec/lenovo/h8/acpi/thermal.asl<br>@@ -101,7 +101,7 @@<br> /* Active fan 10 degree below passive threshold */<br> Subtract (Local0, 10, Local0)<br> <br>- If (LEqual (\_SB.PCI0.LPCB.EC.FAND, 1)) {<br>+ If (\FLVL) {<br> /* Turn of 5 degree below trip point */<br> Subtract (Local0, 5, Local0)<br> }<br>@@ -113,23 +113,27 @@<br> <br> PowerResource (FPwR, 0, 0)<br> {<br>+ /*<br>+ * WINDOWS BUG: Don't read from EmbeddedControl<br>+ * in PowerResources. Use system-memory instead !<br>+ */<br> Method (_STA) {<br>- If (LEqual (\_SB.PCI0.LPCB.EC.FAND, 0)) {<br>- Return (Zero)<br>- } Else {<br>- Return (One)<br>- }<br>+ Return (\FLVL)<br> }<br> <br>+ /*<br>+ * WINDOWS BUG: Don't write to FIELD elements located<br>+ * in another ACPI scope. Call a method that does it !<br>+ */<br> Method (_ON) {<br>- Store (One, \_SB.PCI0.LPCB.EC.FAND)<br>- Store (Zero, \_SB.PCI0.LPCB.EC.FANA)<br>+ \_SB.PCI0.LPCB.EC.FANE(One)<br>+ Store (One, \FLVL)<br> Notify (\_TZ.THM0, NOTIFY_TZ_TRIPPTCHG)<br> }<br> <br> Method (_OFF) {<br>- Store (Zero, \_SB.PCI0.LPCB.EC.FAND)<br>- Store (One, \_SB.PCI0.LPCB.EC.FANA)<br>+ \_SB.PCI0.LPCB.EC.FANE(Zero)<br>+ Store (Zero, \FLVL)<br> Notify (\_TZ.THM0, NOTIFY_TZ_TRIPPTCHG)<br> }<br> }<br></pre><p>To view, visit <a href="https://review.coreboot.org/22514">change 22514</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/22514"/><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: Ia99f8814ac14194578dcd1aa50a63e3f35c042dd </div>
<div style="display:none"> Gerrit-Change-Number: 22514 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Patrick Rudolph <siro@das-labor.org> </div>