]> git.proxmox.com Git - mirror_edk2.git/blame - IntelFsp2WrapperPkg/Library/PeiFspWrapperApiTestLib/FspWrapperApiTest.c
IntelFsp2WrapperPkg: Update Protocol/Guid usage in INF files
[mirror_edk2.git] / IntelFsp2WrapperPkg / Library / PeiFspWrapperApiTestLib / FspWrapperApiTest.c
CommitLineData
cf1d4549
JY
1/** @file\r
2 Provide FSP wrapper API test related function.\r
3\r
4 Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>\r
5 This program and the accompanying materials\r
6 are licensed and made available under the terms and conditions of the BSD License\r
7 which accompanies this distribution. The full text of the license may be found at\r
8 http://opensource.org/licenses/bsd-license.php.\r
9\r
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
13**/\r
14\r
15#include <PiPei.h>\r
16#include <Library/BaseMemoryLib.h>\r
17#include <Library/DebugLib.h>\r
18#include <Library/HobLib.h>\r
19#include <Guid/GuidHobFspEas.h>\r
20\r
21/**\r
22 Test the output of FSP API - FspMemoryInit.\r
23\r
24 @param[in] FspmUpdDataPtr Address pointer to the FSP_MEMORY_INIT_PARAMS structure.\r
25 @param[in] HobListPtr Address of the HobList pointer.\r
26\r
27 @return test result on output of FspMemoryInit API.\r
28**/\r
29EFI_STATUS\r
30EFIAPI\r
31TestFspMemoryInitApiOutput (\r
32 IN VOID *FspmUpdDataPtr,\r
33 IN VOID **HobListPtr\r
34 )\r
35{\r
36 DEBUG_CODE_BEGIN ();\r
37 EFI_PEI_HOB_POINTERS Hob;\r
38\r
39 Hob.Raw = (UINT8 *)(*(HobListPtr));\r
40 while (TRUE) {\r
41 if (END_OF_HOB_LIST(Hob) == TRUE) {\r
42 DEBUG((DEBUG_INFO, "gFspBootLoaderTolumHobGuid not Found\n"));\r
43 break;\r
44 }\r
45 if ((CompareGuid (&Hob.ResourceDescriptor->Owner, &gFspBootLoaderTolumHobGuid))) {\r
46 DEBUG ((DEBUG_INFO, "gFspBootLoaderTolumHobGuid Found\n"));\r
47 DEBUG ((DEBUG_INFO, "Fill Boot Loader reserved memory range with 0x5A for testing purpose\n"));\r
48 SetMem ((VOID *)(UINTN)Hob.ResourceDescriptor->PhysicalStart, (UINTN)Hob.ResourceDescriptor->ResourceLength, 0x5A);\r
49 break;\r
50 }\r
51 Hob.Raw = GET_NEXT_HOB (Hob);\r
52 }\r
53 DEBUG_CODE_END ();\r
54\r
55 return RETURN_SUCCESS;\r
56}\r
57\r
58/**\r
59 Test the output of FSP API - TempRamExit.\r
60\r
61 @param[in] TempRamExitParam Address pointer to the TempRamExit parameters structure.\r
62\r
63 @return test result on output of TempRamExit API.\r
64**/\r
65EFI_STATUS\r
66EFIAPI\r
67TestFspTempRamExitApiOutput (\r
68 IN VOID *TempRamExitParam\r
69 )\r
70{\r
71 return RETURN_SUCCESS;\r
72}\r
73\r
74/**\r
75 Test the output of FSP API - FspSiliconInit.\r
76\r
77 @param[in] FspsUpdDataPtr Address pointer to the Silicon Init parameters structure.\r
78\r
79 @return test result on output of FspSiliconInit API.\r
80**/\r
81EFI_STATUS\r
82EFIAPI\r
83TestFspSiliconInitApiOutput (\r
84 IN VOID *FspsUpdDataPtr\r
85 )\r
86{\r
87 return RETURN_SUCCESS;\r
88}\r