[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 16/59] pc: acpi: memhp: move \_GPE._E03 into SSDT
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL 16/59] pc: acpi: memhp: move \_GPE._E03 into SSDT |
Date: |
Fri, 8 Jan 2016 16:19:20 +0200 |
From: Igor Mammedov <address@hidden>
in addition remove no longer needed acpi-dsdt-mem-hotplug.dsl.
Signed-off-by: Igor Mammedov <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
include/hw/acpi/memory_hotplug.h | 5 +++++
include/hw/acpi/pc-hotplug.h | 2 --
hw/i386/acpi-build.c | 6 ++++++
hw/i386/acpi-dsdt-mem-hotplug.dsl | 16 ----------------
hw/i386/acpi-dsdt.dsl | 5 -----
hw/i386/q35-acpi-dsdt.dsl | 5 -----
6 files changed, 11 insertions(+), 28 deletions(-)
delete mode 100644 hw/i386/acpi-dsdt-mem-hotplug.dsl
diff --git a/include/hw/acpi/memory_hotplug.h b/include/hw/acpi/memory_hotplug.h
index b6e9f50..de164f2 100644
--- a/include/hw/acpi/memory_hotplug.h
+++ b/include/hw/acpi/memory_hotplug.h
@@ -47,6 +47,11 @@ extern const VMStateDescription vmstate_memory_hotplug;
void acpi_memory_ospm_status(MemHotplugState *mem_st, ACPIOSTInfoList ***list);
+#define MEMORY_HOTPLUG_DEVICE MHPD
+#define MEMORY_SLOT_SCAN_METHOD MSCN
+#define MEMORY_HOTPLUG_HANDLER_PATH "\\_SB.PCI0." \
+ stringify(MEMORY_HOTPLUG_DEVICE) "." stringify(MEMORY_SLOT_SCAN_METHOD)
+
void build_memory_hotplug_aml(Aml *ctx, uint32_t nr_mem,
uint16_t io_base, uint16_t io_len);
#endif
diff --git a/include/hw/acpi/pc-hotplug.h b/include/hw/acpi/pc-hotplug.h
index 77b1569..e5bb321 100644
--- a/include/hw/acpi/pc-hotplug.h
+++ b/include/hw/acpi/pc-hotplug.h
@@ -32,7 +32,6 @@
#define ACPI_MEMORY_HOTPLUG_IO_LEN 24
#define ACPI_MEMORY_HOTPLUG_BASE 0x0a00
-#define MEMORY_HOTPLUG_DEVICE MHPD
#define MEMORY_SLOTS_NUMBER MDNR
#define MEMORY_HOTPLUG_IO_REGION HPMR
#define MEMORY_SLOT_ADDR_LOW MRBL
@@ -54,6 +53,5 @@
#define MEMORY_SLOT_PROXIMITY_METHOD MPXM
#define MEMORY_SLOT_EJECT_METHOD MEJ0
#define MEMORY_SLOT_NOTIFY_METHOD MTFY
-#define MEMORY_SLOT_SCAN_METHOD MSCN
#endif
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 4446d38..3c2b889 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -1083,6 +1083,12 @@ 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");
+ method = aml_method("_E03", 0, AML_NOTSERIALIZED);
+ aml_append(method, aml_call0(MEMORY_HOTPLUG_HANDLER_PATH));
+ aml_append(scope, method);
+ aml_append(ssdt, scope);
+
bus = PC_MACHINE(machine)->bus;
if (bus) {
QLIST_FOREACH(bus, &bus->child, sibling) {
diff --git a/hw/i386/acpi-dsdt-mem-hotplug.dsl
b/hw/i386/acpi-dsdt-mem-hotplug.dsl
deleted file mode 100644
index 20c5ec1..0000000
--- a/hw/i386/acpi-dsdt-mem-hotplug.dsl
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, see <http://www.gnu.org/licenses/>.
- */
-
- External(\_SB.PCI0.MEMORY_HOTPLUG_DEVICE.MEMORY_SLOT_SCAN_METHOD,
MethodObj)
diff --git a/hw/i386/acpi-dsdt.dsl b/hw/i386/acpi-dsdt.dsl
index 8dba096..9cf1b88 100644
--- a/hw/i386/acpi-dsdt.dsl
+++ b/hw/i386/acpi-dsdt.dsl
@@ -250,7 +250,6 @@ DefinitionBlock (
#include "hw/acpi/pc-hotplug.h"
#define CPU_STATUS_BASE PIIX4_CPU_HOTPLUG_IO_BASE
#include "acpi-dsdt-cpu-hotplug.dsl"
-#include "acpi-dsdt-mem-hotplug.dsl"
/****************************************************************
@@ -271,10 +270,6 @@ DefinitionBlock (
// CPU hotplug event
\_SB.PRSC()
}
- Method(_E03) {
- // Memory hotplug event
- \_SB.PCI0.MEMORY_HOTPLUG_DEVICE.MEMORY_SLOT_SCAN_METHOD()
- }
Method(_L04) {
}
Method(_L05) {
diff --git a/hw/i386/q35-acpi-dsdt.dsl b/hw/i386/q35-acpi-dsdt.dsl
index 7be7b37..f950f39 100644
--- a/hw/i386/q35-acpi-dsdt.dsl
+++ b/hw/i386/q35-acpi-dsdt.dsl
@@ -387,7 +387,6 @@ DefinitionBlock (
#include "hw/acpi/pc-hotplug.h"
#define CPU_STATUS_BASE ICH9_CPU_HOTPLUG_IO_BASE
#include "acpi-dsdt-cpu-hotplug.dsl"
-#include "acpi-dsdt-mem-hotplug.dsl"
/****************************************************************
@@ -404,10 +403,6 @@ DefinitionBlock (
// CPU hotplug event
\_SB.PRSC()
}
- Method(_E03) {
- // Memory hotplug event
- \_SB.PCI0.MEMORY_HOTPLUG_DEVICE.MEMORY_SLOT_SCAN_METHOD()
- }
Method(_L04) {
}
Method(_L05) {
--
MST
- [Qemu-devel] [PULL 05/59] pc: acpi: memhp: prepare context in SSDT for moving memhp DSDT code, (continued)
- [Qemu-devel] [PULL 05/59] pc: acpi: memhp: prepare context in SSDT for moving memhp DSDT code, Michael S. Tsirkin, 2016/01/08
- [Qemu-devel] [PULL 06/59] pc: acpi: memhp: move MHPD._STA method into SSDT, Michael S. Tsirkin, 2016/01/08
- [Qemu-devel] [PULL 07/59] pc: acpi: memhp: move MHPD.MLCK mutex into SSDT, Michael S. Tsirkin, 2016/01/08
- [Qemu-devel] [PULL 08/59] pc: acpi: memhp: move MHPD.MSCN method into SSDT, Michael S. Tsirkin, 2016/01/08
- [Qemu-devel] [PULL 09/59] pc: acpi: memhp: move MHPD.MRST method into SSDT, Michael S. Tsirkin, 2016/01/08
- [Qemu-devel] [PULL 11/59] pc: acpi: memhp: move MHPD.MOST method into SSDT, Michael S. Tsirkin, 2016/01/08
- [Qemu-devel] [PULL 10/59] pc: acpi: memhp: move MHPD.MPXM method into SSDT, Michael S. Tsirkin, 2016/01/08
- [Qemu-devel] [PULL 12/59] pc: acpi: memhp: move MHPD.MEJ0 method into SSDT, Michael S. Tsirkin, 2016/01/08
- [Qemu-devel] [PULL 13/59] pc: acpi: memhp: move MHPD.MCRS method into SSDT, Michael S. Tsirkin, 2016/01/08
- [Qemu-devel] [PULL 14/59] pc: acpi: memhp: move MHPD Device into SSDT, Michael S. Tsirkin, 2016/01/08
- [Qemu-devel] [PULL 16/59] pc: acpi: memhp: move \_GPE._E03 into SSDT,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL 15/59] pc: acpi: factor out memhp code from build_ssdt() into separate function, Michael S. Tsirkin, 2016/01/08
- [Qemu-devel] [PULL 17/59] pc: acpi: memhp: drop not needed stringify(MEMORY_foo) usage, Michael S. Tsirkin, 2016/01/08
- [Qemu-devel] [PULL 18/59] pc: acpi: drop unused CPU_STATUS_LEN from DSDT, Michael S. Tsirkin, 2016/01/08
- [Qemu-devel] [PULL 19/59] pc: acpi: cpuhp: move CPEJ() method to SSDT, Michael S. Tsirkin, 2016/01/08
- [Qemu-devel] [PULL 20/59] pc: acpi: cpuhp: move CPMA() method into SSDT, Michael S. Tsirkin, 2016/01/08
- [Qemu-devel] [PULL 21/59] pc: acpi: cpuhp: move CPST() method into SSDT, Michael S. Tsirkin, 2016/01/08
- [Qemu-devel] [PULL 22/59] pc: acpi: cpuhp: move PRSC() method into SSDT, Michael S. Tsirkin, 2016/01/08
- [Qemu-devel] [PULL 25/59] pc: acpi: move HPET from DSDT to SSDT, Michael S. Tsirkin, 2016/01/08
- [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