mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
acpi: factor out common cpu hotplug code for PIIX4/Q35
.. so it could be used for adding CPU hotplug to Q35 machine Add an additional header with that will be shared between C and ASL code: include/hw/acpi/cpu_hotplug_defs.h Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
99fd437dee
commit
81cea5e7f2
5 changed files with 120 additions and 72 deletions
27
include/hw/acpi/cpu_hotplug.h
Normal file
27
include/hw/acpi/cpu_hotplug.h
Normal file
|
@ -0,0 +1,27 @@
|
|||
/*
|
||||
* QEMU ACPI hotplug utilities
|
||||
*
|
||||
* Copyright (C) 2013 Red Hat Inc
|
||||
*
|
||||
* Authors:
|
||||
* Igor Mammedov <imammedo@redhat.com>
|
||||
*
|
||||
* This work is licensed under the terms of the GNU GPL, version 2 or later.
|
||||
* See the COPYING file in the top-level directory.
|
||||
*/
|
||||
#ifndef ACPI_HOTPLUG_H
|
||||
#define ACPI_HOTPLUG_H
|
||||
|
||||
#include "hw/acpi/acpi.h"
|
||||
#include "hw/acpi/cpu_hotplug_defs.h"
|
||||
|
||||
typedef struct AcpiCpuHotplug {
|
||||
MemoryRegion io;
|
||||
uint8_t sts[ACPI_GPE_PROC_LEN];
|
||||
} AcpiCpuHotplug;
|
||||
|
||||
void AcpiCpuHotplug_add(ACPIGPE *gpe, AcpiCpuHotplug *g, CPUState *cpu);
|
||||
|
||||
void AcpiCpuHotplug_init(MemoryRegion *parent, Object *owner,
|
||||
AcpiCpuHotplug *gpe_cpu, uint16_t base);
|
||||
#endif
|
22
include/hw/acpi/cpu_hotplug_defs.h
Normal file
22
include/hw/acpi/cpu_hotplug_defs.h
Normal file
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
* QEMU ACPI hotplug utilities shared defines
|
||||
*
|
||||
* Copyright (C) 2013 Red Hat Inc
|
||||
*
|
||||
* Authors:
|
||||
* Igor Mammedov <imammedo@redhat.com>
|
||||
*
|
||||
* This work is licensed under the terms of the GNU GPL, version 2 or later.
|
||||
* See the COPYING file in the top-level directory.
|
||||
*/
|
||||
#ifndef ACPI_HOTPLUG_DEFS_H
|
||||
#define ACPI_HOTPLUG_DEFS_H
|
||||
|
||||
/*
|
||||
* ONLY DEFINEs are permited in this file since it's shared
|
||||
* between C and ASL code.
|
||||
*/
|
||||
#define ACPI_CPU_HOTPLUG_STATUS 4
|
||||
#define ACPI_GPE_PROC_LEN 32
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue