diff mbox

Memory hotplug

Message ID 5e93dcec1001100037r72669215k1c6fb38e54e8d3e5@mail.gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ryota Ozaki Jan. 10, 2010, 8:37 a.m. UTC
None
diff mbox

Patch

diff --git a/src/acpi-dsdt.dsl b/src/acpi-dsdt.dsl
index cc31112..5211408 100644
--- a/src/acpi-dsdt.dsl
+++ b/src/acpi-dsdt.dsl
@@ -704,6 +704,7 @@  DefinitionBlock (
             Return(0x01)
         }
         Method(_L03) {
+            Notify(\_SB.MEM0, 1)
             Return(0x01)
         }
         Method(_L04) {
@@ -744,4 +745,51 @@  DefinitionBlock (
         }
     }
 
+    Scope( \_SB){
+
+        // FIXME: currently support just one fixed Memory Device
+        Device(MEM0) {
+            Name(_HID, EISAID("PNP0C80"))
+            Name(_UID, 0)
+
+            // FIXME: must change the state dynamically
+            Method (_STA, 0) {
+                //Store (\_SB.PCI0.PX13.DRSA, Local0)
+                //And (Local0, 0x80000000, Local0)
+                //If (LEqual (Local0, 0))
+                //{  
+                //    Return (0x00) // not present
+                //}
+                //ElseIf (LEqual (Local0, 0))
+                //{
+                //    Return (0x0D) // disabled
+                //}
+                //Else
+                //{  
+                    Return (0x0F) // enabled
+                //}
+            }
+
+            Name(_CRS, ResourceTemplate() {
+                QwordMemory(
+                    ResourceConsumer,
+                    ,
+                    MinFixed, // _MINF
+                    MaxFixed, // _MAXF
+                    Cacheable, // _MEM
+                    ReadWrite, // _RW
+                    0x0FFFFFFF, // _GRA
+                    0x20000000, // _MIN // from 512M
+                    0x3FFFFFFF, // _MAX // upto 1024M
+                    0x00000000, // _TRA
+                    0x20000000, // _LEN
+                    )
+            })
+
+            // Are these fields needed?
+            //Method (_SRS, 1) { }
+            //Method (_DIS, 0) { }
+        }
+    }
+
 }