xref: /qemu/include/hw/acpi/cpu_hotplug.h (revision bf8d4924)
1 /*
2  * QEMU ACPI hotplug utilities
3  *
4  * Copyright (C) 2013 Red Hat Inc
5  *
6  * Authors:
7  *   Igor Mammedov <imammedo@redhat.com>
8  *
9  * This work is licensed under the terms of the GNU GPL, version 2 or later.
10  * See the COPYING file in the top-level directory.
11  */
12 #ifndef ACPI_HOTPLUG_H
13 #define ACPI_HOTPLUG_H
14 
15 #include "hw/acpi/acpi.h"
16 #include "hw/acpi/pc-hotplug.h"
17 #include "hw/acpi/aml-build.h"
18 #include "hw/hotplug.h"
19 #include "hw/acpi/cpu.h"
20 
21 typedef struct AcpiCpuHotplug {
22     Object *device;
23     MemoryRegion io;
24     uint8_t sts[ACPI_GPE_PROC_LEN];
25 } AcpiCpuHotplug;
26 
27 void legacy_acpi_cpu_plug_cb(HotplugHandler *hotplug_dev,
28                              AcpiCpuHotplug *g, DeviceState *dev, Error **errp);
29 
30 void legacy_acpi_cpu_hotplug_init(MemoryRegion *parent, Object *owner,
31                                   AcpiCpuHotplug *gpe_cpu, uint16_t base);
32 
33 void acpi_switch_to_modern_cphp(AcpiCpuHotplug *gpe_cpu,
34                                 CPUHotplugState *cpuhp_state,
35                                 uint16_t io_port);
36 
37 void build_legacy_cpu_hotplug_aml(Aml *ctx, MachineState *machine,
38                                   uint16_t io_base);
39 #endif
40