Patchwork [seabios] ec: add ASL for ACPI Embedded Controller

login
register
mail settings
Submitter liguang
Date May 29, 2013, 1:54 a.m.
Message ID <1369792452-14423-1-git-send-email-lig.fnst@cn.fujitsu.com>
Download mbox | patch
Permalink /patch/247087/
State New
Headers show

Comments

liguang - May 29, 2013, 1:54 a.m.
Signed-off-by: liguang <lig.fnst@cn.fujitsu.com>
---
 src/acpi-dsdt-isa.dsl |   26 ++++++++++++++++++++++++++
 src/q35-acpi-dsdt.dsl |    1 +
 2 files changed, 27 insertions(+), 0 deletions(-)

Patch

diff --git a/src/acpi-dsdt-isa.dsl b/src/acpi-dsdt-isa.dsl
index 23761db..2b9c3a0 100644
--- a/src/acpi-dsdt-isa.dsl
+++ b/src/acpi-dsdt-isa.dsl
@@ -99,4 +99,30 @@  Scope(\_SB.PCI0.ISA) {
             IRQNoFlags() { 3 }
         })
     }
+
+	Device (EC0) {
+		Name(_HID, EISAID ("PNP0C09"))
+		Name(_UID, 1)
+
+		Method(_CRS, 0) {
+			Name(BFFR, ResourceTemplate() {
+				IO(Decode16, 0x62, 0x62, 0, 1)      // ACPI DATA IN/OUT
+				IO(Decode16, 0x66, 0x66, 0, 1)      // CMD/STS
+	        })
+			Return(BFFR)
+		}
+
+		OperationRegion(ECFD, EmbeddedControl, 0, 0xFF)
+		Field(ECFD, ByteAcc, Lock, Preserve) {
+			Offset(1),
+			CPUS,   8,      // 1, CPU plug/unplug status map
+			CPUN,   8,      // 2, CPU index
+		}
+
+		Name(_GPE, 3)
+
+		Method(_Q01) {
+		}
+	}
+
 }
diff --git a/src/q35-acpi-dsdt.dsl b/src/q35-acpi-dsdt.dsl
index c031d83..056b4f8 100644
--- a/src/q35-acpi-dsdt.dsl
+++ b/src/q35-acpi-dsdt.dsl
@@ -167,6 +167,7 @@  DefinitionBlock (
                 FDEN,   1
             }
         }
+#include "ec.dsl"
     }
 
 #include "acpi-dsdt-isa.dsl"