]> git.proxmox.com Git - mirror_edk2.git/blame - OvmfPkg/Include/IndustryStandard/QemuCpuHotplug.h
OvmfPkg/CpuHotplugSmm: collect hot-unplug events
[mirror_edk2.git] / OvmfPkg / Include / IndustryStandard / QemuCpuHotplug.h
CommitLineData
b75d1de5
LE
1/** @file\r
2 Macros for accessing QEMU's CPU hotplug register block.\r
3\r
4 Copyright (C) 2019, Red Hat, Inc.\r
5\r
6 SPDX-License-Identifier: BSD-2-Clause-Patent\r
7\r
8 @par Specification Reference:\r
9\r
10 - "docs/specs/acpi_cpu_hotplug.txt" in the QEMU source tree.\r
11\r
12 The original (now "legacy") CPU hotplug interface appeared in QEMU v1.5.0.\r
13 The new ("modern") hotplug interface appeared in QEMU v2.7.0.\r
14\r
15 The macros in this header file map to the minimal subset of the modern\r
16 interface that OVMF needs.\r
17**/\r
18\r
19#ifndef QEMU_CPU_HOTPLUG_H_\r
20#define QEMU_CPU_HOTPLUG_H_\r
21\r
22#include <Base.h>\r
23\r
24//\r
25// Each register offset is:\r
26// - relative to the board-dependent IO base address of the register block,\r
27// - named QEMU_CPUHP_(R|W|RW)_*, according to the possible access modes of the\r
28// register,\r
29// - followed by distinguished bitmasks or values in the register.\r
30//\r
31#define QEMU_CPUHP_R_CMD_DATA2 0x0\r
32\r
33#define QEMU_CPUHP_R_CPU_STAT 0x4\r
34#define QEMU_CPUHP_STAT_ENABLED BIT0\r
763840c9
LE
35#define QEMU_CPUHP_STAT_INSERT BIT1\r
36#define QEMU_CPUHP_STAT_REMOVE BIT2\r
a752dd07 37#define QEMU_CPUHP_STAT_FW_REMOVE BIT4\r
b75d1de5
LE
38\r
39#define QEMU_CPUHP_RW_CMD_DATA 0x8\r
40\r
41#define QEMU_CPUHP_W_CPU_SEL 0x0\r
42\r
43#define QEMU_CPUHP_W_CMD 0x5\r
44#define QEMU_CPUHP_CMD_GET_PENDING 0x0\r
f668e788 45#define QEMU_CPUHP_CMD_GET_ARCH_ID 0x3\r
b75d1de5
LE
46\r
47#endif // QEMU_CPU_HOTPLUG_H_\r