[coreboot-gerrit] New patch to review for coreboot: 510802e ec/lenovo/h8: Apply ME workaround on X230 on S3 resume.

Vladimir Serbinenko (phcoder@gmail.com) gerrit at coreboot.org
Tue Jul 29 00:54:13 CEST 2014


Vladimir Serbinenko (phcoder at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/6392

-gerrit

commit 510802e220636d4cde56f4a311f71a3222c531e1
Author: Vladimir Serbinenko <phcoder at gmail.com>
Date:   Tue Jul 29 00:51:31 2014 +0200

    ec/lenovo/h8: Apply ME workaround on X230 on S3 resume.
    
    This makes S3 work.
    
    Change-Id: Ife14372f5f9bb151d7e6e98c6069eb99d5369baf
    Signed-off-by: Vladimir Serbinenko <phcoder at gmail.com>
---
 src/ec/lenovo/h8/acpi/thermal.asl           | 18 +++++++++++++-----
 src/mainboard/lenovo/x201/dsdt.asl          |  1 +
 src/mainboard/lenovo/x230/acpi/platform.asl |  4 ++++
 src/mainboard/lenovo/x230/dsdt.asl          |  1 +
 4 files changed, 19 insertions(+), 5 deletions(-)

diff --git a/src/ec/lenovo/h8/acpi/thermal.asl b/src/ec/lenovo/h8/acpi/thermal.asl
index 83d66c6..fce0798 100644
--- a/src/ec/lenovo/h8/acpi/thermal.asl
+++ b/src/ec/lenovo/h8/acpi/thermal.asl
@@ -1,7 +1,8 @@
 Scope(\_TZ)
 {
-#if defined (CONFIG_BOARD_LENOVO_X201) && CONFIG_BOARD_LENOVO_X201
-	Name (MEBT, 0)
+#if defined (EC_LENOVO_H8_ME_WORKAROUND)
+	Name (MEB1, 0)
+	Name (MEB2, 0)
 #endif
 
 	Method(C2K, 1, NotSerialized)
@@ -24,12 +25,12 @@ Scope(\_TZ)
 			Return (C2K(127))
 		}
 		Method(_TMP) {
-#if defined (CONFIG_BOARD_LENOVO_X201) && CONFIG_BOARD_LENOVO_X201
+#if defined (EC_LENOVO_H8_ME_WORKAROUND)
 		        /* Avoid tripping alarm if ME isn't booted at all yet */
-		        If (LAnd (LNot (MEBT), LEqual (\_SB.PCI0.LPCB.EC.TMP0, 128))) {
+		        If (LAnd (LNot (MEB1), LEqual (\_SB.PCI0.LPCB.EC.TMP0, 128))) {
                             Return (C2K(40))
                         }
-			Store (1, MEBT)
+			Store (1, MEB1)
 #endif
 			Return (C2K(\_SB.PCI0.LPCB.EC.TMP0))
 		}
@@ -46,6 +47,13 @@ Scope(\_TZ)
 		}
 
 		Method(_TMP) {
+#if defined (EC_LENOVO_H8_ME_WORKAROUND)
+		        /* Avoid tripping alarm if ME isn't booted at all yet */
+		        If (LAnd (LNot (MEB2), LEqual (\_SB.PCI0.LPCB.EC.TMP1, 128))) {
+                            Return (C2K(40))
+                        }
+			Store (1, MEB2)
+#endif
 			Return (C2K(\_SB.PCI0.LPCB.EC.TMP1))
 		}
 	}
diff --git a/src/mainboard/lenovo/x201/dsdt.asl b/src/mainboard/lenovo/x201/dsdt.asl
index 0c921a6..d245f2a 100644
--- a/src/mainboard/lenovo/x201/dsdt.asl
+++ b/src/mainboard/lenovo/x201/dsdt.asl
@@ -24,6 +24,7 @@
 #define BRIGHTNESS_DOWN \_SB.PCI0.GFX0.LCD0.DECB
 #define ACPI_VIDEO_DEVICE \_SB.PCI0.GFX0
 #define RP04_IS_EXPRESSCARD 1
+#define EC_LENOVO_H8_ME_WORKAROUND 1
 
 DefinitionBlock(
 	"dsdt.aml",
diff --git a/src/mainboard/lenovo/x230/acpi/platform.asl b/src/mainboard/lenovo/x230/acpi/platform.asl
index 5466bed..72b9dbf 100644
--- a/src/mainboard/lenovo/x230/acpi/platform.asl
+++ b/src/mainboard/lenovo/x230/acpi/platform.asl
@@ -68,6 +68,10 @@ Method(_PTS,1)
 
 Method(_WAK,1)
 {
+	/* ME may not be up yet.  */
+	Store (0, \_TZ.MEB1)
+	Store (0, \_TZ.MEB2)
+
 	/* Not implemented.  */
 	Return(Package(){0,0})
 }
diff --git a/src/mainboard/lenovo/x230/dsdt.asl b/src/mainboard/lenovo/x230/dsdt.asl
index 12f40f8..b9660ea 100644
--- a/src/mainboard/lenovo/x230/dsdt.asl
+++ b/src/mainboard/lenovo/x230/dsdt.asl
@@ -24,6 +24,7 @@
 #define BRIGHTNESS_DOWN \_SB.PCI0.GFX0.LCD0.DECB
 #define ACPI_VIDEO_DEVICE \_SB.PCI0.GFX0
 #define RP03_IS_EXPRESSCARD 1
+#define EC_LENOVO_H8_ME_WORKAROUND 1
 
 DefinitionBlock(
 	"dsdt.aml",



More information about the coreboot-gerrit mailing list