[coreboot-gerrit] New patch to review for coreboot: d23aeeb i945: consolidate PNOT method

Vladimir Serbinenko (phcoder@gmail.com) gerrit at coreboot.org
Fri Oct 17 10:17:00 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/7088

-gerrit

commit d23aeeb2c7855d713b1092c3478348cef188b238
Author: Vladimir Serbinenko <phcoder at gmail.com>
Date:   Thu Oct 16 18:28:18 2014 +0200

    i945: consolidate PNOT method
    
    Change-Id: I139518040199f9b786cbd2296e5b72d22cf085a9
    Signed-off-by: Vladimir Serbinenko <phcoder at gmail.com>
---
 src/cpu/intel/model_6dx/acpi/cpu.asl            | 35 +++++++++++++++++++++
 src/mainboard/apple/macbook21/acpi/platform.asl | 36 ----------------------
 src/mainboard/apple/macbook21/dsdt.asl          |  2 ++
 src/mainboard/getac/p470/acpi/ec.asl            |  6 ++++
 src/mainboard/getac/p470/acpi/platform.asl      | 41 -------------------------
 src/mainboard/getac/p470/dsdt.asl               |  2 ++
 src/mainboard/ibase/mb899/dsdt.asl              |  2 ++
 src/mainboard/intel/d945gclf/dsdt.asl           |  2 ++
 src/mainboard/kontron/986lcd-m/dsdt.asl         |  2 ++
 src/mainboard/lenovo/t60/acpi/platform.asl      | 40 ------------------------
 src/mainboard/lenovo/t60/dsdt.asl               |  2 ++
 src/mainboard/lenovo/x60/acpi/platform.asl      | 40 ------------------------
 src/mainboard/lenovo/x60/dsdt.asl               |  2 ++
 src/mainboard/roda/rk886ex/acpi/ec.asl          |  3 ++
 src/mainboard/roda/rk886ex/acpi/platform.asl    | 40 ------------------------
 src/mainboard/roda/rk886ex/dsdt.asl             |  2 ++
 16 files changed, 60 insertions(+), 197 deletions(-)

diff --git a/src/cpu/intel/model_6dx/acpi/cpu.asl b/src/cpu/intel/model_6dx/acpi/cpu.asl
new file mode 100644
index 0000000..7a7c4c0
--- /dev/null
+++ b/src/cpu/intel/model_6dx/acpi/cpu.asl
@@ -0,0 +1,35 @@
+/* These come from the dynamically created CPU SSDT */
+External(PDC0)
+External(PDC1)
+
+// Power notification
+
+External (\_PR_.CPU0, DeviceObj)
+External (\_PR_.CPU1, DeviceObj)
+
+Method (PNOT)
+{
+	If (MPEN) {
+		If(And(PDC0, 0x08)) {
+			Notify (\_PR_.CPU0, 0x80)	 // _PPC
+
+			If (And(PDC0, 0x10)) {
+				Sleep(100)
+				Notify(\_PR_.CPU0, 0x81) // _CST
+			}
+		}
+
+		If(And(PDC1, 0x08)) {
+			Notify (\_PR_.CPU1, 0x80)	 // _PPC
+			If (And(PDC1, 0x10)) {
+				Sleep(100)
+				Notify(\_PR_.CPU1, 0x81) // _CST
+			}
+		}
+
+	} Else { // UP
+		Notify (\_PR_.CPU0, 0x80)
+		Sleep(0x64)
+		Notify(\_PR_.CPU0, 0x81)
+	}
+}
diff --git a/src/mainboard/apple/macbook21/acpi/platform.asl b/src/mainboard/apple/macbook21/acpi/platform.asl
index 9abfbc4..5b788a3 100644
--- a/src/mainboard/apple/macbook21/acpi/platform.asl
+++ b/src/mainboard/apple/macbook21/acpi/platform.asl
@@ -19,10 +19,6 @@
  * MA 02110-1301 USA
  */
 
-/* These come from the dynamically created CPU SSDT */
-External(PDC0)
-External(PDC1)
-
 /* The APM port can be used for generating software SMIs */
 
 OperationRegion (APMP, SystemIO, 0xb2, 2)
@@ -85,38 +81,6 @@ Method(_WAK,1)
 	Return(Package(){0,0})
 }
 
-// Power notification
-
-External (\_PR_.CPU0, DeviceObj)
-External (\_PR_.CPU1, DeviceObj)
-
-Method (PNOT)
-{
-	If (MPEN) {
-		If(And(PDC0, 0x08)) {
-			Notify (\_PR_.CPU0, 0x80)	 // _PPC
-
-			If (And(PDC0, 0x10)) {
-				Sleep(100)
-				Notify(\_PR_.CPU0, 0x81) // _CST
-			}
-		}
-
-		If(And(PDC1, 0x08)) {
-			Notify (\_PR_.CPU1, 0x80)	 // _PPC
-			If (And(PDC1, 0x10)) {
-				Sleep(100)
-				Notify(\_PR_.CPU1, 0x81) // _CST
-			}
-		}
-
-	} Else { // UP
-		Notify (\_PR_.CPU0, 0x80)
-		Sleep(0x64)
-		Notify(\_PR_.CPU0, 0x81)
-	}
-}
-
 /* System Bus */
 
 Scope(\_SB)
diff --git a/src/mainboard/apple/macbook21/dsdt.asl b/src/mainboard/apple/macbook21/dsdt.asl
index fb0a34f..dcb4877 100644
--- a/src/mainboard/apple/macbook21/dsdt.asl
+++ b/src/mainboard/apple/macbook21/dsdt.asl
@@ -38,6 +38,8 @@ DefinitionBlock(
 	// global NVS and variables
 	#include <southbridge/intel/i82801gx/acpi/globalnvs.asl>
 
+	#include <cpu/intel/model_6dx/acpi/cpu.asl>
+
 	Scope (\_SB) {
 		Device (PCI0)
 		{
diff --git a/src/mainboard/getac/p470/acpi/ec.asl b/src/mainboard/getac/p470/acpi/ec.asl
index b8e2954..1b1c157 100644
--- a/src/mainboard/getac/p470/acpi/ec.asl
+++ b/src/mainboard/getac/p470/acpi/ec.asl
@@ -120,6 +120,8 @@ Device(EC0)
 		}
 
 		PNOT()
+		Notify(\_SB.BAT0, 0x80) // Execute BAT0 _BST
+		Notify(\_SB.BAT1, 0x80) // Execute BAT1 _BST
 	}
 
 	Method (_Q02, 0)
@@ -133,12 +135,16 @@ Device(EC0)
 		}
 
 		PNOT()
+		Notify(\_SB.BAT0, 0x80) // Execute BAT0 _BST
+		Notify(\_SB.BAT1, 0x80) // Execute BAT1 _BST
 	}
 
 	Method (_Q05, 0)
 	{
 		Notify(SLPB, 0x80)
 		PNOT()
+		Notify(\_SB.BAT0, 0x80) // Execute BAT0 _BST
+		Notify(\_SB.BAT1, 0x80) // Execute BAT1 _BST
 	}
 
 	Method (_Q07, 0)
diff --git a/src/mainboard/getac/p470/acpi/platform.asl b/src/mainboard/getac/p470/acpi/platform.asl
index 040ecc1..c6c6ecc 100644
--- a/src/mainboard/getac/p470/acpi/platform.asl
+++ b/src/mainboard/getac/p470/acpi/platform.asl
@@ -149,47 +149,6 @@ Method(_WAK,1)
 	Return(Package(){0,0})
 }
 
-// Power notification
-
-External (\_PR_.CPU0, DeviceObj)
-External (\_PR_.CPU1, DeviceObj)
-External (\_PR_.CPU0._PPC)
-External (\_PR_.CPU1._PPC)
-/* These come from the dynamically created CPU SSDT */
-External(PDC0)
-External(PDC1)
-
-Method (PNOT)
-{
-	If (MPEN) {
-		If(And(PDC0, 0x08)) {
-			Notify (\_PR_.CPU0, 0x80)	 // _PPC
-
-			If (And(PDC0, 0x10)) {
-				Sleep(100)
-				Notify(\_PR_.CPU0, 0x81) // _CST
-			}
-		}
-
-		If(And(PDC1, 0x08)) {
-			Notify (\_PR_.CPU1, 0x80)	 // _PPC
-			If (And(PDC1, 0x10)) {
-				Sleep(100)
-				Notify(\_PR_.CPU1, 0x81) // _CST
-			}
-		}
-
-	} Else { // UP
-		Notify (\_PR_.CPU0, 0x80)
-		Sleep(0x64)
-		Notify(\_PR_.CPU0, 0x81)
-	}
-
-	// Notify the Batteries
-	Notify(\_SB.BAT0, 0x80) // Execute BAT0 _BST
-	Notify(\_SB.BAT1, 0x80) // Execute BAT1 _BST
-}
-
 // Hardcoded for now..
 Name (CFGD, 0x113B69F1)
 
diff --git a/src/mainboard/getac/p470/dsdt.asl b/src/mainboard/getac/p470/dsdt.asl
index d89f75e..985a0c8 100644
--- a/src/mainboard/getac/p470/dsdt.asl
+++ b/src/mainboard/getac/p470/dsdt.asl
@@ -46,6 +46,8 @@ DefinitionBlock(
 	// Thermal Zone
 	#include "acpi/thermal.asl"
 
+	#include <cpu/intel/model_6dx/acpi/cpu.asl>
+
 	Scope (\_SB) {
 		Device (PCI0)
 		{
diff --git a/src/mainboard/ibase/mb899/dsdt.asl b/src/mainboard/ibase/mb899/dsdt.asl
index 80d586a..6d99f13 100644
--- a/src/mainboard/ibase/mb899/dsdt.asl
+++ b/src/mainboard/ibase/mb899/dsdt.asl
@@ -37,6 +37,8 @@ DefinitionBlock(
 
 	//#include "acpi/thermal.asl"
 
+	#include <cpu/intel/model_6dx/acpi/cpu.asl>
+
 	Scope (\_SB) {
 		Device (PCI0)
 		{
diff --git a/src/mainboard/intel/d945gclf/dsdt.asl b/src/mainboard/intel/d945gclf/dsdt.asl
index dd1f3a1..a39a3b3 100644
--- a/src/mainboard/intel/d945gclf/dsdt.asl
+++ b/src/mainboard/intel/d945gclf/dsdt.asl
@@ -41,6 +41,8 @@ DefinitionBlock(
 	// Thermal Zone
 	//#include "acpi/thermal.asl"
 
+	#include <cpu/intel/model_6dx/acpi/cpu.asl>
+
 	Scope (\_SB) {
 		Device (PCI0)
 		{
diff --git a/src/mainboard/kontron/986lcd-m/dsdt.asl b/src/mainboard/kontron/986lcd-m/dsdt.asl
index 4e455cc..5b942fc 100644
--- a/src/mainboard/kontron/986lcd-m/dsdt.asl
+++ b/src/mainboard/kontron/986lcd-m/dsdt.asl
@@ -37,6 +37,8 @@ DefinitionBlock(
 
 	//#include "acpi/thermal.asl"
 
+	#include <cpu/intel/model_6dx/acpi/cpu.asl>
+
 	Scope (\_SB) {
 		Device (PCI0)
 		{
diff --git a/src/mainboard/lenovo/t60/acpi/platform.asl b/src/mainboard/lenovo/t60/acpi/platform.asl
index c02ab75..002a9c6 100644
--- a/src/mainboard/lenovo/t60/acpi/platform.asl
+++ b/src/mainboard/lenovo/t60/acpi/platform.asl
@@ -19,10 +19,6 @@
  * MA 02110-1301 USA
  */
 
-/* These come from the dynamically created CPU SSDT */
-External(PDC0)
-External(PDC1)
-
 /* The APM port can be used for generating software SMIs */
 
 OperationRegion (APMP, SystemIO, 0xb2, 2)
@@ -95,42 +91,6 @@ Method(_WAK,1)
 	Return(Package(){0,0})
 }
 
-// Power notification
-
-External (\_PR_.CPU0, DeviceObj)
-External (\_PR_.CPU1, DeviceObj)
-
-Method (PNOT)
-{
-	If (MPEN) {
-		If(And(PDC0, 0x08)) {
-			Notify (\_PR_.CPU0, 0x80)	 // _PPC
-
-			If (And(PDC0, 0x10)) {
-				Sleep(100)
-				Notify(\_PR_.CPU0, 0x81) // _CST
-			}
-		}
-
-		If(And(PDC1, 0x08)) {
-			Notify (\_PR_.CPU1, 0x80)	 // _PPC
-			If (And(PDC1, 0x10)) {
-				Sleep(100)
-				Notify(\_PR_.CPU1, 0x81) // _CST
-			}
-		}
-
-	} Else { // UP
-		Notify (\_PR_.CPU0, 0x80)
-		Sleep(0x64)
-		Notify(\_PR_.CPU0, 0x81)
-	}
-
-	// Notify the Batteries
-	Notify(\_SB.PCI0.LPCB.EC.BAT0, 0x80) // Execute BAT1 _BST
-	Notify(\_SB.PCI0.LPCB.EC.BAT1, 0x80) // Execute BAT2 _BST
-}
-
 /* System Bus */
 
 Scope(\_SB)
diff --git a/src/mainboard/lenovo/t60/dsdt.asl b/src/mainboard/lenovo/t60/dsdt.asl
index 4122917..edbd8d7 100644
--- a/src/mainboard/lenovo/t60/dsdt.asl
+++ b/src/mainboard/lenovo/t60/dsdt.asl
@@ -45,6 +45,8 @@ DefinitionBlock(
 	// mainboard specific devices
 	#include "acpi/mainboard.asl"
 
+	#include <cpu/intel/model_6dx/acpi/cpu.asl>
+
 	Scope (\_SB) {
 		Device (PCI0)
 		{
diff --git a/src/mainboard/lenovo/x60/acpi/platform.asl b/src/mainboard/lenovo/x60/acpi/platform.asl
index c02ab75..002a9c6 100644
--- a/src/mainboard/lenovo/x60/acpi/platform.asl
+++ b/src/mainboard/lenovo/x60/acpi/platform.asl
@@ -19,10 +19,6 @@
  * MA 02110-1301 USA
  */
 
-/* These come from the dynamically created CPU SSDT */
-External(PDC0)
-External(PDC1)
-
 /* The APM port can be used for generating software SMIs */
 
 OperationRegion (APMP, SystemIO, 0xb2, 2)
@@ -95,42 +91,6 @@ Method(_WAK,1)
 	Return(Package(){0,0})
 }
 
-// Power notification
-
-External (\_PR_.CPU0, DeviceObj)
-External (\_PR_.CPU1, DeviceObj)
-
-Method (PNOT)
-{
-	If (MPEN) {
-		If(And(PDC0, 0x08)) {
-			Notify (\_PR_.CPU0, 0x80)	 // _PPC
-
-			If (And(PDC0, 0x10)) {
-				Sleep(100)
-				Notify(\_PR_.CPU0, 0x81) // _CST
-			}
-		}
-
-		If(And(PDC1, 0x08)) {
-			Notify (\_PR_.CPU1, 0x80)	 // _PPC
-			If (And(PDC1, 0x10)) {
-				Sleep(100)
-				Notify(\_PR_.CPU1, 0x81) // _CST
-			}
-		}
-
-	} Else { // UP
-		Notify (\_PR_.CPU0, 0x80)
-		Sleep(0x64)
-		Notify(\_PR_.CPU0, 0x81)
-	}
-
-	// Notify the Batteries
-	Notify(\_SB.PCI0.LPCB.EC.BAT0, 0x80) // Execute BAT1 _BST
-	Notify(\_SB.PCI0.LPCB.EC.BAT1, 0x80) // Execute BAT2 _BST
-}
-
 /* System Bus */
 
 Scope(\_SB)
diff --git a/src/mainboard/lenovo/x60/dsdt.asl b/src/mainboard/lenovo/x60/dsdt.asl
index 4122917..edbd8d7 100644
--- a/src/mainboard/lenovo/x60/dsdt.asl
+++ b/src/mainboard/lenovo/x60/dsdt.asl
@@ -45,6 +45,8 @@ DefinitionBlock(
 	// mainboard specific devices
 	#include "acpi/mainboard.asl"
 
+	#include <cpu/intel/model_6dx/acpi/cpu.asl>
+
 	Scope (\_SB) {
 		Device (PCI0)
 		{
diff --git a/src/mainboard/roda/rk886ex/acpi/ec.asl b/src/mainboard/roda/rk886ex/acpi/ec.asl
index fc0ae54..d174e98 100644
--- a/src/mainboard/roda/rk886ex/acpi/ec.asl
+++ b/src/mainboard/roda/rk886ex/acpi/ec.asl
@@ -107,6 +107,9 @@ Device(EC0)
 		Store("_Q30: AC In/Out", Debug)
 		Notify(ADP1, 0x80)	// Tell the Power Adapter
 		PNOT()			// and the CPU and Battery
+		// Notify the Batteries
+		Notify(BAT1, 0x80) // Execute BAT1 _BST
+		Notify(BAT2, 0x80) // Execute BAT2 _BST
 	}
 
 	Method (_Q31, 0)
diff --git a/src/mainboard/roda/rk886ex/acpi/platform.asl b/src/mainboard/roda/rk886ex/acpi/platform.asl
index 0dc988f..2cc6c87 100644
--- a/src/mainboard/roda/rk886ex/acpi/platform.asl
+++ b/src/mainboard/roda/rk886ex/acpi/platform.asl
@@ -19,10 +19,6 @@
  * MA 02110-1301 USA
  */
 
-/* These come from the dynamically created CPU SSDT */
-External(PDC0)
-External(PDC1)
-
 /* The APM port can be used for generating software SMIs */
 
 OperationRegion (APMP, SystemIO, 0xb2, 2)
@@ -95,42 +91,6 @@ Method(_WAK,1)
 	Return(Package(){0,0})
 }
 
-// Power notification
-
-External (\_PR_.CPU0, DeviceObj)
-External (\_PR_.CPU1, DeviceObj)
-
-Method (PNOT)
-{
-	If (MPEN) {
-		If(And(PDC0, 0x08)) {
-			Notify (\_PR_.CPU0, 0x80)	 // _PPC
-
-			If (And(PDC0, 0x10)) {
-				Sleep(100)
-				Notify(\_PR_.CPU0, 0x81) // _CST
-			}
-		}
-
-		If(And(PDC1, 0x08)) {
-			Notify (\_PR_.CPU1, 0x80)	 // _PPC
-			If (And(PDC1, 0x10)) {
-				Sleep(100)
-				Notify(\_PR_.CPU1, 0x81) // _CST
-			}
-		}
-
-	} Else { // UP
-		Notify (\_PR_.CPU0, 0x80)
-		Sleep(0x64)
-		Notify(\_PR_.CPU0, 0x81)
-	}
-
-	// Notify the Batteries
-	Notify(BAT1, 0x80) // Execute BAT1 _BST
-	Notify(BAT2, 0x80) // Execute BAT2 _BST
-}
-
 /* System Bus */
 
 Scope(\_SB)
diff --git a/src/mainboard/roda/rk886ex/dsdt.asl b/src/mainboard/roda/rk886ex/dsdt.asl
index 43d1609..8c5b9ca 100644
--- a/src/mainboard/roda/rk886ex/dsdt.asl
+++ b/src/mainboard/roda/rk886ex/dsdt.asl
@@ -43,6 +43,8 @@ DefinitionBlock(
 	// Thermal Zone
 	#include "acpi/thermal.asl"
 
+	#include <cpu/intel/model_6dx/acpi/cpu.asl>
+
 	Scope (\_SB) {
 		Device (PCI0)
 		{



More information about the coreboot-gerrit mailing list