2 Provide FSP wrapper API test related function.
4 Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
10 #include <Library/BaseMemoryLib.h>
11 #include <Library/DebugLib.h>
12 #include <Library/HobLib.h>
13 #include <Guid/GuidHobFspEas.h>
16 Test the output of FSP API - FspMemoryInit.
18 @param[in] FspmUpdDataPtr Address pointer to the FSP_MEMORY_INIT_PARAMS structure.
19 @param[in] HobListPtr Address of the HobList pointer.
21 @return test result on output of FspMemoryInit API.
25 TestFspMemoryInitApiOutput (
26 IN VOID
*FspmUpdDataPtr
,
31 EFI_PEI_HOB_POINTERS Hob
;
33 Hob
.Raw
= (UINT8
*)(*(HobListPtr
));
35 if (END_OF_HOB_LIST(Hob
) == TRUE
) {
36 DEBUG((DEBUG_INFO
, "gFspBootLoaderTolumHobGuid not Found\n"));
39 if ((CompareGuid (&Hob
.ResourceDescriptor
->Owner
, &gFspBootLoaderTolumHobGuid
))) {
40 DEBUG ((DEBUG_INFO
, "gFspBootLoaderTolumHobGuid Found\n"));
41 DEBUG ((DEBUG_INFO
, "Fill Boot Loader reserved memory range with 0x5A for testing purpose\n"));
42 SetMem ((VOID
*)(UINTN
)Hob
.ResourceDescriptor
->PhysicalStart
, (UINTN
)Hob
.ResourceDescriptor
->ResourceLength
, 0x5A);
45 Hob
.Raw
= GET_NEXT_HOB (Hob
);
49 return RETURN_SUCCESS
;
53 Test the output of FSP API - TempRamExit.
55 @param[in] TempRamExitParam Address pointer to the TempRamExit parameters structure.
57 @return test result on output of TempRamExit API.
61 TestFspTempRamExitApiOutput (
62 IN VOID
*TempRamExitParam
65 return RETURN_SUCCESS
;
69 Test the output of FSP API - FspSiliconInit.
71 @param[in] FspsUpdDataPtr Address pointer to the Silicon Init parameters structure.
73 @return test result on output of FspSiliconInit API.
77 TestFspSiliconInitApiOutput (
78 IN VOID
*FspsUpdDataPtr
81 return RETURN_SUCCESS
;