Patchwork [RFC,v4,29/30,SeaBIOS] Implement _PS3 method for memory device

login
register
mail settings
Submitter Vasilis Liaskovitis
Date Dec. 18, 2012, 12:41 p.m.
Message ID <1355834518-17989-30-git-send-email-vasilis.liaskovitis@profitbricks.com>
Download mbox | patch
Permalink /patch/207107/
State New
Headers show

Comments

Vasilis Liaskovitis - Dec. 18, 2012, 12:41 p.m.
---
 src/acpi-dsdt-mem-hotplug.dsl |   15 +++++++++++++++
 src/ssdt-mem.dsl              |    4 ++++
 2 files changed, 19 insertions(+), 0 deletions(-)

Patch

diff --git a/src/acpi-dsdt-mem-hotplug.dsl b/src/acpi-dsdt-mem-hotplug.dsl
index a648bee..7d7c078 100644
--- a/src/acpi-dsdt-mem-hotplug.dsl
+++ b/src/acpi-dsdt-mem-hotplug.dsl
@@ -49,6 +49,13 @@  Scope(\_SB) {
             MIF, 8
         }
 
+        /* Memory _PS3 byte */
+        OperationRegion(MPSB, SystemIO, 0xafa4, 1)
+        Field (MPSB, ByteAcc, NoLock, Preserve)
+        {
+            MPS, 8
+        }
+
         Method(MESC, 0) {
             // Local5 = active memdevice bitmap
             Store (MES, Local5)
@@ -90,6 +97,14 @@  Scope(\_SB) {
             Sleep(200)
         }
 
+
+        Method (MPS3, 1, NotSerialized) {
+            // _PS3 method - power-off method
+            Store(Arg0, MPS)
+            Store(Zero, Index(MEON, Arg0))
+            Sleep(200)
+        }
+
         Method (MOST, 3, Serialized) {
             // _OST method - OS status indication
             Switch (And(Arg0, 0xFF)) {
diff --git a/src/ssdt-mem.dsl b/src/ssdt-mem.dsl
index 47a3b4f..9827a58 100644
--- a/src/ssdt-mem.dsl
+++ b/src/ssdt-mem.dsl
@@ -39,6 +39,7 @@  DefinitionBlock ("ssdt-mem.aml", "SSDT", 0x02, "BXPC", "CSSDT", 0x1)
         External(CMST, MethodObj)
         External(MPEJ, MethodObj)
         External(MOST, MethodObj)
+        External(MPS3, MethodObj)
 
         Name(_CRS, ResourceTemplate() {
             QwordMemory(
@@ -64,6 +65,9 @@  DefinitionBlock ("ssdt-mem.aml", "SSDT", 0x02, "BXPC", "CSSDT", 0x1)
         Method (_OST, 3) {
             MOST(Arg0, Arg1, ID)
         }
+        Method (_PS3, 0) {
+            MPS3(ID)
+        }
     }
 }