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