[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 44/59] pc: acpi: q35: move IQST() into SSDT
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL 44/59] pc: acpi: q35: move IQST() into SSDT |
Date: |
Fri, 8 Jan 2016 16:20:45 +0200 |
From: Igor Mammedov <address@hidden>
Signed-off-by: Igor Mammedov <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
hw/i386/acpi-build.c | 26 +++++++++++++++-----------
hw/i386/q35-acpi-dsdt.dsl | 8 --------
2 files changed, 15 insertions(+), 19 deletions(-)
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 5bb544b..f454ac5 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -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")));
diff --git a/hw/i386/q35-acpi-dsdt.dsl b/hw/i386/q35-acpi-dsdt.dsl
index 85b0a2c..ec8a48c 100644
--- a/hw/i386/q35-acpi-dsdt.dsl
+++ b/hw/i386/q35-acpi-dsdt.dsl
@@ -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)
--
MST
- [Qemu-devel] [PULL 34/59] pc: acpi: move remaining GPE handlers into SSDT, (continued)
- [Qemu-devel] [PULL 34/59] pc: acpi: move remaining GPE handlers into SSDT, Michael S. Tsirkin, 2016/01/08
- [Qemu-devel] [PULL 35/59] pc: acpi: pci: move link devices into SSDT, Michael S. Tsirkin, 2016/01/08
- [Qemu-devel] [PULL 37/59] pc: acpi: piix4: move IQST() into SSDT, Michael S. Tsirkin, 2016/01/08
- [Qemu-devel] [PULL 36/59] pc: acpi: piix4: move IQCR() into SSDT, Michael S. Tsirkin, 2016/01/08
- [Qemu-devel] [PULL 38/59] pc: acpi: piix4: move PCI0._PRT() into SSDT, Michael S. Tsirkin, 2016/01/08
- [Qemu-devel] [PULL 39/59] pc: acpi: piix4: move remaining PCI hotplug bits into SSDT, Michael S. Tsirkin, 2016/01/08
- [Qemu-devel] [PULL 40/59] pc: acpi: piix4: acpi move PCI0 device to SSDT, Michael S. Tsirkin, 2016/01/08
- [Qemu-devel] [PULL 41/59] pc: acpi: q35: move GSI links to SSDT, Michael S. Tsirkin, 2016/01/08
- [Qemu-devel] [PULL 42/59] pc: acpi: q35: move link devices to SSDT, Michael S. Tsirkin, 2016/01/08
- [Qemu-devel] [PULL 43/59] pc: acpi: q35: move IQCR() into SSDT, Michael S. Tsirkin, 2016/01/08
- [Qemu-devel] [PULL 44/59] pc: acpi: q35: move IQST() into SSDT,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL 45/59] pc: acpi: q35: move ISA bridge into SSDT, Michael S. Tsirkin, 2016/01/08
- [Qemu-devel] [PULL 47/59] pc: acpi: q35: move PRTA routing table into SSDT, Michael S. Tsirkin, 2016/01/08
- [Qemu-devel] [PULL 46/59] pc: acpi: q35: move _PRT() into SSDT, Michael S. Tsirkin, 2016/01/08
- [Qemu-devel] [PULL 49/59] pc: acpi: q35: move _PIC() method into SSDT, Michael S. Tsirkin, 2016/01/08
- [Qemu-devel] [PULL 48/59] pc: acpi: q35: move PRTP routing table into SSDT, Michael S. Tsirkin, 2016/01/08
- [Qemu-devel] [PULL 50/59] pc: acpi: q35: move PCI0._OSC() method into SSDT, Michael S. Tsirkin, 2016/01/08
- [Qemu-devel] [PULL 52/59] pc: acpi: q35: PCST, PCSB opregions and PCIB field into SSDT, Michael S. Tsirkin, 2016/01/08
- [Qemu-devel] [PULL 51/59] pc: acpi: q35: move PCI0 device definition into SSDT, Michael S. Tsirkin, 2016/01/08
- [Qemu-devel] [PULL 53/59] pc: acpi: switch to AML API composed DSDT, Michael S. Tsirkin, 2016/01/08
- [Qemu-devel] [PULL 56/59] Add VMSTATE_STRUCT_VARRAY_KNOWN, Michael S. Tsirkin, 2016/01/08