aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorIgor Mammedov <imammedo@redhat.com>2015-12-28 18:02:40 +0100
committerMichael S. Tsirkin <mst@redhat.com>2016-01-09 23:20:18 +0200
commit100681ccf1f97d220fbc620c9226701773cc7eaf (patch)
tree8be1f7566899f7c37220acde11bb5d57abebeab8 /hw
parentc35b6e8032105a4f457508d0a9e4bcd6e0392fc1 (diff)
downloadqemu-100681ccf1f97d220fbc620c9226701773cc7eaf.zip
qemu-100681ccf1f97d220fbc620c9226701773cc7eaf.tar.gz
qemu-100681ccf1f97d220fbc620c9226701773cc7eaf.tar.bz2
pc: acpi: piix4: move IQCR() 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')
-rw-r--r--hw/i386/acpi-build.c20
-rw-r--r--hw/i386/acpi-dsdt.dsl11
2 files changed, 20 insertions, 11 deletions
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 799efe5..2f2ff67 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -1470,6 +1470,7 @@ 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");
@@ -1481,6 +1482,25 @@ static void build_piix4_pci0_int(Aml *table)
aml_append(field, aml_named_field("PRQ3", 8));
aml_append(sb_scope, field);
+ /* _CRS method - get current settings */
+ method = aml_method("IQCR", 1, AML_SERIALIZED);
+ {
+ crs = aml_resource_template();
+ irqs = 0;
+ aml_append(crs, aml_interrupt(AML_CONSUMER, AML_LEVEL,
+ AML_ACTIVE_HIGH, AML_SHARED, &irqs, 1));
+ aml_append(method, aml_name_decl("PRR0", crs));
+
+ aml_append(method,
+ aml_create_dword_field(aml_name("PRR0"), aml_int(5), "PRRI"));
+
+ if_ctx = aml_if(aml_lless(aml_arg(0), aml_int(0x80)));
+ aml_append(if_ctx, aml_store(aml_arg(0), aml_name("PRRI")));
+ aml_append(method, if_ctx);
+ aml_append(method, aml_return(aml_name("PRR0")));
+ }
+ aml_append(sb_scope, method);
+
aml_append(sb_scope, build_link_dev("LNKA", 0, aml_name("PRQ0")));
aml_append(sb_scope, build_link_dev("LNKB", 1, aml_name("PRQ1")));
aml_append(sb_scope, build_link_dev("LNKC", 2, aml_name("PRQ2")));
diff --git a/hw/i386/acpi-dsdt.dsl b/hw/i386/acpi-dsdt.dsl
index b74cffd..1f58ec4 100644
--- a/hw/i386/acpi-dsdt.dsl
+++ b/hw/i386/acpi-dsdt.dsl
@@ -140,17 +140,6 @@ DefinitionBlock (
}
Return (0x0B)
}
- Method(IQCR, 1, Serialized) {
- // _CRS method - get current settings
- Name(PRR0, ResourceTemplate() {
- Interrupt(, Level, ActiveHigh, Shared) { 0 }
- })
- CreateDWordField(PRR0, 0x05, PRRI)
- If (LLess(Arg0, 0x80)) {
- Store(Arg0, PRRI)
- }
- Return (PRR0)
- }
External(LNKA, DeviceObj)
External(LNKB, DeviceObj)