mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 16:53:55 -06:00
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>
This commit is contained in:
parent
7e629d1d8d
commit
3ef77acab2
5 changed files with 224 additions and 0 deletions
29
include/hw/acpi/memory_hotplug.h
Normal file
29
include/hw/acpi/memory_hotplug.h
Normal file
|
@ -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
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue