]> git.proxmox.com Git - mirror_edk2.git/blame - OvmfPkg/CpuHotplugSmm/QemuCpuhp.h
OvmfPkg/CpuHotplugSmm: define the QEMU_CPUHP_CMD_GET_ARCH_ID macro
[mirror_edk2.git] / OvmfPkg / CpuHotplugSmm / QemuCpuhp.h
CommitLineData
590f5f09
LE
1/** @file\r
2 Simple wrapper functions that access QEMU's modern CPU hotplug register\r
3 block.\r
4\r
5 These functions thinly wrap some of the registers described in\r
6 "docs/specs/acpi_cpu_hotplug.txt" in the QEMU source. IO Ports are accessed\r
7 via EFI_MM_CPU_IO_PROTOCOL. If a protocol call fails, these functions don't\r
8 return.\r
9\r
10 Copyright (c) 2020, Red Hat, Inc.\r
11\r
12 SPDX-License-Identifier: BSD-2-Clause-Patent\r
13**/\r
14\r
15#ifndef QEMU_CPUHP_H_\r
16#define QEMU_CPUHP_H_\r
17\r
18#include <Protocol/MmCpuIo.h> // EFI_MM_CPU_IO_PROTOCOL\r
19\r
20UINT32\r
21QemuCpuhpReadCommandData2 (\r
22 IN CONST EFI_MM_CPU_IO_PROTOCOL *MmCpuIo\r
23 );\r
24\r
25UINT8\r
26QemuCpuhpReadCpuStatus (\r
27 IN CONST EFI_MM_CPU_IO_PROTOCOL *MmCpuIo\r
28 );\r
29\r
30UINT32\r
31QemuCpuhpReadCommandData (\r
32 IN CONST EFI_MM_CPU_IO_PROTOCOL *MmCpuIo\r
33 );\r
34\r
35VOID\r
36QemuCpuhpWriteCpuSelector (\r
37 IN CONST EFI_MM_CPU_IO_PROTOCOL *MmCpuIo,\r
38 IN UINT32 Selector\r
39 );\r
40\r
41VOID\r
42QemuCpuhpWriteCommand (\r
43 IN CONST EFI_MM_CPU_IO_PROTOCOL *MmCpuIo,\r
44 IN UINT8 Command\r
45 );\r
46\r
47#endif // QEMU_CPUHP_H_\r