Igor Mammedov | 81cea5e | 2014-01-09 17:36:31 +0100 | [diff] [blame] | 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 | */ |
Markus Armbruster | 121d071 | 2016-06-29 10:12:57 +0200 | [diff] [blame] | 12 | |
| 13 | #ifndef HW_ACPI_CPU_HOTPLUG_H |
| 14 | #define HW_ACPI_CPU_HOTPLUG_H |
Igor Mammedov | 81cea5e | 2014-01-09 17:36:31 +0100 | [diff] [blame] | 15 | |
| 16 | #include "hw/acpi/acpi.h" |
Igor Mammedov | 7e629d1 | 2014-06-02 15:25:15 +0200 | [diff] [blame] | 17 | #include "hw/acpi/pc-hotplug.h" |
Igor Mammedov | fbd7a6b | 2015-12-28 18:02:23 +0100 | [diff] [blame] | 18 | #include "hw/acpi/aml-build.h" |
Igor Mammedov | 0058c08 | 2016-05-31 12:01:17 +0200 | [diff] [blame] | 19 | #include "hw/hotplug.h" |
Igor Mammedov | 679dd1a | 2016-06-15 11:25:23 +0200 | [diff] [blame] | 20 | #include "hw/acpi/cpu.h" |
Igor Mammedov | 81cea5e | 2014-01-09 17:36:31 +0100 | [diff] [blame] | 21 | |
| 22 | typedef struct AcpiCpuHotplug { |
Igor Mammedov | 679dd1a | 2016-06-15 11:25:23 +0200 | [diff] [blame] | 23 | Object *device; |
Igor Mammedov | 81cea5e | 2014-01-09 17:36:31 +0100 | [diff] [blame] | 24 | MemoryRegion io; |
| 25 | uint8_t sts[ACPI_GPE_PROC_LEN]; |
| 26 | } AcpiCpuHotplug; |
| 27 | |
Igor Mammedov | 0058c08 | 2016-05-31 12:01:17 +0200 | [diff] [blame] | 28 | void legacy_acpi_cpu_plug_cb(HotplugHandler *hotplug_dev, |
Igor Mammedov | 96e3e12 | 2016-05-17 16:43:00 +0200 | [diff] [blame] | 29 | AcpiCpuHotplug *g, DeviceState *dev, Error **errp); |
Gu Zheng | 1be6b51 | 2014-10-22 11:24:25 +0800 | [diff] [blame] | 30 | |
Igor Mammedov | 96e3e12 | 2016-05-17 16:43:00 +0200 | [diff] [blame] | 31 | void legacy_acpi_cpu_hotplug_init(MemoryRegion *parent, Object *owner, |
| 32 | AcpiCpuHotplug *gpe_cpu, uint16_t base); |
Igor Mammedov | fbd7a6b | 2015-12-28 18:02:23 +0100 | [diff] [blame] | 33 | |
Igor Mammedov | 679dd1a | 2016-06-15 11:25:23 +0200 | [diff] [blame] | 34 | void acpi_switch_to_modern_cphp(AcpiCpuHotplug *gpe_cpu, |
| 35 | CPUHotplugState *cpuhp_state, |
| 36 | uint16_t io_port); |
| 37 | |
Igor Mammedov | 96e3e12 | 2016-05-17 16:43:00 +0200 | [diff] [blame] | 38 | void build_legacy_cpu_hotplug_aml(Aml *ctx, MachineState *machine, |
Igor Mammedov | ebd8ea8 | 2016-05-17 16:43:02 +0200 | [diff] [blame] | 39 | uint16_t io_base); |
Igor Mammedov | 81cea5e | 2014-01-09 17:36:31 +0100 | [diff] [blame] | 40 | #endif |