VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/FirmwareNew/OvmfPkg/CpuHotplugSmm/QemuCpuhp.h@ 109019

Last change on this file since 109019 was 99404, checked in by vboxsync, 2 years ago

Devices/EFI/FirmwareNew: Update to edk2-stable202302 and make it build, bugref:4643

  • Property svn:eol-style set to native
File size: 1.7 KB
Line 
1/** @file
2 Simple wrapper functions and utility functions that access QEMU's modern CPU
3 hotplug register block.
4
5 These functions manipulate 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#include <Uefi/UefiBaseType.h> // EFI_STATUS
20
21#include "ApicId.h" // APIC_ID
22
23UINT32
24QemuCpuhpReadCommandData2 (
25 IN CONST EFI_MM_CPU_IO_PROTOCOL *MmCpuIo
26 );
27
28UINT8
29QemuCpuhpReadCpuStatus (
30 IN CONST EFI_MM_CPU_IO_PROTOCOL *MmCpuIo
31 );
32
33UINT32
34QemuCpuhpReadCommandData (
35 IN CONST EFI_MM_CPU_IO_PROTOCOL *MmCpuIo
36 );
37
38VOID
39QemuCpuhpWriteCpuSelector (
40 IN CONST EFI_MM_CPU_IO_PROTOCOL *MmCpuIo,
41 IN UINT32 Selector
42 );
43
44VOID
45QemuCpuhpWriteCpuStatus (
46 IN CONST EFI_MM_CPU_IO_PROTOCOL *MmCpuIo,
47 IN UINT8 CpuStatus
48 );
49
50VOID
51QemuCpuhpWriteCommand (
52 IN CONST EFI_MM_CPU_IO_PROTOCOL *MmCpuIo,
53 IN UINT8 Command
54 );
55
56EFI_STATUS
57QemuCpuhpCollectApicIds (
58 IN CONST EFI_MM_CPU_IO_PROTOCOL *MmCpuIo,
59 IN UINT32 PossibleCpuCount,
60 IN UINT32 ApicIdCount,
61 OUT APIC_ID *PluggedApicIds,
62 OUT UINT32 *PluggedCount,
63 OUT APIC_ID *ToUnplugApicIds,
64 OUT UINT32 *ToUnplugSelectors,
65 OUT UINT32 *ToUnplugCount
66 );
67
68#endif // QEMU_CPUHP_H_
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette