diff options
author | Igor Mammedov | 2014-06-02 15:25:16 +0200 |
---|---|---|
committer | Michael S. Tsirkin | 2014-06-19 15:41:49 +0200 |
commit | 3ef77acab21210b7d0853bf95798f8e0e748e500 (patch) | |
tree | c042c6c143ed7df50913e5b521a364e093b444d8 /include | |
parent | acpi: rename cpu_hotplug_defs.h to pc-hotplug.h (diff) | |
download | qemu-3ef77acab21210b7d0853bf95798f8e0e748e500.tar.gz qemu-3ef77acab21210b7d0853bf95798f8e0e748e500.tar.xz qemu-3ef77acab21210b7d0853bf95798f8e0e748e500.zip |
acpi: memory hotplug ACPI hardware implementation
- implements QEMU hardware part of memory hotplug protocol
described at "docs/specs/acpi_mem_hotplug.txt"
- handles only memory add notification event for now
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 'include')
-rw-r--r-- | include/hw/acpi/memory_hotplug.h | 29 | ||||
-rw-r--r-- | include/hw/acpi/pc-hotplug.h | 3 |
2 files changed, 32 insertions, 0 deletions
diff --git a/include/hw/acpi/memory_hotplug.h b/include/hw/acpi/memory_hotplug.h new file mode 100644 index 0000000000..8f90f72fdb --- /dev/null +++ b/include/hw/acpi/memory_hotplug.h @@ -0,0 +1,29 @@ +#ifndef QEMU_HW_ACPI_MEMORY_HOTPLUG_H +#define QEMU_HW_ACPI_MEMORY_HOTPLUG_H + +#include "hw/qdev-core.h" +#include "hw/acpi/acpi.h" + +#define ACPI_MEMORY_HOTPLUG_STATUS 8 + +typedef struct MemStatus { + DeviceState *dimm; + bool is_enabled; + bool is_inserting; + uint32_t ost_event; + uint32_t ost_status; +} MemStatus; + +typedef struct MemHotplugState { + MemoryRegion io; + uint32_t selector; + uint32_t dev_count; + MemStatus *devs; +} MemHotplugState; + +void acpi_memory_hotplug_init(MemoryRegion *as, Object *owner, + MemHotplugState *state); + +void acpi_memory_plug_cb(ACPIREGS *ar, qemu_irq irq, MemHotplugState *mem_st, + DeviceState *dev, Error **errp); +#endif diff --git a/include/hw/acpi/pc-hotplug.h b/include/hw/acpi/pc-hotplug.h index cee479de63..01d38e2e7e 100644 --- a/include/hw/acpi/pc-hotplug.h +++ b/include/hw/acpi/pc-hotplug.h @@ -29,4 +29,7 @@ #define ICH9_CPU_HOTPLUG_IO_BASE 0x0CD8 #define PIIX4_CPU_HOTPLUG_IO_BASE 0xaf00 +#define ACPI_MEMORY_HOTPLUG_IO_LEN 24 +#define ACPI_MEMORY_HOTPLUG_BASE 0x0a00 + #endif |