]> git.proxmox.com Git - mirror_edk2.git/blob - UefiCpuPkg/Library/MpInitLib/MpIntelTdx.h
UefiCpuPkg: Add CpuLib to module INFs that depend on UefiCpuLib.
[mirror_edk2.git] / UefiCpuPkg / Library / MpInitLib / MpIntelTdx.h
1 /** @file
2 CPU MP Initialize Library header file for Td guest.
3
4 Copyright (c) 2020 - 2022, Intel Corporation. All rights reserved.<BR>
5
6 SPDX-License-Identifier: BSD-2-Clause-Patent
7
8 **/
9
10 #ifndef MP_INTEL_TDX_H_
11 #define MP_INTEL_TDX_H_
12
13 #include <PiPei.h>
14 #include <Library/BaseLib.h>
15 #include <Library/DebugLib.h>
16 #include <Uefi/UefiBaseType.h>
17 #include <Protocol/MpService.h>
18
19 /**
20 Gets detailed MP-related information on the requested processor at the
21 instant this call is made. This service may only be called from the BSP.
22
23 @param[in] ProcessorNumber The handle number of processor.
24 @param[out] ProcessorInfoBuffer A pointer to the buffer where information for
25 the requested processor is deposited.
26 @param[out] HealthData Return processor health data.
27
28 @retval EFI_SUCCESS Processor information was returned.
29 @retval EFI_DEVICE_ERROR The calling processor is an AP.
30 @retval EFI_INVALID_PARAMETER ProcessorInfoBuffer is NULL.
31 @retval EFI_NOT_FOUND The processor with the handle specified by
32 ProcessorNumber does not exist in the platform.
33 @retval EFI_NOT_READY MP Initialize Library is not initialized.
34
35 **/
36 EFI_STATUS
37 TdxMpInitLibGetProcessorInfo (
38 IN UINTN ProcessorNumber,
39 OUT EFI_PROCESSOR_INFORMATION *ProcessorInfoBuffer,
40 OUT EFI_HEALTH_FLAGS *HealthData OPTIONAL
41 );
42
43 /**
44 Retrieves the number of logical processor in the platform and the number of
45 those logical processors that are enabled on this boot. This service may only
46 be called from the BSP.
47
48 @param[out] NumberOfProcessors Pointer to the total number of logical
49 processors in the system, including the BSP
50 and disabled APs.
51 @param[out] NumberOfEnabledProcessors Pointer to the number of enabled logical
52 processors that exist in system, including
53 the BSP.
54
55 @retval EFI_SUCCESS The number of logical processors and enabled
56 logical processors was retrieved.
57 @retval EFI_DEVICE_ERROR The calling processor is an AP.
58 @retval EFI_INVALID_PARAMETER NumberOfProcessors is NULL and NumberOfEnabledProcessors
59 is NULL.
60 @retval EFI_NOT_READY MP Initialize Library is not initialized.
61
62 **/
63 EFI_STATUS
64 TdxMpInitLibGetNumberOfProcessors (
65 OUT UINTN *NumberOfProcessors, OPTIONAL
66 OUT UINTN *NumberOfEnabledProcessors OPTIONAL
67 );
68
69 #endif