[coreboot-gerrit] New patch to review for coreboot: ACPI: Add hack to avoid IASL warning when reading back registers

Martin Roth (martinroth@google.com) gerrit at coreboot.org
Thu Dec 10 16:55:51 CET 2015


Martin Roth (martinroth at google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/12704

-gerrit

commit e25fd0c7534e1d6ab10a636acb7e389a29adfc93
Author: Martin Roth <martinroth at google.com>
Date:   Thu Dec 10 08:04:44 2015 -0700

    ACPI: Add hack to avoid IASL warning when reading back registers
    
    Upcoming versions of IASL give a warning about unused methods.  This
    adds an operation after the read to use the local variable and avoid
    the warning.
    
    The warning can be completely disabled on the command line, but as it
    can find real issues, my preference is to not do that.
    
    Fixes warnings:
    dsdt.aml 640: 		           Store (CTMP, Local0)
    Warning  3144 - Method Local is set but never used ^  (Local0)
    
    Change-Id: If55bb8e03abb8861e1f2f08a8bcb1be8c9783afe
    Signed-off-by: Martin Roth <martinroth at google.com>
---
 src/ec/quanta/ene_kb3940q/acpi/ec.asl             |  3 +++
 src/soc/intel/broadwell/acpi/serialio.asl         |  6 ++++++
 src/southbridge/intel/lynxpoint/acpi/serialio.asl | 20 ++++++++++++++++----
 3 files changed, 25 insertions(+), 4 deletions(-)

diff --git a/src/ec/quanta/ene_kb3940q/acpi/ec.asl b/src/ec/quanta/ene_kb3940q/acpi/ec.asl
index 8d3ff81..251b450 100644
--- a/src/ec/quanta/ene_kb3940q/acpi/ec.asl
+++ b/src/ec/quanta/ene_kb3940q/acpi/ec.asl
@@ -143,6 +143,9 @@ Device (EC0)
 		// Force a read of CPU temperature
 		Store (CTMP, Local0)
 
+		// Use Local0 to avoid iasl warning: Method Local is set but never used
+		And(Local0, Ones, Local0)
+
 		// Find and program number of P-States
 		Store (SizeOf (\_PR.CP00._PSS), MPST)
 		Store ("Programming number of P-states: ", Debug)
diff --git a/src/soc/intel/broadwell/acpi/serialio.asl b/src/soc/intel/broadwell/acpi/serialio.asl
index a6c94d2..1b44e95 100644
--- a/src/soc/intel/broadwell/acpi/serialio.asl
+++ b/src/soc/intel/broadwell/acpi/serialio.asl
@@ -36,6 +36,9 @@ Method (LPD0, 2, Serialized)
 
 	And (SPCS, 0xFFFFFFFC, SPCS)
 	Store (SPCS, Local0) // Read back after writing
+
+	// Use Local0 to avoid iasl warning: Method Local is set but never used
+	And(Local0, Ones, Local0)
 }
 
 // Put SerialIO device in D3 state
@@ -56,6 +59,9 @@ Method (LPD3, 2, Serialized)
 
 	Or (SPCS, 0x3, SPCS)
 	Store (SPCS, Local0) // Read back after writing
+
+	// Use Local0 to avoid iasl warning: Method Local is set but never used
+	And(Local0, Ones, Local0)
 }
 
 // Serial IO Resource Consumption for BAR1
diff --git a/src/southbridge/intel/lynxpoint/acpi/serialio.asl b/src/southbridge/intel/lynxpoint/acpi/serialio.asl
index 13732f6..930a8ee 100644
--- a/src/southbridge/intel/lynxpoint/acpi/serialio.asl
+++ b/src/southbridge/intel/lynxpoint/acpi/serialio.asl
@@ -219,14 +219,20 @@ Device (I2C0)
 	Method (_PS0, 0, Serialized)
 	{
 		And (^PSAT, 0xfffffffc, ^PSAT)
-		Store (^PSAT, Local0)
+		Store (^PSAT, Local0) // Read back after writing
+
+		// Use Local0 to avoid iasl warning: Method Local is set but never used
+		And(Local0, Ones, Local0)
 	}
 
 	// Put controller in D3Hot state
 	Method (_PS3, 0, Serialized)
 	{
 		Or (^PSAT, 0x00000003, ^PSAT)
-		Store (^PSAT, Local0)
+		Store (^PSAT, Local0) // Read back after writing
+
+		// Use Local0 to avoid iasl warning: Method Local is set but never used
+		And(Local0, Ones, Local0)
 	}
 }
 
@@ -292,14 +298,20 @@ Device (I2C1)
 	Method (_PS0, 0, Serialized)
 	{
 		And (^PSAT, 0xfffffffc, ^PSAT)
-		Store (^PSAT, Local0)
+		Store (^PSAT, Local0) // Read back after writing
+
+		// Use Local0 to avoid iasl warning: Method Local is set but never used
+		And(Local0, Ones, Local0)
 	}
 
 	// Put controller in D3Hot state
 	Method (_PS3, 0, Serialized)
 	{
 		Or (^PSAT, 0x00000003, ^PSAT)
-		Store (^PSAT, Local0)
+		Store (^PSAT, Local0) // Read back after writing
+
+		// Use Local0 to avoid iasl warning: Method Local is set but never used
+		And(Local0, Ones, Local0)
 	}
 }
 



More information about the coreboot-gerrit mailing list