]> git.proxmox.com Git - mirror_edk2.git/blob - IntelFsp2Pkg/Library/SecFspSecPlatformLibNull/PlatformSecLibNull.c
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / IntelFsp2Pkg / Library / SecFspSecPlatformLibNull / PlatformSecLibNull.c
1 /** @file
2 Null instance of Platform Sec Lib.
3
4 Copyright (c) 2014 - 2020, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7 **/
8
9 #include <PiPei.h>
10 #include <Library/FspCommonLib.h>
11
12 /**
13 This function check the signature of UPD.
14
15 @param[in] ApiIdx Internal index of the FSP API.
16 @param[in] ApiParam Parameter of the FSP API.
17
18 **/
19 EFI_STATUS
20 EFIAPI
21 FspUpdSignatureCheck (
22 IN UINT32 ApiIdx,
23 IN VOID *ApiParam
24 )
25 {
26 return EFI_SUCCESS;
27 }
28
29 /**
30 This function handles FspMultiPhaseSiInitApi.
31 Starting from FSP 2.4 this function is obsolete and FspMultiPhaseSiInitApiHandlerV2 is the replacement.
32
33 @param[in] ApiIdx Internal index of the FSP API.
34 @param[in] ApiParam Parameter of the FSP API.
35
36 **/
37 EFI_STATUS
38 EFIAPI
39 FspMultiPhaseSiInitApiHandler (
40 IN UINT32 ApiIdx,
41 IN VOID *ApiParam
42 )
43 {
44 return EFI_SUCCESS;
45 }
46
47 /**
48 FSP MultiPhase Platform Get Number Of Phases Function.
49
50 Allows an FSP binary to dynamically update the number of phases at runtime.
51 For example, UPD settings could negate the need to enter the multi-phase flow
52 in certain scenarios. If this function returns FALSE, the default number of phases
53 provided by PcdMultiPhaseNumberOfPhases will be returned to the bootloader instead.
54
55 @param[in] ApiIdx - Internal index of the FSP API.
56 @param[in] NumberOfPhasesSupported - How many phases are supported by current FSP Component.
57
58 @retval TRUE - NumberOfPhases are modified by Platform during runtime.
59 @retval FALSE - The Default build time NumberOfPhases should be used.
60
61 **/
62 BOOLEAN
63 EFIAPI
64 FspMultiPhasePlatformGetNumberOfPhases (
65 IN UINT8 ApiIdx,
66 IN OUT UINT32 *NumberOfPhasesSupported
67 )
68 {
69 /* Example for platform runtime controlling
70 if ((ApiIdx == FspMultiPhaseSiInitApiIndex) && (Feature1Enable == FALSE)) {
71 *NumberOfPhasesSupported = 0;
72 return TRUE;
73 }
74 return FALSE
75 */
76
77 return FALSE;
78 }