pc: acpi: piix4: move IQST() into SSDT
authorIgor Mammedov <imammedo@redhat.com>
Mon, 28 Dec 2015 17:02:41 +0000 (18:02 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Sat, 9 Jan 2016 21:20:18 +0000 (23:20 +0200)
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/i386/acpi-build.c
hw/i386/acpi-dsdt.dsl

index 2f2ff67..9ae34df 100644 (file)
@@ -1482,6 +1482,16 @@ static void build_piix4_pci0_int(Aml *table)
     aml_append(field, aml_named_field("PRQ3", 8));
     aml_append(sb_scope, field);
 
+    /* _STA method - get status */
+    method = aml_method("IQST", 1, AML_NOTSERIALIZED);
+    {
+        if_ctx = aml_if(aml_and(aml_int(0x80), aml_arg(0), NULL));
+        aml_append(if_ctx, aml_return(aml_int(0x09)));
+        aml_append(method, if_ctx);
+        aml_append(method, aml_return(aml_int(0x0B)));
+    }
+    aml_append(sb_scope, method);
+
     /* _CRS method - get current settings */
     method = aml_method("IQCR", 1, AML_SERIALIZED);
     {
index 1f58ec4..bc6bd45 100644 (file)
@@ -132,15 +132,6 @@ DefinitionBlock (
         External(PRQ1, FieldUnitObj)
         External(PRQ2, FieldUnitObj)
         External(PRQ3, FieldUnitObj)
-
-        Method(IQST, 1, NotSerialized) {
-            // _STA method - get status
-            If (And(0x80, Arg0)) {
-                Return (0x09)
-            }
-            Return (0x0B)
-        }
-
         External(LNKA, DeviceObj)
         External(LNKB, DeviceObj)
         External(LNKC, DeviceObj)