diff options
author | Igor Mammedov | 2015-12-28 18:02:50 +0100 |
---|---|---|
committer | Michael S. Tsirkin | 2016-01-09 22:20:19 +0100 |
commit | 0dafe3b33603dd64d1385f8943dd056d4058cbf5 (patch) | |
tree | 360c775b7b85f18e8894eceaf8081cac4b8643dd /hw/i386/acpi-build.c | |
parent | pc: acpi: q35: move ISA bridge into SSDT (diff) | |
download | qemu-0dafe3b33603dd64d1385f8943dd056d4058cbf5.tar.gz qemu-0dafe3b33603dd64d1385f8943dd056d4058cbf5.tar.xz qemu-0dafe3b33603dd64d1385f8943dd056d4058cbf5.zip |
pc: acpi: q35: move _PRT() into SSDT
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>
Diffstat (limited to 'hw/i386/acpi-build.c')
-rw-r--r-- | hw/i386/acpi-build.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 103a08f3bd..0c23c22ff2 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -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)); |