xref: /qemu/include/hw/acpi/cpu_hotplug.h (revision 7c2991fa115eae8d54e544d6231ee81844d6c8e3)
181cea5e7SIgor Mammedov /*
281cea5e7SIgor Mammedov  * QEMU ACPI hotplug utilities
381cea5e7SIgor Mammedov  *
481cea5e7SIgor Mammedov  * Copyright (C) 2013 Red Hat Inc
581cea5e7SIgor Mammedov  *
681cea5e7SIgor Mammedov  * Authors:
781cea5e7SIgor Mammedov  *   Igor Mammedov <imammedo@redhat.com>
881cea5e7SIgor Mammedov  *
981cea5e7SIgor Mammedov  * This work is licensed under the terms of the GNU GPL, version 2 or later.
1081cea5e7SIgor Mammedov  * See the COPYING file in the top-level directory.
1181cea5e7SIgor Mammedov  */
1281cea5e7SIgor Mammedov #ifndef ACPI_HOTPLUG_H
1381cea5e7SIgor Mammedov #define ACPI_HOTPLUG_H
1481cea5e7SIgor Mammedov 
1581cea5e7SIgor Mammedov #include "hw/acpi/acpi.h"
167e629d1dSIgor Mammedov #include "hw/acpi/pc-hotplug.h"
17fbd7a6b8SIgor Mammedov #include "hw/acpi/aml-build.h"
1881cea5e7SIgor Mammedov 
1981cea5e7SIgor Mammedov typedef struct AcpiCpuHotplug {
2081cea5e7SIgor Mammedov     MemoryRegion io;
2181cea5e7SIgor Mammedov     uint8_t sts[ACPI_GPE_PROC_LEN];
2281cea5e7SIgor Mammedov } AcpiCpuHotplug;
2381cea5e7SIgor Mammedov 
241be6b511SGu Zheng void acpi_cpu_plug_cb(ACPIREGS *ar, qemu_irq irq,
251be6b511SGu Zheng                       AcpiCpuHotplug *g, DeviceState *dev, Error **errp);
261be6b511SGu Zheng 
27411b5db8SGu Zheng void acpi_cpu_hotplug_init(MemoryRegion *parent, Object *owner,
2881cea5e7SIgor Mammedov                            AcpiCpuHotplug *gpe_cpu, uint16_t base);
29fbd7a6b8SIgor Mammedov 
30fbd7a6b8SIgor Mammedov #define CPU_EJECT_METHOD "CPEJ"
311d608d13SIgor Mammedov #define CPU_MAT_METHOD "CPMA"
321d608d13SIgor Mammedov #define CPU_ON_BITMAP "CPON"
3340f981a0SIgor Mammedov #define CPU_STATUS_METHOD "CPST"
34f294ecbcSIgor Mammedov #define CPU_STATUS_MAP "PRS"
356b306087SIgor Mammedov #define CPU_SCAN_METHOD "PRSC"
36fbd7a6b8SIgor Mammedov 
37*7c2991faSIgor Mammedov void build_cpu_hotplug_aml(Aml *ctx, MachineState *machine,
38*7c2991faSIgor Mammedov                            uint16_t io_base, uint16_t io_len);
3981cea5e7SIgor Mammedov #endif
40