]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Core/Pei/PeiMain.h
Fix function comment to follows doxygen format.
[mirror_edk2.git] / MdeModulePkg / Core / Pei / PeiMain.h
CommitLineData
615c6dd0 1/** @file\r
b1f6a7c6 2 Definition of Pei Core Structures and Services\r
3 \r
192f6d4c 4Copyright (c) 2006 - 2007, Intel Corporation\r
5All rights reserved. This program and the accompanying materials\r
6are licensed and made available under the terms and conditions of the BSD License\r
7which accompanies this distribution. The full text of the license may be found at\r
8http://opensource.org/licenses/bsd-license.php\r
9\r
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
615c6dd0 13**/\r
192f6d4c 14\r
15#ifndef _PEI_MAIN_H_\r
16#define _PEI_MAIN_H_\r
17\r
859b72fa 18#include <PiPei.h>\r
859b72fa
A
19#include <Ppi/DxeIpl.h>\r
20#include <Ppi/MemoryDiscovered.h>\r
859b72fa 21#include <Ppi/StatusCode.h>\r
859b72fa 22#include <Ppi/Reset.h>\r
b0d803fe 23#include <Ppi/FirmwareVolume.h>\r
24#include <Ppi/FirmwareVolumeInfo.h>\r
25#include <Ppi/Decompress.h>\r
26#include <Ppi/GuidedSectionExtraction.h>\r
27#include <Ppi/LoadFile.h>\r
28#include <Ppi/Security2.h>\r
58dcdada 29#include <Ppi/TemporaryRamSupport.h>\r
859b72fa
A
30#include <Library/DebugLib.h>\r
31#include <Library/PeiCoreEntryPoint.h>\r
32#include <Library/BaseLib.h>\r
33#include <Library/HobLib.h>\r
34#include <Library/PerformanceLib.h>\r
35#include <Library/PeiServicesLib.h>\r
36#include <Library/ReportStatusCodeLib.h>\r
c58cf83d 37#include <Library/PeCoffLib.h>\r
859b72fa
A
38#include <Library/PeCoffGetEntryPointLib.h>\r
39#include <Library/BaseMemoryLib.h>\r
b0d803fe 40#include <Library/CacheMaintenanceLib.h>\r
859b72fa 41#include <Library/TimerLib.h>\r
177aabe6 42#include <Library/PcdLib.h>\r
28dc3c67 43#include <IndustryStandard/PeImage.h>\r
14e8823a 44#include <Library/PeiServicesTablePointerLib.h>\r
b0d803fe 45#include <Library/MemoryAllocationLib.h>\r
288f9b38 46#include <Library/PeiPiLib.h>\r
b0d803fe 47#include <Guid/FirmwareFileSystem2.h>\r
48#include <Guid/AprioriFileName.h>\r
192f6d4c 49\r
3a63377f 50#define PEI_CORE_INTERNAL_FFS_FILE_DISPATCH_TYPE 0xff\r
51\r
b1f6a7c6 52///\r
53/// Pei Core private data structures\r
54///\r
192f6d4c 55typedef union {\r
56 EFI_PEI_PPI_DESCRIPTOR *Ppi;\r
57 EFI_PEI_NOTIFY_DESCRIPTOR *Notify;\r
58 VOID *Raw;\r
59} PEI_PPI_LIST_POINTERS;\r
60\r
192f6d4c 61typedef struct {\r
62 INTN PpiListEnd;\r
63 INTN NotifyListEnd;\r
64 INTN DispatchListEnd;\r
65 INTN LastDispatchedInstall;\r
66 INTN LastDispatchedNotify;\r
eaf539d0 67 PEI_PPI_LIST_POINTERS PpiListPtrs[FixedPcdGet32 (PcdPeiCoreMaxPpiSupported)];\r
192f6d4c 68} PEI_PPI_DATABASE;\r
69\r
3a63377f 70\r
3a63377f 71//\r
72// PEI_CORE_FV_HANDE.PeimState\r
73// Do not change these values as there is code doing math to change states.\r
74// Look for Private->Fv[FvCount].PeimState[PeimCount]++;\r
75//\r
76#define PEIM_STATE_NOT_DISPATCHED 0x00\r
77#define PEIM_STATE_DISPATCHED 0x01\r
78#define PEIM_STATE_REGISITER_FOR_SHADOW 0x02\r
79#define PEIM_STATE_DONE 0x03\r
80\r
81typedef struct {\r
82 EFI_FIRMWARE_VOLUME_HEADER *FvHeader;\r
50cb16d9 83 UINT8 PeimState[FixedPcdGet32 (PcdPeiCoreMaxPeimPerFv)];\r
177aabe6 84 EFI_PEI_FILE_HANDLE FvFileHandles[FixedPcdGet32 (PcdPeiCoreMaxPeimPerFv)];\r
3a63377f 85 BOOLEAN ScanFv;\r
86} PEI_CORE_FV_HANDLE;\r
87\r
288f9b38
LG
88#define CACHE_SETION_MAX_NUMBER 0x10\r
89typedef struct {\r
90 EFI_COMMON_SECTION_HEADER* Section[CACHE_SETION_MAX_NUMBER];\r
91 VOID* SectionData[CACHE_SETION_MAX_NUMBER];\r
92 UINTN SectionSize[CACHE_SETION_MAX_NUMBER];\r
93 UINTN AllSectionCount;\r
94 UINTN SectionIndex;\r
95} CACHE_SECTION_DATA;\r
96\r
192f6d4c 97//\r
98// Pei Core private data structure instance\r
99//\r
100\r
101#define PEI_CORE_HANDLE_SIGNATURE EFI_SIGNATURE_32('P','e','i','C')\r
102\r
103typedef struct{\r
104 UINTN Signature;\r
105 EFI_PEI_SERVICES *PS; // Point to ServiceTableShadow\r
106 PEI_PPI_DATABASE PpiData;\r
3a63377f 107 UINTN FvCount;\r
177aabe6 108 PEI_CORE_FV_HANDLE Fv[FixedPcdGet32 (PcdPeiCoreMaxFvSupported)];\r
109 EFI_PEI_FILE_HANDLE CurrentFvFileHandles[FixedPcdGet32 (PcdPeiCoreMaxPeimPerFv)];\r
3a63377f 110 UINTN AprioriCount;\r
50cb16d9 111 UINTN CurrentPeimFvCount;\r
3a63377f 112 UINTN CurrentPeimCount;\r
113 EFI_PEI_FILE_HANDLE CurrentFileHandle;\r
114 UINTN AllFvCount;\r
177aabe6 115 EFI_PEI_FV_HANDLE AllFv[FixedPcdGet32 (PcdPeiCoreMaxFvSupported)];\r
192f6d4c 116 EFI_PEI_HOB_POINTERS HobList;\r
117 BOOLEAN SwitchStackSignal;\r
118 BOOLEAN PeiMemoryInstalled;\r
119 EFI_PHYSICAL_ADDRESS StackBase;\r
120 UINT64 StackSize;\r
121 VOID *BottomOfCarHeap;\r
122 VOID *TopOfCarHeap;\r
123 VOID *CpuIo;\r
b0d803fe 124 EFI_PEI_SECURITY2_PPI *PrivateSecurityPpi;\r
192f6d4c 125 EFI_PEI_SERVICES ServiceTableShadow;\r
58dcdada 126 UINTN SizeOfTemporaryMemory;\r
192f6d4c 127 UINTN SizeOfCacheAsRam;\r
128 VOID *MaxTopOfCarHeap;\r
b0d803fe 129 EFI_PEI_PPI_DESCRIPTOR *XipLoadFile;\r
58dcdada 130 EFI_PHYSICAL_ADDRESS PhysicalMemoryBegin;\r
131 UINT64 PhysicalMemoryLength;\r
132 EFI_PHYSICAL_ADDRESS FreePhysicalMemoryTop;\r
133 VOID* ShadowedPeiCore;\r
288f9b38 134 CACHE_SECTION_DATA CacheSection;\r
192f6d4c 135} PEI_CORE_INSTANCE;\r
136\r
137//\r
138// Pei Core Instance Data Macros\r
139//\r
140\r
141#define PEI_CORE_INSTANCE_FROM_PS_THIS(a) \\r
142 CR(a, PEI_CORE_INSTANCE, PS, PEI_CORE_HANDLE_SIGNATURE)\r
143\r
192f6d4c 144typedef\r
145EFI_STATUS\r
146(EFIAPI *PEI_CORE_ENTRY_POINT)(\r
b98c2ab7 147 IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData,\r
148 IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList,\r
149 IN PEI_CORE_INSTANCE *OldCoreData\r
192f6d4c 150 );\r
151\r
b1f6a7c6 152///\r
153/// Union of temporarily used function pointers (to save stack space)\r
154///\r
192f6d4c 155typedef union {\r
156 PEI_CORE_ENTRY_POINT PeiCore;\r
1c9d209f 157 EFI_PEIM_ENTRY_POINT2 PeimEntry;\r
192f6d4c 158 EFI_PEIM_NOTIFY_ENTRY_POINT PeimNotifyEntry;\r
159 EFI_DXE_IPL_PPI *DxeIpl;\r
160 EFI_PEI_PPI_DESCRIPTOR *PpiDescriptor;\r
161 EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor;\r
162 VOID *Raw;\r
163} PEI_CORE_TEMP_POINTERS;\r
164\r
165\r
b98c2ab7 166\r
167typedef struct {\r
168 CONST EFI_SEC_PEI_HAND_OFF *SecCoreData;\r
169 EFI_PEI_PPI_DESCRIPTOR *PpiList;\r
170 VOID *Data;\r
171} PEI_CORE_PARAMETERS;\r
172\r
192f6d4c 173//\r
174// PeiCore function\r
175//\r
b1f6a7c6 176/**\r
192f6d4c 177\r
178 The entry routine to Pei Core, invoked by PeiMain during transition\r
179 from SEC to PEI. After switching stack in the PEI core, it will restart\r
180 with the old core data.\r
181\r
192f6d4c 182\r
b1f6a7c6 183 @param SecCoreData Points to a data structure containing information about the PEI core's operating\r
184 environment, such as the size and location of temporary RAM, the stack location and\r
185 the BFV location.\r
186 @param PpiList Points to a list of one or more PPI descriptors to be installed initially by the PEI core.\r
187 An empty PPI list consists of a single descriptor with the end-tag\r
188 EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST. As part of its initialization\r
189 phase, the PEI Foundation will add these SEC-hosted PPIs to its PPI database such\r
190 that both the PEI Foundation and any modules can leverage the associated service\r
191 calls and/or code in these early PPIs\r
192 @param Data Pointer to old core data that is used to initialize the\r
192f6d4c 193 core's data areas.\r
194\r
b1f6a7c6 195 @retval EFI_NOT_FOUND Never reach\r
192f6d4c 196\r
b1f6a7c6 197**/\r
198EFI_STATUS\r
199EFIAPI\r
200PeiCore (\r
201 IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData,\r
202 IN CONST EFI_PEI_PPI_DESCRIPTOR *PpList,\r
203 IN VOID *Data\r
204 )\r
192f6d4c 205;\r
206\r
207//\r
208// Dispatcher support functions\r
209//\r
210\r
b1f6a7c6 211/**\r
192f6d4c 212\r
213 This is the POSTFIX version of the dependency evaluator. When a\r
214 PUSH [PPI GUID] is encountered, a pointer to the GUID is stored on\r
215 the evaluation stack. When that entry is poped from the evaluation\r
216 stack, the PPI is checked if it is installed. This method allows\r
217 some time savings as not all PPIs must be checked for certain\r
218 operation types (AND, OR).\r
219\r
192f6d4c 220\r
b1f6a7c6 221 @param PeiServices Calling context.\r
222 @param DependencyExpression Pointer to a dependency expression. The Grammar adheres to\r
223 the BNF described above and is stored in postfix notation.\r
192f6d4c 224\r
b1f6a7c6 225 @retval TRUE if it is a well-formed Grammar\r
226 @retval FALSE if the dependency expression overflows the evaluation stack\r
227 if the dependency expression underflows the evaluation stack\r
228 if the dependency expression is not a well-formed Grammar.\r
192f6d4c 229\r
b1f6a7c6 230**/\r
231BOOLEAN\r
232PeimDispatchReadiness (\r
233 IN EFI_PEI_SERVICES **PeiServices,\r
234 IN VOID *DependencyExpression\r
235 )\r
192f6d4c 236;\r
237\r
b1f6a7c6 238/**\r
239 Conduct PEIM dispatch.\r
240\r
241 @param SecCoreData Points to a data structure containing information about the PEI core's operating\r
242 environment, such as the size and location of temporary RAM, the stack location and\r
243 the BFV location.\r
244 PrivateData - Pointer to the private data passed in from caller\r
245 DispatchData - Pointer to PEI_CORE_DISPATCH_DATA data.\r
246 @param Private EDES_TODO: Add parameter description\r
192f6d4c 247\r
b1f6a7c6 248 @retval EFI_SUCCESS Successfully dispatched PEIM.\r
249 @retval EFI_NOT_FOUND The dispatch failed.\r
250\r
251**/\r
b0d803fe 252VOID\r
192f6d4c 253PeiDispatcher (\r
5aae0aa7 254 IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData,\r
b0d803fe 255 IN PEI_CORE_INSTANCE *PrivateData\r
192f6d4c 256 )\r
b1f6a7c6 257;\r
192f6d4c 258\r
b1f6a7c6 259/**\r
260 Initialize the Dispatcher's data members\r
192f6d4c 261\r
b1f6a7c6 262 @param PrivateData PeiCore's private data structure\r
263 @param OldCoreData Old data from SecCore\r
264 NULL if being run in non-permament memory mode.\r
265 @param SecCoreData Points to a data structure containing information about the PEI core's operating\r
266 environment, such as the size and location of temporary RAM, the stack location and\r
267 the BFV location.\r
192f6d4c 268\r
b1f6a7c6 269 @return None.\r
192f6d4c 270\r
b1f6a7c6 271**/\r
192f6d4c 272VOID\r
273InitializeDispatcherData (\r
b0d803fe 274 IN PEI_CORE_INSTANCE *PrivateData,\r
192f6d4c 275 IN PEI_CORE_INSTANCE *OldCoreData,\r
5aae0aa7 276 IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData\r
192f6d4c 277 )\r
192f6d4c 278;\r
279\r
b1f6a7c6 280/**\r
281 This routine parses the Dependency Expression, if available, and\r
282 decides if the module can be executed.\r
192f6d4c 283\r
192f6d4c 284\r
b1f6a7c6 285 @param Private PeiCore's private data structure\r
286 @param FileHandle PEIM's file handle\r
287 @param PeimCount Peim count in all dispatched PEIMs.\r
192f6d4c 288\r
b1f6a7c6 289 @retval TRUE Can be dispatched\r
290 @retval FALSE Cannot be dispatched\r
192f6d4c 291\r
b1f6a7c6 292**/\r
192f6d4c 293BOOLEAN\r
294DepexSatisfied (\r
b0d803fe 295 IN PEI_CORE_INSTANCE *Private,\r
296 IN EFI_PEI_FILE_HANDLE FileHandle,\r
297 IN UINTN PeimCount\r
192f6d4c 298 )\r
192f6d4c 299;\r
300\r
192f6d4c 301//\r
302// PPI support functions\r
303//\r
b1f6a7c6 304/**\r
305\r
306 Initialize PPI services.\r
307\r
308\r
309 @param PrivateData Pointer to the PEI Core data.\r
310 @param OldCoreData Pointer to old PEI Core data. \r
311 NULL if being run in non-permament memory mode.\r
312\r
313**/\r
192f6d4c 314VOID\r
315InitializePpiServices (\r
b0d803fe 316 IN PEI_CORE_INSTANCE *PrivateData,\r
192f6d4c 317 IN PEI_CORE_INSTANCE *OldCoreData\r
318 )\r
b1f6a7c6 319;\r
192f6d4c 320\r
b1f6a7c6 321/**\r
192f6d4c 322\r
b1f6a7c6 323 Migrate the Hob list from the CAR stack to PEI installed memory.\r
192f6d4c 324\r
b1f6a7c6 325 @param PeiServices The PEI core services table.\r
326 @param OldCheckingBottom The old checking bottom.\r
327 @param OldCheckingTop The old checking top.\r
328 @param NewHandOffHob The new handoff HOB list.\r
192f6d4c 329\r
b1f6a7c6 330**/\r
192f6d4c 331VOID\r
332ConvertPpiPointers (\r
58dcdada 333 IN CONST EFI_PEI_SERVICES **PeiServices,\r
334 IN UINTN OldCheckingBottom,\r
335 IN UINTN OldCheckingTop,\r
192f6d4c 336 IN EFI_HOB_HANDOFF_INFO_TABLE *NewHandOffHob\r
337 )\r
b1f6a7c6 338;\r
192f6d4c 339\r
b1f6a7c6 340/**\r
192f6d4c 341\r
b1f6a7c6 342 Install PPI services.\r
192f6d4c 343\r
b1f6a7c6 344 @param PeiServices - Pointer to the PEI Service Table\r
345 @param PpiList - Pointer to a list of PEI PPI Descriptors.\r
192f6d4c 346\r
b1f6a7c6 347 @retval EFI_SUCCESS - if all PPIs in PpiList are successfully installed.\r
348 @retval EFI_INVALID_PARAMETER - if PpiList is NULL pointer\r
349 @retval EFI_INVALID_PARAMETER - if any PPI in PpiList is not valid\r
350 @retval EFI_OUT_OF_RESOURCES - if there is no more memory resource to install PPI\r
192f6d4c 351\r
b1f6a7c6 352**/\r
192f6d4c 353EFI_STATUS\r
354EFIAPI\r
355PeiInstallPpi (\r
0c2b5da8 356 IN CONST EFI_PEI_SERVICES **PeiServices,\r
357 IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList\r
192f6d4c 358 )\r
b1f6a7c6 359;\r
192f6d4c 360\r
b1f6a7c6 361/**\r
192f6d4c 362\r
b1f6a7c6 363 Re-Install PPI services.\r
192f6d4c 364\r
b1f6a7c6 365 @param PeiServices - Pointer to the PEI Service Table\r
366 @param OldPpi - Pointer to the old PEI PPI Descriptors.\r
367 @param NewPpi - Pointer to the new PEI PPI Descriptors.\r
192f6d4c 368\r
b1f6a7c6 369 @retval EFI_SUCCESS - if the operation was successful\r
370 @retval EFI_INVALID_PARAMETER - if OldPpi or NewPpi is NULL\r
371 @retval EFI_INVALID_PARAMETER - if NewPpi is not valid\r
372 @retval EFI_NOT_FOUND - if the PPI was not in the database\r
192f6d4c 373\r
b1f6a7c6 374**/\r
192f6d4c 375EFI_STATUS\r
376EFIAPI\r
377PeiReInstallPpi (\r
0c2b5da8 378 IN CONST EFI_PEI_SERVICES **PeiServices,\r
379 IN CONST EFI_PEI_PPI_DESCRIPTOR *OldPpi,\r
380 IN CONST EFI_PEI_PPI_DESCRIPTOR *NewPpi\r
192f6d4c 381 )\r
b1f6a7c6 382;\r
192f6d4c 383\r
b1f6a7c6 384/**\r
192f6d4c 385\r
b1f6a7c6 386 Locate a given named PPI.\r
192f6d4c 387\r
192f6d4c 388\r
b1f6a7c6 389 @param PeiServices - Pointer to the PEI Service Table\r
390 @param Guid - Pointer to GUID of the PPI.\r
391 @param Instance - Instance Number to discover.\r
392 @param PpiDescriptor - Pointer to reference the found descriptor. If not NULL,\r
393 returns a pointer to the descriptor (includes flags, etc)\r
394 @param Ppi - Pointer to reference the found PPI\r
192f6d4c 395\r
b1f6a7c6 396 @retval EFI_SUCCESS if the PPI is in the database\r
397 @retval EFI_NOT_FOUND if the PPI is not in the database\r
192f6d4c 398\r
b1f6a7c6 399**/\r
192f6d4c 400EFI_STATUS\r
401EFIAPI\r
402PeiLocatePpi (\r
0c2b5da8 403 IN CONST EFI_PEI_SERVICES **PeiServices,\r
404 IN CONST EFI_GUID *Guid,\r
192f6d4c 405 IN UINTN Instance,\r
406 IN OUT EFI_PEI_PPI_DESCRIPTOR **PpiDescriptor,\r
407 IN OUT VOID **Ppi\r
408 )\r
b1f6a7c6 409;\r
192f6d4c 410\r
b1f6a7c6 411/**\r
192f6d4c 412\r
b1f6a7c6 413 Install a notification for a given PPI.\r
192f6d4c 414\r
192f6d4c 415\r
b1f6a7c6 416 @param PeiServices - Pointer to the PEI Service Table\r
417 @param NotifyList - Pointer to list of Descriptors to notify upon.\r
192f6d4c 418\r
b1f6a7c6 419 @retval EFI_SUCCESS if successful\r
420 @retval EFI_OUT_OF_RESOURCES if no space in the database\r
421 @retval EFI_INVALID_PARAMETER if not a good decriptor\r
192f6d4c 422\r
b1f6a7c6 423**/\r
192f6d4c 424EFI_STATUS\r
425EFIAPI\r
426PeiNotifyPpi (\r
0c2b5da8 427 IN CONST EFI_PEI_SERVICES **PeiServices,\r
428 IN CONST EFI_PEI_NOTIFY_DESCRIPTOR *NotifyList\r
192f6d4c 429 )\r
b1f6a7c6 430;\r
192f6d4c 431\r
b1f6a7c6 432/**\r
192f6d4c 433\r
b1f6a7c6 434 Process the Notify List at dispatch level.\r
192f6d4c 435\r
b1f6a7c6 436 @param PrivateData PeiCore's private data structure.\r
192f6d4c 437\r
b1f6a7c6 438**/\r
192f6d4c 439VOID\r
440ProcessNotifyList (\r
b0d803fe 441 IN PEI_CORE_INSTANCE *PrivateData\r
192f6d4c 442 )\r
b1f6a7c6 443;\r
192f6d4c 444\r
b1f6a7c6 445/**\r
192f6d4c 446\r
b1f6a7c6 447 Dispatch notifications.\r
192f6d4c 448\r
b1f6a7c6 449 @param PrivateData PeiCore's private data structure\r
450 @param NotifyType Type of notify to fire.\r
451 @param InstallStartIndex Install Beginning index.\r
452 @param InstallStopIndex Install Ending index.\r
453 @param NotifyStartIndex Notify Beginning index.\r
454 @param NotifyStopIndex Notify Ending index.\r
192f6d4c 455\r
b1f6a7c6 456**/\r
192f6d4c 457VOID\r
458DispatchNotify (\r
b0d803fe 459 IN PEI_CORE_INSTANCE *PrivateData,\r
192f6d4c 460 IN UINTN NotifyType,\r
461 IN INTN InstallStartIndex,\r
462 IN INTN InstallStopIndex,\r
463 IN INTN NotifyStartIndex,\r
464 IN INTN NotifyStopIndex\r
465 )\r
192f6d4c 466;\r
467\r
468//\r
469// Boot mode support functions\r
470//\r
b1f6a7c6 471/**\r
472 This service enables PEIMs to ascertain the present value of the boot mode.\r
473\r
474 @param PeiServices The PEI core services table.\r
475 @param BootMode A pointer to contain the value of the boot mode.\r
476\r
477 @retval EFI_SUCCESS The boot mode was returned successfully.\r
478 @retval EFI_INVALID_PARAMETER BootMode is NULL.\r
479\r
480**/\r
192f6d4c 481EFI_STATUS\r
482EFIAPI\r
483PeiGetBootMode (\r
0c2b5da8 484 IN CONST EFI_PEI_SERVICES **PeiServices,\r
192f6d4c 485 IN OUT EFI_BOOT_MODE *BootMode\r
486 )\r
b1f6a7c6 487;\r
192f6d4c 488\r
b1f6a7c6 489/**\r
490 This service enables PEIMs to update the boot mode variable.\r
192f6d4c 491\r
192f6d4c 492\r
b1f6a7c6 493 @param PeiServices - The PEI core services table.\r
494 @param BootMode - The value of the boot mode to set.\r
192f6d4c 495\r
b1f6a7c6 496 @return EFI_SUCCESS - The value was successfully updated\r
192f6d4c 497\r
b1f6a7c6 498**/\r
192f6d4c 499EFI_STATUS\r
500EFIAPI\r
501PeiSetBootMode (\r
0c2b5da8 502 IN CONST EFI_PEI_SERVICES **PeiServices,\r
192f6d4c 503 IN EFI_BOOT_MODE BootMode\r
504 )\r
192f6d4c 505;\r
506\r
507//\r
508// Security support functions\r
509//\r
b1f6a7c6 510/**\r
511\r
512 Initialize the security services.\r
513\r
514\r
515 @param PeiServices - The PEI core services table.\r
516 @param OldCoreData - Pointer to the old core data.\r
517 NULL if being run in non-permament memory mode.\r
518\r
519**/\r
192f6d4c 520VOID\r
521InitializeSecurityServices (\r
522 IN EFI_PEI_SERVICES **PeiServices,\r
523 IN PEI_CORE_INSTANCE *OldCoreData\r
524 )\r
b1f6a7c6 525;\r
192f6d4c 526\r
b1f6a7c6 527/**\r
528 Verify a Firmware volume\r
192f6d4c 529\r
b1f6a7c6 530 @param CurrentFvAddress - Pointer to the current Firmware Volume under consideration\r
192f6d4c 531\r
b1f6a7c6 532 @retval EFI_SUCCESS - Firmware Volume is legal\r
533 @retval EFI_SECURITY_VIOLATION - Firmware Volume fails integrity test\r
192f6d4c 534\r
b1f6a7c6 535**/\r
192f6d4c 536EFI_STATUS\r
537VerifyFv (\r
538 IN EFI_FIRMWARE_VOLUME_HEADER *CurrentFvAddress\r
539 )\r
b1f6a7c6 540;\r
192f6d4c 541\r
b1f6a7c6 542/**\r
192f6d4c 543\r
b1f6a7c6 544 Provide a callout to the security verification service.\r
192f6d4c 545\r
192f6d4c 546\r
b1f6a7c6 547 @param PrivateData PeiCore's private data structure\r
548 @param VolumeHandle Handle of FV\r
549 @param FileHandle Handle of PEIM's ffs\r
192f6d4c 550\r
b1f6a7c6 551 @retval EFI_SUCCESS Image is OK\r
552 @retval EFI_SECURITY_VIOLATION Image is illegal\r
192f6d4c 553\r
b1f6a7c6 554**/\r
192f6d4c 555EFI_STATUS\r
556VerifyPeim (\r
b0d803fe 557 IN PEI_CORE_INSTANCE *PrivateData,\r
558 IN EFI_PEI_FV_HANDLE VolumeHandle,\r
559 IN EFI_PEI_FILE_HANDLE FileHandle\r
192f6d4c 560 )\r
b1f6a7c6 561;\r
192f6d4c 562\r
b1f6a7c6 563/**\r
192f6d4c 564\r
b1f6a7c6 565 Gets the pointer to the HOB List.\r
192f6d4c 566\r
192f6d4c 567\r
b1f6a7c6 568 @param PeiServices The PEI core services table.\r
569 @param HobList Pointer to the HOB List.\r
192f6d4c 570\r
b1f6a7c6 571 @retval EFI_SUCCESS Get the pointer of HOB List\r
572 @retval EFI_NOT_AVAILABLE_YET the HOB List is not yet published\r
573 @retval EFI_INVALID_PARAMETER HobList is NULL (in debug mode)\r
192f6d4c 574\r
b1f6a7c6 575**/\r
192f6d4c 576EFI_STATUS\r
577EFIAPI\r
578PeiGetHobList (\r
0c2b5da8 579 IN CONST EFI_PEI_SERVICES **PeiServices,\r
192f6d4c 580 IN OUT VOID **HobList\r
581 )\r
b1f6a7c6 582;\r
192f6d4c 583\r
b1f6a7c6 584/**\r
585 Add a new HOB to the HOB List.\r
192f6d4c 586\r
b1f6a7c6 587 @param PeiServices - The PEI core services table.\r
588 @param Type - Type of the new HOB.\r
589 @param Length - Length of the new HOB to allocate.\r
590 @param Hob - Pointer to the new HOB.\r
192f6d4c 591\r
b1f6a7c6 592 @return EFI_SUCCESS Success to create hob.\r
593 @retval EFI_INVALID_PARAMETER if Hob is NULL\r
594 @retval EFI_NOT_AVAILABLE_YET if HobList is still not available.\r
595 @retval EFI_OUT_OF_RESOURCES if there is no more memory to grow the Hoblist.\r
192f6d4c 596\r
b1f6a7c6 597**/\r
192f6d4c 598EFI_STATUS\r
599EFIAPI\r
600PeiCreateHob (\r
0c2b5da8 601 IN CONST EFI_PEI_SERVICES **PeiServices,\r
192f6d4c 602 IN UINT16 Type,\r
603 IN UINT16 Length,\r
604 IN OUT VOID **Hob\r
605 )\r
b1f6a7c6 606;\r
192f6d4c 607\r
b1f6a7c6 608/**\r
192f6d4c 609\r
b1f6a7c6 610 Builds a Handoff Information Table HOB\r
192f6d4c 611\r
b1f6a7c6 612 @param BootMode - Current Bootmode\r
613 @param MemoryBegin - Start Memory Address.\r
614 @param MemoryLength - Length of Memory.\r
192f6d4c 615\r
b1f6a7c6 616 @return EFI_SUCCESS Always success to initialize HOB.\r
192f6d4c 617\r
b1f6a7c6 618**/\r
192f6d4c 619EFI_STATUS\r
620PeiCoreBuildHobHandoffInfoTable (\r
621 IN EFI_BOOT_MODE BootMode,\r
622 IN EFI_PHYSICAL_ADDRESS MemoryBegin,\r
623 IN UINT64 MemoryLength\r
624 )\r
192f6d4c 625;\r
626\r
627\r
628//\r
629// FFS Fw Volume support functions\r
630//\r
b1f6a7c6 631/**\r
632 Given the input file pointer, search for the next matching file in the\r
633 FFS volume as defined by SearchType. The search starts from FileHeader inside\r
634 the Firmware Volume defined by FwVolHeader.\r
635\r
636\r
637 @param PeiServices Pointer to the PEI Core Services Table.\r
638 @param SearchType Filter to find only files of this type.\r
639 Type EFI_FV_FILETYPE_ALL causes no filtering to be done.\r
640 @param VolumeHandle Pointer to the FV header of the volume to search.\r
641 @param FileHandle Pointer to the current file from which to begin searching.\r
642 This pointer will be updated upon return to reflect the file found.\r
643 @retval EFI_NOT_FOUND No files matching the search criteria were found\r
644 @retval EFI_SUCCESS Success to find next file in given volume\r
645\r
646**/\r
192f6d4c 647EFI_STATUS\r
648EFIAPI\r
649PeiFfsFindNextFile (\r
0c2b5da8 650 IN CONST EFI_PEI_SERVICES **PeiServices,\r
192f6d4c 651 IN UINT8 SearchType,\r
0c2b5da8 652 IN EFI_PEI_FV_HANDLE FwVolHeader,\r
653 IN OUT EFI_PEI_FILE_HANDLE *FileHeader\r
192f6d4c 654 )\r
b1f6a7c6 655;\r
192f6d4c 656\r
b1f6a7c6 657/**\r
658 Given the input file pointer, search for the next matching section in the\r
659 FFS volume.\r
192f6d4c 660\r
192f6d4c 661\r
b1f6a7c6 662 @param PeiServices Pointer to the PEI Core Services Table.\r
663 @param SectionType Filter to find only sections of this type.\r
664 @param FileHandle Pointer to the current file to search.\r
665 @param SectionData Pointer to the Section matching SectionType in FfsFileHeader.\r
666 NULL if section not found\r
192f6d4c 667\r
b1f6a7c6 668 @retval EFI_NOT_FOUND No files matching the search criteria were found\r
669 @retval EFI_SUCCESS Success to find section data in given file\r
192f6d4c 670\r
b1f6a7c6 671**/\r
192f6d4c 672EFI_STATUS\r
673EFIAPI\r
674PeiFfsFindSectionData (\r
b0d803fe 675 IN CONST EFI_PEI_SERVICES **PeiServices,\r
192f6d4c 676 IN EFI_SECTION_TYPE SectionType,\r
0c2b5da8 677 IN EFI_PEI_FILE_HANDLE FfsFileHeader,\r
192f6d4c 678 IN OUT VOID **SectionData\r
679 )\r
b1f6a7c6 680;\r
192f6d4c 681\r
b1f6a7c6 682/**\r
683 search the firmware volumes by index\r
192f6d4c 684\r
b1f6a7c6 685 @param PeiServices The PEI core services table.\r
686 @param Instance Instance of FV to find\r
687 @param VolumeHandle Pointer to found Volume.\r
192f6d4c 688\r
b1f6a7c6 689 @retval EFI_INVALID_PARAMETER FwVolHeader is NULL\r
690 @retval EFI_SUCCESS Firmware volume instance successfully found.\r
192f6d4c 691\r
b1f6a7c6 692**/\r
192f6d4c 693EFI_STATUS\r
694EFIAPI\r
695PeiFvFindNextVolume (\r
0c2b5da8 696 IN CONST EFI_PEI_SERVICES **PeiServices,\r
192f6d4c 697 IN UINTN Instance,\r
0c2b5da8 698 IN OUT EFI_PEI_FV_HANDLE *FwVolHeader\r
192f6d4c 699 )\r
192f6d4c 700;\r
701\r
702//\r
703// Memory support functions\r
704//\r
b1f6a7c6 705/**\r
706\r
707 Initialize the memory services.\r
708\r
709\r
710 @param PrivateData Add parameter description\r
711 @param SecCoreData Points to a data structure containing information about the PEI core's operating\r
712 environment, such as the size and location of temporary RAM, the stack location and\r
713 the BFV location.\r
714 @param OldCoreData Pointer to the PEI Core data.\r
715 NULL if being run in non-permament memory mode.\r
716\r
717**/\r
192f6d4c 718VOID\r
719InitializeMemoryServices (\r
b0d803fe 720 IN PEI_CORE_INSTANCE *PrivateData,\r
5aae0aa7 721 IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData,\r
192f6d4c 722 IN PEI_CORE_INSTANCE *OldCoreData\r
723 )\r
b1f6a7c6 724;\r
192f6d4c 725\r
b1f6a7c6 726/**\r
192f6d4c 727\r
b1f6a7c6 728 Install the permanent memory is now available.\r
729 Creates HOB (PHIT and Stack).\r
192f6d4c 730\r
b1f6a7c6 731 @param PeiServices - The PEI core services table.\r
732 @param MemoryBegin - Start of memory address.\r
733 @param MemoryLength - Length of memory.\r
192f6d4c 734\r
b1f6a7c6 735 @return EFI_SUCCESS Always success.\r
192f6d4c 736\r
b1f6a7c6 737**/\r
192f6d4c 738EFI_STATUS\r
739EFIAPI\r
740PeiInstallPeiMemory (\r
0c2b5da8 741 IN CONST EFI_PEI_SERVICES **PeiServices,\r
192f6d4c 742 IN EFI_PHYSICAL_ADDRESS MemoryBegin,\r
743 IN UINT64 MemoryLength\r
744 )\r
b1f6a7c6 745;\r
192f6d4c 746\r
b1f6a7c6 747/**\r
192f6d4c 748\r
b1f6a7c6 749 Memory allocation service on permanent memory,\r
750 not usable prior to the memory installation.\r
192f6d4c 751\r
192f6d4c 752\r
b1f6a7c6 753 @param PeiServices - The PEI core services table.\r
754 @param MemoryType - Type of memory to allocate.\r
755 @param Pages - Number of pages to allocate.\r
756 @param Memory - Pointer of memory allocated.\r
192f6d4c 757\r
b1f6a7c6 758 @retval EFI_SUCCESS The allocation was successful\r
759 @retval EFI_INVALID_PARAMETER Only AllocateAnyAddress is supported.\r
760 @retval EFI_NOT_AVAILABLE_YET Called with permanent memory not available\r
761 @retval EFI_OUT_OF_RESOURCES There is not enough HOB heap to satisfy the requirement\r
762 to allocate the number of pages.\r
192f6d4c 763\r
b1f6a7c6 764**/\r
192f6d4c 765EFI_STATUS\r
766EFIAPI\r
767PeiAllocatePages (\r
0c2b5da8 768 IN CONST EFI_PEI_SERVICES **PeiServices,\r
192f6d4c 769 IN EFI_MEMORY_TYPE MemoryType,\r
770 IN UINTN Pages,\r
771 OUT EFI_PHYSICAL_ADDRESS *Memory\r
772 )\r
b1f6a7c6 773;\r
192f6d4c 774\r
b1f6a7c6 775/**\r
192f6d4c 776\r
b1f6a7c6 777 Memory allocation service on the CAR.\r
192f6d4c 778\r
192f6d4c 779\r
b1f6a7c6 780 @param PeiServices - The PEI core services table.\r
781 @param Size - Amount of memory required\r
782 @param Buffer - Address of pointer to the buffer\r
192f6d4c 783\r
b1f6a7c6 784 @retval EFI_SUCCESS The allocation was successful\r
785 @retval EFI_OUT_OF_RESOURCES There is not enough heap to satisfy the requirement\r
786 to allocate the requested size.\r
192f6d4c 787\r
b1f6a7c6 788**/\r
192f6d4c 789EFI_STATUS\r
790EFIAPI\r
791PeiAllocatePool (\r
0c2b5da8 792 IN CONST EFI_PEI_SERVICES **PeiServices,\r
192f6d4c 793 IN UINTN Size,\r
794 OUT VOID **Buffer\r
795 )\r
b1f6a7c6 796;\r
192f6d4c 797\r
b1f6a7c6 798/**\r
192f6d4c 799\r
b1f6a7c6 800 Routine for load image file.\r
192f6d4c 801\r
192f6d4c 802\r
b1f6a7c6 803 @param PeiServices - The PEI core services table.\r
804 @param FileHandle - Pointer to the FFS file header of the image.\r
805 @param EntryPoint - Pointer to entry point of specified image file for output.\r
806 @param AuthenticationState - Pointer to attestation authentication state of image.\r
192f6d4c 807\r
b1f6a7c6 808 @retval EFI_SUCCESS - Image is successfully loaded.\r
809 @retval EFI_NOT_FOUND - Fail to locate necessary PPI\r
810 @retval Others - Fail to load file.\r
192f6d4c 811\r
b1f6a7c6 812**/\r
192f6d4c 813EFI_STATUS\r
814PeiLoadImage (\r
815 IN EFI_PEI_SERVICES **PeiServices,\r
b0d803fe 816 IN EFI_PEI_FILE_HANDLE FileHandle,\r
817 OUT EFI_PHYSICAL_ADDRESS *EntryPoint,\r
818 OUT UINT32 *AuthenticationState\r
192f6d4c 819 )\r
b1f6a7c6 820;\r
192f6d4c 821\r
b1f6a7c6 822/**\r
192f6d4c 823\r
b1f6a7c6 824 Core version of the Status Code reporter\r
192f6d4c 825\r
192f6d4c 826\r
b1f6a7c6 827 @param PeiServices The PEI core services table.\r
828 @param CodeType Type of Status Code.\r
829 @param Value Value to output for Status Code.\r
830 @param Instance Instance Number of this status code.\r
831 @param CallerId ID of the caller of this status code.\r
832 @param Data Optional data associated with this status code.\r
192f6d4c 833\r
b1f6a7c6 834 @retval EFI_SUCCESS if status code is successfully reported\r
835 @retval EFI_NOT_AVAILABLE_YET if StatusCodePpi has not been installed\r
192f6d4c 836\r
b1f6a7c6 837**/\r
192f6d4c 838EFI_STATUS\r
839EFIAPI\r
840PeiReportStatusCode (\r
0c2b5da8 841 IN CONST EFI_PEI_SERVICES **PeiServices,\r
192f6d4c 842 IN EFI_STATUS_CODE_TYPE CodeType,\r
843 IN EFI_STATUS_CODE_VALUE Value,\r
844 IN UINT32 Instance,\r
0c2b5da8 845 IN CONST EFI_GUID *CallerId,\r
846 IN CONST EFI_STATUS_CODE_DATA *Data OPTIONAL\r
192f6d4c 847 )\r
b1f6a7c6 848;\r
192f6d4c 849\r
b1f6a7c6 850/**\r
192f6d4c 851\r
b1f6a7c6 852 Core version of the Reset System\r
192f6d4c 853\r
192f6d4c 854\r
b1f6a7c6 855 @param PeiServices - The PEI core services table.\r
192f6d4c 856\r
b1f6a7c6 857 @retval EFI_NOT_AVAILABLE_YET PPI not available yet.\r
858 @retval EFI_DEVICE_ERROR Did not reset system.\r
859 Otherwise, resets the system.\r
192f6d4c 860\r
b1f6a7c6 861**/\r
192f6d4c 862EFI_STATUS\r
863EFIAPI\r
864PeiResetSystem (\r
b0d803fe 865 IN CONST EFI_PEI_SERVICES **PeiServices\r
192f6d4c 866 )\r
b1f6a7c6 867;\r
192f6d4c 868\r
b1f6a7c6 869/**\r
192f6d4c 870\r
b1f6a7c6 871 Initialize PeiCore Fv List.\r
192f6d4c 872\r
192f6d4c 873\r
b1f6a7c6 874 @param PrivateData - Pointer to PEI_CORE_INSTANCE.\r
875 @param SecCoreData - Pointer to EFI_SEC_PEI_HAND_OFF.\r
192f6d4c 876\r
b1f6a7c6 877 @return NONE\r
192f6d4c 878\r
b1f6a7c6 879**/\r
50cb16d9 880VOID\r
b0d803fe 881PeiInitializeFv (\r
882 IN PEI_CORE_INSTANCE *PrivateData,\r
883 IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData\r
884 )\r
b1f6a7c6 885;\r
b0d803fe 886\r
b1f6a7c6 887/**\r
888 Process Firmware Volum Information once FvInfoPPI install.\r
b0d803fe 889\r
b0d803fe 890\r
b1f6a7c6 891 @param PeiServices - General purpose services available to every PEIM.\r
892 @param NotifyDescriptor EDES_TODO: Add parameter description\r
893 @param Ppi EDES_TODO: Add parameter description\r
50cb16d9 894\r
b1f6a7c6 895 @retval EFI_SUCCESS if the interface could be successfully installed\r
b0d803fe 896\r
b1f6a7c6 897**/\r
b0d803fe 898EFI_STATUS\r
899EFIAPI\r
900FirmwareVolmeInfoPpiNotifyCallback (\r
901 IN EFI_PEI_SERVICES **PeiServices,\r
902 IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor,\r
903 IN VOID *Ppi\r
904 )\r
b1f6a7c6 905;\r
b0d803fe 906\r
b1f6a7c6 907/**\r
50cb16d9 908\r
b1f6a7c6 909 Given the input VolumeHandle, search for the next matching name file.\r
b0d803fe 910\r
b0d803fe 911\r
b1f6a7c6 912 @param FileName - File name to search.\r
913 @param VolumeHandle - The current FV to search.\r
914 @param FileHandle - Pointer to the file matching name in VolumeHandle.\r
915 - NULL if file not found\r
b0d803fe 916\r
b1f6a7c6 917 @return EFI_STATUS\r
b0d803fe 918\r
b1f6a7c6 919**/\r
b0d803fe 920EFI_STATUS\r
50cb16d9 921EFIAPI\r
b0d803fe 922PeiFfsFindFileByName (\r
923 IN CONST EFI_GUID *FileName,\r
924 IN EFI_PEI_FV_HANDLE VolumeHandle,\r
925 OUT EFI_PEI_FILE_HANDLE *FileHandle\r
926 )\r
b1f6a7c6 927;\r
b0d803fe 928\r
b1f6a7c6 929/**\r
b0d803fe 930\r
b1f6a7c6 931 Returns information about a specific file.\r
b0d803fe 932\r
b0d803fe 933\r
b1f6a7c6 934 @param FileHandle - The handle to file.\r
935 @param FileInfo - Pointer to the file information.\r
b0d803fe 936\r
b1f6a7c6 937 @retval EFI_INVALID_PARAMETER Invalid FileHandle or FileInfo.\r
938 @retval EFI_SUCCESS Success to collect file info.\r
b0d803fe 939\r
b1f6a7c6 940**/\r
b0d803fe 941EFI_STATUS\r
50cb16d9 942EFIAPI\r
b0d803fe 943PeiFfsGetFileInfo (\r
944 IN EFI_PEI_FILE_HANDLE FileHandle,\r
945 OUT EFI_FV_FILE_INFO *FileInfo\r
946 )\r
b1f6a7c6 947;\r
b0d803fe 948\r
b1f6a7c6 949/**\r
b0d803fe 950\r
b1f6a7c6 951 Collect information of given Fv Volume.\r
b0d803fe 952\r
b1f6a7c6 953 @param VolumeHandle - The handle to Fv Volume.\r
954 @param VolumeInfo - The pointer to volume information.\r
b0d803fe 955\r
b1f6a7c6 956 @retval EFI_INVALID_PARAMETER VolumeInfo is NULL\r
957 @retval EFI_SUCCESS Success to collect fv info.\r
958**/\r
b0d803fe 959EFI_STATUS\r
50cb16d9 960EFIAPI\r
b0d803fe 961PeiFfsGetVolumeInfo (\r
962 IN EFI_PEI_FV_HANDLE VolumeHandle,\r
963 OUT EFI_FV_INFO *VolumeInfo\r
964 )\r
b0d803fe 965;\r
966\r
14e8823a 967/**\r
968 This routine enable a PEIM to register itself to shadow when PEI Foundation\r
969 discovery permanent memory.\r
970\r
b1f6a7c6 971 @param FileHandle File handle of a PEIM.\r
50cb16d9 972\r
b1f6a7c6 973 @retval EFI_NOT_FOUND The file handle doesn't point to PEIM itself.\r
974 @retval EFI_ALREADY_STARTED Indicate that the PEIM has been registered itself.\r
975 @retval EFI_SUCCESS Successfully to register itself.\r
14e8823a 976\r
50cb16d9 977**/\r
14e8823a 978EFI_STATUS\r
979EFIAPI\r
980PeiRegisterForShadow (\r
981 IN EFI_PEI_FILE_HANDLE FileHandle\r
982 )\r
983;\r
984\r
b1f6a7c6 985/**\r
986 Given the input file pointer, search for the next matching file in the\r
987 FFS volume as defined by SearchType. The search starts from FileHeader inside\r
988 the Firmware Volume defined by FwVolHeader.\r
989\r
990\r
991 @param FvHandle Pointer to the FV header of the volume to search\r
992 @param FileName File name\r
993 @param SearchType Filter to find only files of this type.\r
994 Type EFI_FV_FILETYPE_ALL causes no filtering to be done.\r
995 @param FileHandle This parameter must point to a valid FFS volume.\r
996 @param AprioriFile Pointer to AprioriFile image in this FV if has\r
997\r
998 @return EFI_NOT_FOUND No files matching the search criteria were found\r
999 @retval EFI_SUCCESS Success to search given file\r
1000\r
1001**/\r
b0d803fe 1002EFI_STATUS\r
1003PeiFindFileEx (\r
1004 IN CONST EFI_PEI_FV_HANDLE FvHandle,\r
1005 IN CONST EFI_GUID *FileName, OPTIONAL\r
1006 IN EFI_FV_FILETYPE SearchType,\r
1007 IN OUT EFI_PEI_FILE_HANDLE *FileHandle,\r
1008 IN OUT EFI_PEI_FV_HANDLE *AprioriFile OPTIONAL\r
1009 )\r
b0d803fe 1010;\r
1011\r
b1f6a7c6 1012/**\r
b0d803fe 1013\r
c58cf83d 1014 Install Pei Load File PPI.\r
b0d803fe 1015\r
b0d803fe 1016\r
b1f6a7c6 1017 @param PrivateData - Pointer to PEI_CORE_INSTANCE.\r
1018 @param OldCoreData - Pointer to PEI_CORE_INSTANCE.\r
b0d803fe 1019\r
b1f6a7c6 1020**/\r
1021VOID\r
1022InitializeImageServices (\r
1023 IN PEI_CORE_INSTANCE *PrivateData,\r
1024 IN PEI_CORE_INSTANCE *OldCoreData\r
1025 )\r
b0d803fe 1026;\r
1027\r
288f9b38
LG
1028/**\r
1029 Get Fv image from the FV type file, then install FV INFO ppi, Build FV hob.\r
1030\r
b1f6a7c6 1031 @param PeiServices Pointer to the PEI Core Services Table.\r
1032 @param FileHandle File handle of a Fv type file.\r
288f9b38
LG
1033 @param AuthenticationState Pointer to attestation authentication state of image.\r
1034\r
50cb16d9 1035\r
b1f6a7c6 1036 @retval EFI_NOT_FOUND FV image can't be found.\r
1037 @retval EFI_SUCCESS Successfully to process it.\r
288f9b38
LG
1038\r
1039**/\r
1040EFI_STATUS\r
1041ProcessFvFile (\r
1042 IN EFI_PEI_SERVICES **PeiServices,\r
1043 IN EFI_PEI_FILE_HANDLE FvFileHandle,\r
1044 OUT UINT32 *AuthenticationState\r
1045 );\r
1046\r
192f6d4c 1047#endif\r