2 Provide FSP wrapper API test related function.
4 Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php.
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 #include <Library/BaseMemoryLib.h>
17 #include <Library/DebugLib.h>
18 #include <Library/HobLib.h>
19 #include <Guid/GuidHobFspEas.h>
22 Test the output of FSP API - FspMemoryInit.
24 @param[in] FspmUpdDataPtr Address pointer to the FSP_MEMORY_INIT_PARAMS structure.
25 @param[in] HobListPtr Address of the HobList pointer.
27 @return test result on output of FspMemoryInit API.
31 TestFspMemoryInitApiOutput (
32 IN VOID
*FspmUpdDataPtr
,
37 EFI_PEI_HOB_POINTERS Hob
;
39 Hob
.Raw
= (UINT8
*)(*(HobListPtr
));
41 if (END_OF_HOB_LIST(Hob
) == TRUE
) {
42 DEBUG((DEBUG_INFO
, "gFspBootLoaderTolumHobGuid not Found\n"));
45 if ((CompareGuid (&Hob
.ResourceDescriptor
->Owner
, &gFspBootLoaderTolumHobGuid
))) {
46 DEBUG ((DEBUG_INFO
, "gFspBootLoaderTolumHobGuid Found\n"));
47 DEBUG ((DEBUG_INFO
, "Fill Boot Loader reserved memory range with 0x5A for testing purpose\n"));
48 SetMem ((VOID
*)(UINTN
)Hob
.ResourceDescriptor
->PhysicalStart
, (UINTN
)Hob
.ResourceDescriptor
->ResourceLength
, 0x5A);
51 Hob
.Raw
= GET_NEXT_HOB (Hob
);
55 return RETURN_SUCCESS
;
59 Test the output of FSP API - TempRamExit.
61 @param[in] TempRamExitParam Address pointer to the TempRamExit parameters structure.
63 @return test result on output of TempRamExit API.
67 TestFspTempRamExitApiOutput (
68 IN VOID
*TempRamExitParam
71 return RETURN_SUCCESS
;
75 Test the output of FSP API - FspSiliconInit.
77 @param[in] FspsUpdDataPtr Address pointer to the Silicon Init parameters structure.
79 @return test result on output of FspSiliconInit API.
83 TestFspSiliconInitApiOutput (
84 IN VOID
*FspsUpdDataPtr
87 return RETURN_SUCCESS
;