[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 34/59] pc: acpi: move remaining GPE handlers into SSD
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL 34/59] pc: acpi: move remaining GPE handlers into SSDT |
Date: |
Fri, 8 Jan 2016 16:20:14 +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 | 30 +++++++++++++++++++++++++++++-
hw/i386/acpi-dsdt.dsl | 40 ----------------------------------------
hw/i386/q35-acpi-dsdt.dsl | 36 ------------------------------------
3 files changed, 29 insertions(+), 77 deletions(-)
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 0190dd9..c0f3c82 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -1526,8 +1526,23 @@ build_ssdt(GArray *table_data, GArray *linker,
build_memory_hotplug_aml(ssdt, nr_mem, pm->mem_hp_io_base,
pm->mem_hp_io_len);
- scope = aml_scope("\\_GPE");
+ scope = aml_scope("_GPE");
{
+ aml_append(scope, aml_name_decl("_HID", aml_string("ACPI0006")));
+
+ aml_append(scope, aml_method("_L00", 0, AML_NOTSERIALIZED));
+
+ if (misc->is_piix4) {
+ method = aml_method("_E01", 0, AML_NOTSERIALIZED);
+ aml_append(method,
+ aml_acquire(aml_name("\\_SB.PCI0.BLCK"), 0xFFFF));
+ aml_append(method, aml_call0("\\_SB.PCI0.PCNT"));
+ aml_append(method, aml_release(aml_name("\\_SB.PCI0.BLCK")));
+ aml_append(scope, method);
+ } else {
+ aml_append(scope, aml_method("_L01", 0, AML_NOTSERIALIZED));
+ }
+
method = aml_method("_E02", 0, AML_NOTSERIALIZED);
aml_append(method, aml_call0("\\_SB." CPU_SCAN_METHOD));
aml_append(scope, method);
@@ -1535,6 +1550,19 @@ build_ssdt(GArray *table_data, GArray *linker,
method = aml_method("_E03", 0, AML_NOTSERIALIZED);
aml_append(method, aml_call0(MEMORY_HOTPLUG_HANDLER_PATH));
aml_append(scope, method);
+
+ aml_append(scope, aml_method("_L04", 0, AML_NOTSERIALIZED));
+ aml_append(scope, aml_method("_L05", 0, AML_NOTSERIALIZED));
+ aml_append(scope, aml_method("_L06", 0, AML_NOTSERIALIZED));
+ aml_append(scope, aml_method("_L07", 0, AML_NOTSERIALIZED));
+ aml_append(scope, aml_method("_L08", 0, AML_NOTSERIALIZED));
+ aml_append(scope, aml_method("_L09", 0, AML_NOTSERIALIZED));
+ aml_append(scope, aml_method("_L0A", 0, AML_NOTSERIALIZED));
+ aml_append(scope, aml_method("_L0B", 0, AML_NOTSERIALIZED));
+ aml_append(scope, aml_method("_L0C", 0, AML_NOTSERIALIZED));
+ aml_append(scope, aml_method("_L0D", 0, AML_NOTSERIALIZED));
+ aml_append(scope, aml_method("_L0E", 0, AML_NOTSERIALIZED));
+ aml_append(scope, aml_method("_L0F", 0, AML_NOTSERIALIZED));
}
aml_append(ssdt, scope);
diff --git a/hw/i386/acpi-dsdt.dsl b/hw/i386/acpi-dsdt.dsl
index 11e2e61..c9b2725 100644
--- a/hw/i386/acpi-dsdt.dsl
+++ b/hw/i386/acpi-dsdt.dsl
@@ -197,44 +197,4 @@ DefinitionBlock (
Method(_SRS, 1, NotSerialized) { }
}
}
-
-/****************************************************************
- * General purpose events
- ****************************************************************/
- Scope(\_GPE) {
- Name(_HID, "ACPI0006")
-
- Method(_L00) {
- }
- Method(_E01) {
- // PCI hotplug event
- Acquire(\_SB.PCI0.BLCK, 0xFFFF)
- \_SB.PCI0.PCNT()
- Release(\_SB.PCI0.BLCK)
- }
- Method(_L04) {
- }
- Method(_L05) {
- }
- Method(_L06) {
- }
- Method(_L07) {
- }
- Method(_L08) {
- }
- Method(_L09) {
- }
- Method(_L0A) {
- }
- Method(_L0B) {
- }
- Method(_L0C) {
- }
- Method(_L0D) {
- }
- Method(_L0E) {
- }
- Method(_L0F) {
- }
- }
}
diff --git a/hw/i386/q35-acpi-dsdt.dsl b/hw/i386/q35-acpi-dsdt.dsl
index 4862ded..e157615 100644
--- a/hw/i386/q35-acpi-dsdt.dsl
+++ b/hw/i386/q35-acpi-dsdt.dsl
@@ -375,40 +375,4 @@ DefinitionBlock (
define_gsi_link(GSIG, 0, 0x16)
define_gsi_link(GSIH, 0, 0x17)
}
-
-/****************************************************************
- * General purpose events
- ****************************************************************/
- Scope(\_GPE) {
- Name(_HID, "ACPI0006")
-
- Method(_L00) {
- }
- Method(_L01) {
- }
- Method(_L04) {
- }
- Method(_L05) {
- }
- Method(_L06) {
- }
- Method(_L07) {
- }
- Method(_L08) {
- }
- Method(_L09) {
- }
- Method(_L0A) {
- }
- Method(_L0B) {
- }
- Method(_L0C) {
- }
- Method(_L0D) {
- }
- Method(_L0E) {
- }
- Method(_L0F) {
- }
- }
}
--
MST
- [Qemu-devel] [PULL 23/59] pc: acpi: cpuhp: move \_GPE._E02() into SSDT, (continued)
- [Qemu-devel] [PULL 23/59] pc: acpi: cpuhp: move \_GPE._E02() into SSDT, Michael S. Tsirkin, 2016/01/08
- [Qemu-devel] [PULL 24/59] pc: acpi: factor out cpu hotplug code from build_ssdt() into separate function, Michael S. Tsirkin, 2016/01/08
- [Qemu-devel] [PULL 26/59] pc: acpi: move DBUG() from DSDT to SSDT, Michael S. Tsirkin, 2016/01/08
- [Qemu-devel] [PULL 27/59] pc: acpi: move RTC device from DSDT to SSDT, Michael S. Tsirkin, 2016/01/08
- [Qemu-devel] [PULL 28/59] pc: acpi: move KBD device from DSDT to SSDT, Michael S. Tsirkin, 2016/01/08
- [Qemu-devel] [PULL 29/59] pc: acpi: move MOU device from DSDT to SSDT, Michael S. Tsirkin, 2016/01/08
- [Qemu-devel] [PULL 30/59] pc: acpi: move FDC0 device from DSDT to SSDT, Michael S. Tsirkin, 2016/01/08
- [Qemu-devel] [PULL 31/59] pc: acpi: move LPT device from DSDT to SSDT, Michael S. Tsirkin, 2016/01/08
- [Qemu-devel] [PULL 32/59] pc: acpi: move COM devices from DSDT to SSDT, Michael S. Tsirkin, 2016/01/08
- [Qemu-devel] [PULL 33/59] pc: acpi: move PIIX4 isa-bridge and pm devices into SSDT, Michael S. Tsirkin, 2016/01/08
- [Qemu-devel] [PULL 34/59] pc: acpi: move remaining GPE handlers into SSDT,
Michael S. Tsirkin <=
- [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, 2016/01/08