| 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 | |
| 13 | #ifndef HW_ACPI_CPU_HOTPLUG_H |
| 14 | #define HW_ACPI_CPU_HOTPLUG_H |
| 15 | |
| 16 | #include "hw/acpi/acpi.h" |
| 17 | #include "hw/acpi/pc-hotplug.h" |
| 18 | #include "hw/acpi/aml-build.h" |
| 19 | #include "hw/core/hotplug.h" |
| 20 | #include "hw/acpi/cpu.h" |
| 21 | |
| 22 | typedef struct AcpiCpuHotplug { |
| 23 | Object *device; |
| 24 | MemoryRegion io; |
| 25 | uint8_t sts[ACPI_GPE_PROC_LEN]; |
| 26 | } AcpiCpuHotplug; |
| 27 | |
| 28 | void legacy_acpi_cpu_plug_cb(HotplugHandler *hotplug_dev, |
| 29 | AcpiCpuHotplug *g, DeviceState *dev, Error **errp); |
| 30 | |
| 31 | void legacy_acpi_cpu_hotplug_init(MemoryRegion *parent, Object *owner, |
| 32 | AcpiCpuHotplug *gpe_cpu, uint16_t base); |
| 33 | |
| 34 | void acpi_switch_to_modern_cphp(AcpiCpuHotplug *gpe_cpu, |
| 35 | CPUHotplugState *cpuhp_state, |
| 36 | uint16_t io_port); |
| 37 | |
| 38 | void build_legacy_cpu_hotplug_aml(Aml *ctx, MachineState *machine, |
| 39 | uint16_t io_base); |
| 40 | #endif |