blob: 3b932abbbbeeba3e5c2dc00b0ae1d99312682925 [file] [log] [blame]
Igor Mammedov81cea5e2014-01-09 17:36:31 +01001/*
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 Armbruster121d0712016-06-29 10:12:57 +020012
13#ifndef HW_ACPI_CPU_HOTPLUG_H
14#define HW_ACPI_CPU_HOTPLUG_H
Igor Mammedov81cea5e2014-01-09 17:36:31 +010015
16#include "hw/acpi/acpi.h"
Igor Mammedov7e629d12014-06-02 15:25:15 +020017#include "hw/acpi/pc-hotplug.h"
Igor Mammedovfbd7a6b2015-12-28 18:02:23 +010018#include "hw/acpi/aml-build.h"
Igor Mammedov0058c082016-05-31 12:01:17 +020019#include "hw/hotplug.h"
Igor Mammedov679dd1a2016-06-15 11:25:23 +020020#include "hw/acpi/cpu.h"
Igor Mammedov81cea5e2014-01-09 17:36:31 +010021
22typedef struct AcpiCpuHotplug {
Igor Mammedov679dd1a2016-06-15 11:25:23 +020023 Object *device;
Igor Mammedov81cea5e2014-01-09 17:36:31 +010024 MemoryRegion io;
25 uint8_t sts[ACPI_GPE_PROC_LEN];
26} AcpiCpuHotplug;
27
Igor Mammedov0058c082016-05-31 12:01:17 +020028void legacy_acpi_cpu_plug_cb(HotplugHandler *hotplug_dev,
Igor Mammedov96e3e122016-05-17 16:43:00 +020029 AcpiCpuHotplug *g, DeviceState *dev, Error **errp);
Gu Zheng1be6b512014-10-22 11:24:25 +080030
Igor Mammedov96e3e122016-05-17 16:43:00 +020031void legacy_acpi_cpu_hotplug_init(MemoryRegion *parent, Object *owner,
32 AcpiCpuHotplug *gpe_cpu, uint16_t base);
Igor Mammedovfbd7a6b2015-12-28 18:02:23 +010033
Igor Mammedov679dd1a2016-06-15 11:25:23 +020034void acpi_switch_to_modern_cphp(AcpiCpuHotplug *gpe_cpu,
35 CPUHotplugState *cpuhp_state,
36 uint16_t io_port);
37
Igor Mammedov96e3e122016-05-17 16:43:00 +020038void build_legacy_cpu_hotplug_aml(Aml *ctx, MachineState *machine,
Igor Mammedovebd8ea82016-05-17 16:43:02 +020039 uint16_t io_base);
Igor Mammedov81cea5e2014-01-09 17:36:31 +010040#endif