]> git.proxmox.com Git - mirror_qemu.git/commitdiff
pc: acpi: q35: move IQST() into SSDT
authorIgor Mammedov <imammedo@redhat.com>
Mon, 28 Dec 2015 17:02:48 +0000 (18:02 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Sat, 9 Jan 2016 21:20:19 +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/q35-acpi-dsdt.dsl

index 5bb544ba520027fee417793d6884e2710a130bb7..f454ac50e1544d03a609d1ff582b975d576d5208 100644 (file)
@@ -1555,12 +1555,24 @@ static Aml *build_iqcr_method(bool is_piix4)
     return method;
 }
 
+/* _STA method - get status */
+static Aml *build_irq_status_method(void)
+{
+    Aml *if_ctx;
+    Aml *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)));
+    return method;
+}
+
 static void build_piix4_pci0_int(Aml *table)
 {
     Aml *dev;
     Aml *crs;
     Aml *field;
-    Aml *if_ctx;
     Aml *method;
     uint32_t irqs;
     Aml *sb_scope = aml_scope("_SB");
@@ -1576,16 +1588,7 @@ 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);
-
+    aml_append(sb_scope, build_irq_status_method());
     aml_append(sb_scope, build_iqcr_method(true));
 
     aml_append(sb_scope, build_link_dev("LNKA", 0, aml_name("PRQ0")));
@@ -1632,6 +1635,7 @@ static void build_q35_pci0_int(Aml *table)
 {
     Aml *sb_scope = aml_scope("_SB");
 
+    aml_append(sb_scope, build_irq_status_method());
     aml_append(sb_scope, build_iqcr_method(false));
 
     aml_append(sb_scope, build_link_dev("LNKA", 0, aml_name("PRQA")));
index 85b0a2c6f6c5172f198ed45c029e9e43ea1a6e7f..ec8a48c394f900b88546465efc584acd09186742 100644 (file)
@@ -298,14 +298,6 @@ DefinitionBlock (
             PRQH,   8
         }
 
-        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)