]> xenbits.xensource.com Git - qemu-xen-unstable.git/commitdiff
pc: acpi: q35: move _PRT() into SSDT
authorIgor Mammedov <imammedo@redhat.com>
Mon, 28 Dec 2015 17:02:50 +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 103a08f3bd7ef837f2f0d6ccca0497ed0ee4e48b..0c23c22ff20d0efd6c31303e2059f8f5981e7727 100644 (file)
@@ -1634,7 +1634,28 @@ static void build_piix4_pci0_int(Aml *table)
 static void build_q35_pci0_int(Aml *table)
 {
     Aml *field;
+    Aml *method;
     Aml *sb_scope = aml_scope("_SB");
+    Aml *pci0_scope = aml_scope("PCI0");
+
+    method = aml_method("_PRT", 0, AML_NOTSERIALIZED);
+    {
+        Aml *if_ctx;
+        Aml *else_ctx;
+
+        /* PCI IRQ routing table, example from ACPI 2.0a specification,
+           section 6.2.8.1 */
+        /* Note: we provide the same info as the PCI routing
+           table of the Bochs BIOS */
+        if_ctx = aml_if(aml_equal(aml_name("PICF"), aml_int(0)));
+        aml_append(if_ctx, aml_return(aml_name("PRTP")));
+        aml_append(method, if_ctx);
+        else_ctx = aml_else();
+        aml_append(else_ctx, aml_return(aml_name("PRTA")));
+        aml_append(method, else_ctx);
+    }
+    aml_append(pci0_scope, method);
+    aml_append(sb_scope, pci0_scope);
 
     field = aml_field("PCI0.ISA.PIRQ", AML_BYTE_ACC, AML_NOLOCK, AML_PRESERVE);
     aml_append(field, aml_named_field("PRQA", 8));
index b01d4de6cf5e3278e3ab005f1a6597de9b615f9a..f265583a623d333375cc4d3f546dd1cd68077825 100644 (file)
@@ -238,18 +238,6 @@ DefinitionBlock (
 
                 prt_slot_gsiA(0x001f)
             })
-
-            Method(_PRT, 0, NotSerialized) {
-                /* PCI IRQ routing table, example from ACPI 2.0a specification,
-                   section 6.2.8.1 */
-                /* Note: we provide the same info as the PCI routing
-                   table of the Bochs BIOS */
-                If (LEqual(\PICF, Zero)) {
-                    Return (PRTP)
-                } Else {
-                    Return (PRTA)
-                }
-            }
         }
 
         External(LNKA, DeviceObj)