]>
Commit | Line | Data |
---|---|---|
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 | |
ac0a286f | 31 | #define QEMU_CPUHP_R_CMD_DATA2 0x0\r |
b75d1de5 | 32 | \r |
ac0a286f MK |
33 | #define QEMU_CPUHP_R_CPU_STAT 0x4\r |
34 | #define QEMU_CPUHP_STAT_ENABLED BIT0\r | |
35 | #define QEMU_CPUHP_STAT_INSERT BIT1\r | |
36 | #define QEMU_CPUHP_STAT_REMOVE BIT2\r | |
37 | #define QEMU_CPUHP_STAT_EJECT BIT3\r | |
38 | #define QEMU_CPUHP_STAT_FW_REMOVE BIT4\r | |
b75d1de5 | 39 | \r |
ac0a286f | 40 | #define QEMU_CPUHP_RW_CMD_DATA 0x8\r |
b75d1de5 | 41 | \r |
ac0a286f | 42 | #define QEMU_CPUHP_W_CPU_SEL 0x0\r |
b75d1de5 | 43 | \r |
ac0a286f MK |
44 | #define QEMU_CPUHP_W_CMD 0x5\r |
45 | #define QEMU_CPUHP_CMD_GET_PENDING 0x0\r | |
46 | #define QEMU_CPUHP_CMD_GET_ARCH_ID 0x3\r | |
b75d1de5 LE |
47 | \r |
48 | #endif // QEMU_CPU_HOTPLUG_H_\r |