VirtualBox

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

Last change on this file since 89977 was 85718, checked in by vboxsync, 5 years ago

Devices/EFI: Merge edk-stable202005 and make it build, bugref:4643

  • Property svn:eol-style set to native
File size: 1.5 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
45QemuCpuhpWriteCommand (
46 IN CONST EFI_MM_CPU_IO_PROTOCOL *MmCpuIo,
47 IN UINT8 Command
48 );
49
50EFI_STATUS
51QemuCpuhpCollectApicIds (
52 IN CONST EFI_MM_CPU_IO_PROTOCOL *MmCpuIo,
53 IN UINT32 PossibleCpuCount,
54 IN UINT32 ApicIdCount,
55 OUT APIC_ID *PluggedApicIds,
56 OUT UINT32 *PluggedCount,
57 OUT APIC_ID *ToUnplugApicIds,
58 OUT UINT32 *ToUnplugCount
59 );
60
61#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