]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Core/Pei/PeiMain.h
Fixed a block issue caused by R8 library instance
[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
40f26b8f 61///\r
62/// PPI database structure\r
63///\r
192f6d4c 64typedef struct {\r
65 INTN PpiListEnd;\r
66 INTN NotifyListEnd;\r
67 INTN DispatchListEnd;\r
68 INTN LastDispatchedInstall;\r
69 INTN LastDispatchedNotify;\r
eaf539d0 70 PEI_PPI_LIST_POINTERS PpiListPtrs[FixedPcdGet32 (PcdPeiCoreMaxPpiSupported)];\r
192f6d4c 71} PEI_PPI_DATABASE;\r
72\r
3a63377f 73\r
3a63377f 74//\r
75// PEI_CORE_FV_HANDE.PeimState\r
76// Do not change these values as there is code doing math to change states.\r
77// Look for Private->Fv[FvCount].PeimState[PeimCount]++;\r
78//\r
79#define PEIM_STATE_NOT_DISPATCHED 0x00\r
80#define PEIM_STATE_DISPATCHED 0x01\r
81#define PEIM_STATE_REGISITER_FOR_SHADOW 0x02\r
82#define PEIM_STATE_DONE 0x03\r
83\r
84typedef struct {\r
85 EFI_FIRMWARE_VOLUME_HEADER *FvHeader;\r
50cb16d9 86 UINT8 PeimState[FixedPcdGet32 (PcdPeiCoreMaxPeimPerFv)];\r
177aabe6 87 EFI_PEI_FILE_HANDLE FvFileHandles[FixedPcdGet32 (PcdPeiCoreMaxPeimPerFv)];\r
3a63377f 88 BOOLEAN ScanFv;\r
89} PEI_CORE_FV_HANDLE;\r
90\r
288f9b38
LG
91#define CACHE_SETION_MAX_NUMBER 0x10\r
92typedef struct {\r
93 EFI_COMMON_SECTION_HEADER* Section[CACHE_SETION_MAX_NUMBER];\r
94 VOID* SectionData[CACHE_SETION_MAX_NUMBER];\r
95 UINTN SectionSize[CACHE_SETION_MAX_NUMBER];\r
96 UINTN AllSectionCount;\r
97 UINTN SectionIndex;\r
98} CACHE_SECTION_DATA;\r
99\r
192f6d4c 100\r
101#define PEI_CORE_HANDLE_SIGNATURE EFI_SIGNATURE_32('P','e','i','C')\r
102\r
40f26b8f 103///\r
104/// Pei Core private data structure instance\r
105///\r
192f6d4c 106typedef struct{\r
107 UINTN Signature;\r
108 EFI_PEI_SERVICES *PS; // Point to ServiceTableShadow\r
109 PEI_PPI_DATABASE PpiData;\r
3a63377f 110 UINTN FvCount;\r
177aabe6 111 PEI_CORE_FV_HANDLE Fv[FixedPcdGet32 (PcdPeiCoreMaxFvSupported)];\r
112 EFI_PEI_FILE_HANDLE CurrentFvFileHandles[FixedPcdGet32 (PcdPeiCoreMaxPeimPerFv)];\r
3a63377f 113 UINTN AprioriCount;\r
50cb16d9 114 UINTN CurrentPeimFvCount;\r
3a63377f 115 UINTN CurrentPeimCount;\r
116 EFI_PEI_FILE_HANDLE CurrentFileHandle;\r
117 UINTN AllFvCount;\r
177aabe6 118 EFI_PEI_FV_HANDLE AllFv[FixedPcdGet32 (PcdPeiCoreMaxFvSupported)];\r
192f6d4c 119 EFI_PEI_HOB_POINTERS HobList;\r
120 BOOLEAN SwitchStackSignal;\r
121 BOOLEAN PeiMemoryInstalled;\r
122 EFI_PHYSICAL_ADDRESS StackBase;\r
123 UINT64 StackSize;\r
124 VOID *BottomOfCarHeap;\r
125 VOID *TopOfCarHeap;\r
126 VOID *CpuIo;\r
b0d803fe 127 EFI_PEI_SECURITY2_PPI *PrivateSecurityPpi;\r
192f6d4c 128 EFI_PEI_SERVICES ServiceTableShadow;\r
58dcdada 129 UINTN SizeOfTemporaryMemory;\r
192f6d4c 130 UINTN SizeOfCacheAsRam;\r
131 VOID *MaxTopOfCarHeap;\r
b0d803fe 132 EFI_PEI_PPI_DESCRIPTOR *XipLoadFile;\r
58dcdada 133 EFI_PHYSICAL_ADDRESS PhysicalMemoryBegin;\r
134 UINT64 PhysicalMemoryLength;\r
135 EFI_PHYSICAL_ADDRESS FreePhysicalMemoryTop;\r
136 VOID* ShadowedPeiCore;\r
288f9b38 137 CACHE_SECTION_DATA CacheSection;\r
192f6d4c 138} PEI_CORE_INSTANCE;\r
139\r
40f26b8f 140///\r
141/// Pei Core Instance Data Macros\r
142///\r
192f6d4c 143#define PEI_CORE_INSTANCE_FROM_PS_THIS(a) \\r
144 CR(a, PEI_CORE_INSTANCE, PS, PEI_CORE_HANDLE_SIGNATURE)\r
145\r
192f6d4c 146typedef\r
147EFI_STATUS\r
148(EFIAPI *PEI_CORE_ENTRY_POINT)(\r
b98c2ab7 149 IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData,\r
150 IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList,\r
151 IN PEI_CORE_INSTANCE *OldCoreData\r
192f6d4c 152 );\r
153\r
b1f6a7c6 154///\r
155/// Union of temporarily used function pointers (to save stack space)\r
156///\r
192f6d4c 157typedef union {\r
158 PEI_CORE_ENTRY_POINT PeiCore;\r
1c9d209f 159 EFI_PEIM_ENTRY_POINT2 PeimEntry;\r
192f6d4c 160 EFI_PEIM_NOTIFY_ENTRY_POINT PeimNotifyEntry;\r
161 EFI_DXE_IPL_PPI *DxeIpl;\r
162 EFI_PEI_PPI_DESCRIPTOR *PpiDescriptor;\r
163 EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor;\r
164 VOID *Raw;\r
165} PEI_CORE_TEMP_POINTERS;\r
166\r
167\r
b98c2ab7 168\r
169typedef struct {\r
170 CONST EFI_SEC_PEI_HAND_OFF *SecCoreData;\r
171 EFI_PEI_PPI_DESCRIPTOR *PpiList;\r
172 VOID *Data;\r
173} PEI_CORE_PARAMETERS;\r
174\r
192f6d4c 175//\r
176// PeiCore function\r
177//\r
b1f6a7c6 178/**\r
192f6d4c 179\r
180 The entry routine to Pei Core, invoked by PeiMain during transition\r
181 from SEC to PEI. After switching stack in the PEI core, it will restart\r
182 with the old core data.\r
183\r
192f6d4c 184\r
b1f6a7c6 185 @param SecCoreData Points to a data structure containing information about the PEI core's operating\r
186 environment, such as the size and location of temporary RAM, the stack location and\r
187 the BFV location.\r
188 @param PpiList Points to a list of one or more PPI descriptors to be installed initially by the PEI core.\r
189 An empty PPI list consists of a single descriptor with the end-tag\r
190 EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST. As part of its initialization\r
191 phase, the PEI Foundation will add these SEC-hosted PPIs to its PPI database such\r
192 that both the PEI Foundation and any modules can leverage the associated service\r
193 calls and/or code in these early PPIs\r
194 @param Data Pointer to old core data that is used to initialize the\r
192f6d4c 195 core's data areas.\r
196\r
b1f6a7c6 197 @retval EFI_NOT_FOUND Never reach\r
192f6d4c 198\r
b1f6a7c6 199**/\r
200EFI_STATUS\r
201EFIAPI\r
202PeiCore (\r
203 IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData,\r
204 IN CONST EFI_PEI_PPI_DESCRIPTOR *PpList,\r
205 IN VOID *Data\r
206 )\r
192f6d4c 207;\r
208\r
209//\r
210// Dispatcher support functions\r
211//\r
212\r
b1f6a7c6 213/**\r
192f6d4c 214\r
215 This is the POSTFIX version of the dependency evaluator. When a\r
216 PUSH [PPI GUID] is encountered, a pointer to the GUID is stored on\r
217 the evaluation stack. When that entry is poped from the evaluation\r
218 stack, the PPI is checked if it is installed. This method allows\r
219 some time savings as not all PPIs must be checked for certain\r
220 operation types (AND, OR).\r
221\r
192f6d4c 222\r
b1f6a7c6 223 @param PeiServices Calling context.\r
224 @param DependencyExpression Pointer to a dependency expression. The Grammar adheres to\r
225 the BNF described above and is stored in postfix notation.\r
192f6d4c 226\r
b1f6a7c6 227 @retval TRUE if it is a well-formed Grammar\r
228 @retval FALSE if the dependency expression overflows the evaluation stack\r
229 if the dependency expression underflows the evaluation stack\r
230 if the dependency expression is not a well-formed Grammar.\r
192f6d4c 231\r
b1f6a7c6 232**/\r
233BOOLEAN\r
234PeimDispatchReadiness (\r
235 IN EFI_PEI_SERVICES **PeiServices,\r
236 IN VOID *DependencyExpression\r
237 )\r
192f6d4c 238;\r
239\r
b1f6a7c6 240/**\r
241 Conduct PEIM dispatch.\r
242\r
243 @param SecCoreData Points to a data structure containing information about the PEI core's operating\r
244 environment, such as the size and location of temporary RAM, the stack location and\r
245 the BFV location.\r
246 PrivateData - Pointer to the private data passed in from caller\r
247 DispatchData - Pointer to PEI_CORE_DISPATCH_DATA data.\r
248 @param Private EDES_TODO: Add parameter description\r
192f6d4c 249\r
b1f6a7c6 250 @retval EFI_SUCCESS Successfully dispatched PEIM.\r
251 @retval EFI_NOT_FOUND The dispatch failed.\r
252\r
253**/\r
b0d803fe 254VOID\r
192f6d4c 255PeiDispatcher (\r
5aae0aa7 256 IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData,\r
b0d803fe 257 IN PEI_CORE_INSTANCE *PrivateData\r
192f6d4c 258 )\r
b1f6a7c6 259;\r
192f6d4c 260\r
b1f6a7c6 261/**\r
262 Initialize the Dispatcher's data members\r
192f6d4c 263\r
b1f6a7c6 264 @param PrivateData PeiCore's private data structure\r
265 @param OldCoreData Old data from SecCore\r
266 NULL if being run in non-permament memory mode.\r
267 @param SecCoreData Points to a data structure containing information about the PEI core's operating\r
268 environment, such as the size and location of temporary RAM, the stack location and\r
269 the BFV location.\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
b1f6a7c6 308 @param PrivateData Pointer to the PEI Core data.\r
309 @param OldCoreData Pointer to old PEI Core data. \r
310 NULL if being run in non-permament memory mode.\r
311\r
312**/\r
192f6d4c 313VOID\r
314InitializePpiServices (\r
b0d803fe 315 IN PEI_CORE_INSTANCE *PrivateData,\r
192f6d4c 316 IN PEI_CORE_INSTANCE *OldCoreData\r
317 )\r
b1f6a7c6 318;\r
192f6d4c 319\r
b1f6a7c6 320/**\r
192f6d4c 321\r
b1f6a7c6 322 Migrate the Hob list from the CAR stack to PEI installed memory.\r
192f6d4c 323\r
b1f6a7c6 324 @param PeiServices The PEI core services table.\r
325 @param OldCheckingBottom The old checking bottom.\r
326 @param OldCheckingTop The old checking top.\r
5c5a0601 327 @param Fixup The address difference between\r
328 the new Hob list and old Hob list.\r
192f6d4c 329\r
b1f6a7c6 330**/\r
192f6d4c 331VOID\r
332ConvertPpiPointers (\r
40f26b8f 333 IN PEI_CORE_INSTANCE *PrivateData,\r
334 IN UINTN OldCheckingBottom,\r
335 IN UINTN OldCheckingTop,\r
336 IN INTN Fixup\r
192f6d4c 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
40f26b8f 514 @param PeiServices The PEI core services table.\r
515 @param OldCoreData Pointer to the old core data.\r
b1f6a7c6 516 NULL if being run in non-permament memory mode.\r
517\r
518**/\r
192f6d4c 519VOID\r
520InitializeSecurityServices (\r
521 IN EFI_PEI_SERVICES **PeiServices,\r
522 IN PEI_CORE_INSTANCE *OldCoreData\r
523 )\r
b1f6a7c6 524;\r
192f6d4c 525\r
b1f6a7c6 526/**\r
527 Verify a Firmware volume\r
192f6d4c 528\r
40f26b8f 529 @param CurrentFvAddress Pointer to the current Firmware Volume under consideration\r
192f6d4c 530\r
40f26b8f 531 @retval EFI_SUCCESS Firmware Volume is legal\r
532 @retval EFI_SECURITY_VIOLATION Firmware Volume fails integrity test\r
192f6d4c 533\r
b1f6a7c6 534**/\r
192f6d4c 535EFI_STATUS\r
536VerifyFv (\r
537 IN EFI_FIRMWARE_VOLUME_HEADER *CurrentFvAddress\r
538 )\r
b1f6a7c6 539;\r
192f6d4c 540\r
b1f6a7c6 541/**\r
192f6d4c 542\r
b1f6a7c6 543 Provide a callout to the security verification service.\r
192f6d4c 544\r
192f6d4c 545\r
b1f6a7c6 546 @param PrivateData PeiCore's private data structure\r
547 @param VolumeHandle Handle of FV\r
548 @param FileHandle Handle of PEIM's ffs\r
192f6d4c 549\r
b1f6a7c6 550 @retval EFI_SUCCESS Image is OK\r
551 @retval EFI_SECURITY_VIOLATION Image is illegal\r
192f6d4c 552\r
b1f6a7c6 553**/\r
192f6d4c 554EFI_STATUS\r
555VerifyPeim (\r
b0d803fe 556 IN PEI_CORE_INSTANCE *PrivateData,\r
557 IN EFI_PEI_FV_HANDLE VolumeHandle,\r
558 IN EFI_PEI_FILE_HANDLE FileHandle\r
192f6d4c 559 )\r
b1f6a7c6 560;\r
192f6d4c 561\r
b1f6a7c6 562/**\r
192f6d4c 563\r
b1f6a7c6 564 Gets the pointer to the HOB List.\r
192f6d4c 565\r
192f6d4c 566\r
b1f6a7c6 567 @param PeiServices The PEI core services table.\r
568 @param HobList Pointer to the HOB List.\r
192f6d4c 569\r
b1f6a7c6 570 @retval EFI_SUCCESS Get the pointer of HOB List\r
571 @retval EFI_NOT_AVAILABLE_YET the HOB List is not yet published\r
572 @retval EFI_INVALID_PARAMETER HobList is NULL (in debug mode)\r
192f6d4c 573\r
b1f6a7c6 574**/\r
192f6d4c 575EFI_STATUS\r
576EFIAPI\r
577PeiGetHobList (\r
0c2b5da8 578 IN CONST EFI_PEI_SERVICES **PeiServices,\r
192f6d4c 579 IN OUT VOID **HobList\r
580 )\r
b1f6a7c6 581;\r
192f6d4c 582\r
b1f6a7c6 583/**\r
584 Add a new HOB to the HOB List.\r
192f6d4c 585\r
b1f6a7c6 586 @param PeiServices - The PEI core services table.\r
587 @param Type - Type of the new HOB.\r
588 @param Length - Length of the new HOB to allocate.\r
589 @param Hob - Pointer to the new HOB.\r
192f6d4c 590\r
b1f6a7c6 591 @return EFI_SUCCESS Success to create hob.\r
592 @retval EFI_INVALID_PARAMETER if Hob is NULL\r
593 @retval EFI_NOT_AVAILABLE_YET if HobList is still not available.\r
594 @retval EFI_OUT_OF_RESOURCES if there is no more memory to grow the Hoblist.\r
192f6d4c 595\r
b1f6a7c6 596**/\r
192f6d4c 597EFI_STATUS\r
598EFIAPI\r
599PeiCreateHob (\r
0c2b5da8 600 IN CONST EFI_PEI_SERVICES **PeiServices,\r
192f6d4c 601 IN UINT16 Type,\r
602 IN UINT16 Length,\r
603 IN OUT VOID **Hob\r
604 )\r
b1f6a7c6 605;\r
192f6d4c 606\r
b1f6a7c6 607/**\r
192f6d4c 608\r
b1f6a7c6 609 Builds a Handoff Information Table HOB\r
192f6d4c 610\r
b1f6a7c6 611 @param BootMode - Current Bootmode\r
612 @param MemoryBegin - Start Memory Address.\r
613 @param MemoryLength - Length of Memory.\r
192f6d4c 614\r
b1f6a7c6 615 @return EFI_SUCCESS Always success to initialize HOB.\r
192f6d4c 616\r
b1f6a7c6 617**/\r
192f6d4c 618EFI_STATUS\r
619PeiCoreBuildHobHandoffInfoTable (\r
620 IN EFI_BOOT_MODE BootMode,\r
621 IN EFI_PHYSICAL_ADDRESS MemoryBegin,\r
622 IN UINT64 MemoryLength\r
623 )\r
192f6d4c 624;\r
625\r
626\r
627//\r
628// FFS Fw Volume support functions\r
629//\r
b1f6a7c6 630/**\r
631 Given the input file pointer, search for the next matching file in the\r
632 FFS volume as defined by SearchType. The search starts from FileHeader inside\r
633 the Firmware Volume defined by FwVolHeader.\r
634\r
635\r
636 @param PeiServices Pointer to the PEI Core Services Table.\r
637 @param SearchType Filter to find only files of this type.\r
638 Type EFI_FV_FILETYPE_ALL causes no filtering to be done.\r
639 @param VolumeHandle Pointer to the FV header of the volume to search.\r
640 @param FileHandle Pointer to the current file from which to begin searching.\r
641 This pointer will be updated upon return to reflect the file found.\r
642 @retval EFI_NOT_FOUND No files matching the search criteria were found\r
643 @retval EFI_SUCCESS Success to find next file in given volume\r
644\r
645**/\r
192f6d4c 646EFI_STATUS\r
647EFIAPI\r
648PeiFfsFindNextFile (\r
0c2b5da8 649 IN CONST EFI_PEI_SERVICES **PeiServices,\r
192f6d4c 650 IN UINT8 SearchType,\r
0c2b5da8 651 IN EFI_PEI_FV_HANDLE FwVolHeader,\r
652 IN OUT EFI_PEI_FILE_HANDLE *FileHeader\r
192f6d4c 653 )\r
b1f6a7c6 654;\r
192f6d4c 655\r
b1f6a7c6 656/**\r
657 Given the input file pointer, search for the next matching section in the\r
658 FFS volume.\r
192f6d4c 659\r
192f6d4c 660\r
b1f6a7c6 661 @param PeiServices Pointer to the PEI Core Services Table.\r
662 @param SectionType Filter to find only sections of this type.\r
663 @param FileHandle Pointer to the current file to search.\r
664 @param SectionData Pointer to the Section matching SectionType in FfsFileHeader.\r
665 NULL if section not found\r
192f6d4c 666\r
b1f6a7c6 667 @retval EFI_NOT_FOUND No files matching the search criteria were found\r
668 @retval EFI_SUCCESS Success to find section data in given file\r
192f6d4c 669\r
b1f6a7c6 670**/\r
192f6d4c 671EFI_STATUS\r
672EFIAPI\r
673PeiFfsFindSectionData (\r
b0d803fe 674 IN CONST EFI_PEI_SERVICES **PeiServices,\r
192f6d4c 675 IN EFI_SECTION_TYPE SectionType,\r
0c2b5da8 676 IN EFI_PEI_FILE_HANDLE FfsFileHeader,\r
192f6d4c 677 IN OUT VOID **SectionData\r
678 )\r
b1f6a7c6 679;\r
192f6d4c 680\r
b1f6a7c6 681/**\r
682 search the firmware volumes by index\r
192f6d4c 683\r
b1f6a7c6 684 @param PeiServices The PEI core services table.\r
685 @param Instance Instance of FV to find\r
686 @param VolumeHandle Pointer to found Volume.\r
192f6d4c 687\r
b1f6a7c6 688 @retval EFI_INVALID_PARAMETER FwVolHeader is NULL\r
689 @retval EFI_SUCCESS Firmware volume instance successfully found.\r
192f6d4c 690\r
b1f6a7c6 691**/\r
192f6d4c 692EFI_STATUS\r
693EFIAPI\r
694PeiFvFindNextVolume (\r
0c2b5da8 695 IN CONST EFI_PEI_SERVICES **PeiServices,\r
192f6d4c 696 IN UINTN Instance,\r
0c2b5da8 697 IN OUT EFI_PEI_FV_HANDLE *FwVolHeader\r
192f6d4c 698 )\r
192f6d4c 699;\r
700\r
701//\r
702// Memory support functions\r
703//\r
b1f6a7c6 704/**\r
705\r
706 Initialize the memory services.\r
707\r
708\r
709 @param PrivateData Add parameter description\r
710 @param SecCoreData Points to a data structure containing information about the PEI core's operating\r
711 environment, such as the size and location of temporary RAM, the stack location and\r
712 the BFV location.\r
713 @param OldCoreData Pointer to the PEI Core data.\r
714 NULL if being run in non-permament memory mode.\r
715\r
716**/\r
192f6d4c 717VOID\r
718InitializeMemoryServices (\r
b0d803fe 719 IN PEI_CORE_INSTANCE *PrivateData,\r
5aae0aa7 720 IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData,\r
192f6d4c 721 IN PEI_CORE_INSTANCE *OldCoreData\r
722 )\r
b1f6a7c6 723;\r
192f6d4c 724\r
b1f6a7c6 725/**\r
192f6d4c 726\r
b1f6a7c6 727 Install the permanent memory is now available.\r
728 Creates HOB (PHIT and Stack).\r
192f6d4c 729\r
b1f6a7c6 730 @param PeiServices - The PEI core services table.\r
731 @param MemoryBegin - Start of memory address.\r
732 @param MemoryLength - Length of memory.\r
192f6d4c 733\r
b1f6a7c6 734 @return EFI_SUCCESS Always success.\r
192f6d4c 735\r
b1f6a7c6 736**/\r
192f6d4c 737EFI_STATUS\r
738EFIAPI\r
739PeiInstallPeiMemory (\r
0c2b5da8 740 IN CONST EFI_PEI_SERVICES **PeiServices,\r
192f6d4c 741 IN EFI_PHYSICAL_ADDRESS MemoryBegin,\r
742 IN UINT64 MemoryLength\r
743 )\r
b1f6a7c6 744;\r
192f6d4c 745\r
b1f6a7c6 746/**\r
192f6d4c 747\r
b1f6a7c6 748 Memory allocation service on permanent memory,\r
749 not usable prior to the memory installation.\r
192f6d4c 750\r
192f6d4c 751\r
b1f6a7c6 752 @param PeiServices - The PEI core services table.\r
753 @param MemoryType - Type of memory to allocate.\r
754 @param Pages - Number of pages to allocate.\r
755 @param Memory - Pointer of memory allocated.\r
192f6d4c 756\r
b1f6a7c6 757 @retval EFI_SUCCESS The allocation was successful\r
758 @retval EFI_INVALID_PARAMETER Only AllocateAnyAddress is supported.\r
759 @retval EFI_NOT_AVAILABLE_YET Called with permanent memory not available\r
760 @retval EFI_OUT_OF_RESOURCES There is not enough HOB heap to satisfy the requirement\r
761 to allocate the number of pages.\r
192f6d4c 762\r
b1f6a7c6 763**/\r
192f6d4c 764EFI_STATUS\r
765EFIAPI\r
766PeiAllocatePages (\r
0c2b5da8 767 IN CONST EFI_PEI_SERVICES **PeiServices,\r
192f6d4c 768 IN EFI_MEMORY_TYPE MemoryType,\r
769 IN UINTN Pages,\r
770 OUT EFI_PHYSICAL_ADDRESS *Memory\r
771 )\r
b1f6a7c6 772;\r
192f6d4c 773\r
b1f6a7c6 774/**\r
192f6d4c 775\r
b1f6a7c6 776 Memory allocation service on the CAR.\r
192f6d4c 777\r
192f6d4c 778\r
b1f6a7c6 779 @param PeiServices - The PEI core services table.\r
780 @param Size - Amount of memory required\r
781 @param Buffer - Address of pointer to the buffer\r
192f6d4c 782\r
b1f6a7c6 783 @retval EFI_SUCCESS The allocation was successful\r
784 @retval EFI_OUT_OF_RESOURCES There is not enough heap to satisfy the requirement\r
785 to allocate the requested size.\r
192f6d4c 786\r
b1f6a7c6 787**/\r
192f6d4c 788EFI_STATUS\r
789EFIAPI\r
790PeiAllocatePool (\r
0c2b5da8 791 IN CONST EFI_PEI_SERVICES **PeiServices,\r
192f6d4c 792 IN UINTN Size,\r
793 OUT VOID **Buffer\r
794 )\r
b1f6a7c6 795;\r
192f6d4c 796\r
b1f6a7c6 797/**\r
192f6d4c 798\r
b1f6a7c6 799 Routine for load image file.\r
192f6d4c 800\r
192f6d4c 801\r
b1f6a7c6 802 @param PeiServices - The PEI core services table.\r
803 @param FileHandle - Pointer to the FFS file header of the image.\r
804 @param EntryPoint - Pointer to entry point of specified image file for output.\r
805 @param AuthenticationState - Pointer to attestation authentication state of image.\r
192f6d4c 806\r
b1f6a7c6 807 @retval EFI_SUCCESS - Image is successfully loaded.\r
808 @retval EFI_NOT_FOUND - Fail to locate necessary PPI\r
809 @retval Others - Fail to load file.\r
192f6d4c 810\r
b1f6a7c6 811**/\r
192f6d4c 812EFI_STATUS\r
813PeiLoadImage (\r
814 IN EFI_PEI_SERVICES **PeiServices,\r
b0d803fe 815 IN EFI_PEI_FILE_HANDLE FileHandle,\r
816 OUT EFI_PHYSICAL_ADDRESS *EntryPoint,\r
817 OUT UINT32 *AuthenticationState\r
192f6d4c 818 )\r
b1f6a7c6 819;\r
192f6d4c 820\r
b1f6a7c6 821/**\r
192f6d4c 822\r
b1f6a7c6 823 Core version of the Status Code reporter\r
192f6d4c 824\r
192f6d4c 825\r
b1f6a7c6 826 @param PeiServices The PEI core services table.\r
827 @param CodeType Type of Status Code.\r
828 @param Value Value to output for Status Code.\r
829 @param Instance Instance Number of this status code.\r
830 @param CallerId ID of the caller of this status code.\r
831 @param Data Optional data associated with this status code.\r
192f6d4c 832\r
b1f6a7c6 833 @retval EFI_SUCCESS if status code is successfully reported\r
834 @retval EFI_NOT_AVAILABLE_YET if StatusCodePpi has not been installed\r
192f6d4c 835\r
b1f6a7c6 836**/\r
192f6d4c 837EFI_STATUS\r
838EFIAPI\r
839PeiReportStatusCode (\r
0c2b5da8 840 IN CONST EFI_PEI_SERVICES **PeiServices,\r
192f6d4c 841 IN EFI_STATUS_CODE_TYPE CodeType,\r
842 IN EFI_STATUS_CODE_VALUE Value,\r
843 IN UINT32 Instance,\r
0c2b5da8 844 IN CONST EFI_GUID *CallerId,\r
845 IN CONST EFI_STATUS_CODE_DATA *Data OPTIONAL\r
192f6d4c 846 )\r
b1f6a7c6 847;\r
192f6d4c 848\r
b1f6a7c6 849/**\r
192f6d4c 850\r
b1f6a7c6 851 Core version of the Reset System\r
192f6d4c 852\r
192f6d4c 853\r
b1f6a7c6 854 @param PeiServices - The PEI core services table.\r
192f6d4c 855\r
b1f6a7c6 856 @retval EFI_NOT_AVAILABLE_YET PPI not available yet.\r
857 @retval EFI_DEVICE_ERROR Did not reset system.\r
858 Otherwise, resets the system.\r
192f6d4c 859\r
b1f6a7c6 860**/\r
192f6d4c 861EFI_STATUS\r
862EFIAPI\r
863PeiResetSystem (\r
b0d803fe 864 IN CONST EFI_PEI_SERVICES **PeiServices\r
192f6d4c 865 )\r
b1f6a7c6 866;\r
192f6d4c 867\r
b1f6a7c6 868/**\r
192f6d4c 869\r
b1f6a7c6 870 Initialize PeiCore Fv List.\r
192f6d4c 871\r
192f6d4c 872\r
b1f6a7c6 873 @param PrivateData - Pointer to PEI_CORE_INSTANCE.\r
874 @param SecCoreData - Pointer to EFI_SEC_PEI_HAND_OFF.\r
192f6d4c 875\r
b1f6a7c6 876 @return NONE\r
192f6d4c 877\r
b1f6a7c6 878**/\r
50cb16d9 879VOID\r
b0d803fe 880PeiInitializeFv (\r
881 IN PEI_CORE_INSTANCE *PrivateData,\r
882 IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData\r
883 )\r
b1f6a7c6 884;\r
b0d803fe 885\r
b1f6a7c6 886/**\r
887 Process Firmware Volum Information once FvInfoPPI install.\r
b0d803fe 888\r
b0d803fe 889\r
b1f6a7c6 890 @param PeiServices - General purpose services available to every PEIM.\r
891 @param NotifyDescriptor EDES_TODO: Add parameter description\r
892 @param Ppi EDES_TODO: Add parameter description\r
50cb16d9 893\r
b1f6a7c6 894 @retval EFI_SUCCESS if the interface could be successfully installed\r
b0d803fe 895\r
b1f6a7c6 896**/\r
b0d803fe 897EFI_STATUS\r
898EFIAPI\r
899FirmwareVolmeInfoPpiNotifyCallback (\r
900 IN EFI_PEI_SERVICES **PeiServices,\r
901 IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor,\r
902 IN VOID *Ppi\r
903 )\r
b1f6a7c6 904;\r
b0d803fe 905\r
b1f6a7c6 906/**\r
50cb16d9 907\r
b1f6a7c6 908 Given the input VolumeHandle, search for the next matching name file.\r
b0d803fe 909\r
b0d803fe 910\r
b1f6a7c6 911 @param FileName - File name to search.\r
912 @param VolumeHandle - The current FV to search.\r
913 @param FileHandle - Pointer to the file matching name in VolumeHandle.\r
914 - NULL if file not found\r
b0d803fe 915\r
b1f6a7c6 916 @return EFI_STATUS\r
b0d803fe 917\r
b1f6a7c6 918**/\r
b0d803fe 919EFI_STATUS\r
50cb16d9 920EFIAPI\r
b0d803fe 921PeiFfsFindFileByName (\r
922 IN CONST EFI_GUID *FileName,\r
923 IN EFI_PEI_FV_HANDLE VolumeHandle,\r
924 OUT EFI_PEI_FILE_HANDLE *FileHandle\r
925 )\r
b1f6a7c6 926;\r
b0d803fe 927\r
b1f6a7c6 928/**\r
b0d803fe 929\r
b1f6a7c6 930 Returns information about a specific file.\r
b0d803fe 931\r
b0d803fe 932\r
b1f6a7c6 933 @param FileHandle - The handle to file.\r
934 @param FileInfo - Pointer to the file information.\r
b0d803fe 935\r
b1f6a7c6 936 @retval EFI_INVALID_PARAMETER Invalid FileHandle or FileInfo.\r
937 @retval EFI_SUCCESS Success to collect file info.\r
b0d803fe 938\r
b1f6a7c6 939**/\r
b0d803fe 940EFI_STATUS\r
50cb16d9 941EFIAPI\r
b0d803fe 942PeiFfsGetFileInfo (\r
943 IN EFI_PEI_FILE_HANDLE FileHandle,\r
944 OUT EFI_FV_FILE_INFO *FileInfo\r
945 )\r
b1f6a7c6 946;\r
b0d803fe 947\r
b1f6a7c6 948/**\r
b0d803fe 949\r
b1f6a7c6 950 Collect information of given Fv Volume.\r
b0d803fe 951\r
b1f6a7c6 952 @param VolumeHandle - The handle to Fv Volume.\r
953 @param VolumeInfo - The pointer to volume information.\r
b0d803fe 954\r
b1f6a7c6 955 @retval EFI_INVALID_PARAMETER VolumeInfo is NULL\r
956 @retval EFI_SUCCESS Success to collect fv info.\r
957**/\r
b0d803fe 958EFI_STATUS\r
50cb16d9 959EFIAPI\r
b0d803fe 960PeiFfsGetVolumeInfo (\r
961 IN EFI_PEI_FV_HANDLE VolumeHandle,\r
962 OUT EFI_FV_INFO *VolumeInfo\r
963 )\r
b0d803fe 964;\r
965\r
14e8823a 966/**\r
967 This routine enable a PEIM to register itself to shadow when PEI Foundation\r
968 discovery permanent memory.\r
969\r
b1f6a7c6 970 @param FileHandle File handle of a PEIM.\r
50cb16d9 971\r
b1f6a7c6 972 @retval EFI_NOT_FOUND The file handle doesn't point to PEIM itself.\r
973 @retval EFI_ALREADY_STARTED Indicate that the PEIM has been registered itself.\r
974 @retval EFI_SUCCESS Successfully to register itself.\r
14e8823a 975\r
50cb16d9 976**/\r
14e8823a 977EFI_STATUS\r
978EFIAPI\r
979PeiRegisterForShadow (\r
980 IN EFI_PEI_FILE_HANDLE FileHandle\r
981 )\r
982;\r
983\r
b1f6a7c6 984/**\r
985 Given the input file pointer, search for the next matching file in the\r
986 FFS volume as defined by SearchType. The search starts from FileHeader inside\r
987 the Firmware Volume defined by FwVolHeader.\r
988\r
989\r
990 @param FvHandle Pointer to the FV header of the volume to search\r
991 @param FileName File name\r
992 @param SearchType Filter to find only files of this type.\r
993 Type EFI_FV_FILETYPE_ALL causes no filtering to be done.\r
994 @param FileHandle This parameter must point to a valid FFS volume.\r
995 @param AprioriFile Pointer to AprioriFile image in this FV if has\r
996\r
997 @return EFI_NOT_FOUND No files matching the search criteria were found\r
998 @retval EFI_SUCCESS Success to search given file\r
999\r
1000**/\r
b0d803fe 1001EFI_STATUS\r
1002PeiFindFileEx (\r
1003 IN CONST EFI_PEI_FV_HANDLE FvHandle,\r
1004 IN CONST EFI_GUID *FileName, OPTIONAL\r
1005 IN EFI_FV_FILETYPE SearchType,\r
1006 IN OUT EFI_PEI_FILE_HANDLE *FileHandle,\r
1007 IN OUT EFI_PEI_FV_HANDLE *AprioriFile OPTIONAL\r
1008 )\r
b0d803fe 1009;\r
1010\r
b1f6a7c6 1011/**\r
b0d803fe 1012\r
c58cf83d 1013 Install Pei Load File PPI.\r
b0d803fe 1014\r
b0d803fe 1015\r
b1f6a7c6 1016 @param PrivateData - Pointer to PEI_CORE_INSTANCE.\r
1017 @param OldCoreData - Pointer to PEI_CORE_INSTANCE.\r
b0d803fe 1018\r
b1f6a7c6 1019**/\r
1020VOID\r
1021InitializeImageServices (\r
1022 IN PEI_CORE_INSTANCE *PrivateData,\r
1023 IN PEI_CORE_INSTANCE *OldCoreData\r
1024 )\r
b0d803fe 1025;\r
1026\r
288f9b38
LG
1027/**\r
1028 Get Fv image from the FV type file, then install FV INFO ppi, Build FV hob.\r
1029\r
b1f6a7c6 1030 @param PeiServices Pointer to the PEI Core Services Table.\r
1031 @param FileHandle File handle of a Fv type file.\r
288f9b38
LG
1032 @param AuthenticationState Pointer to attestation authentication state of image.\r
1033\r
50cb16d9 1034\r
b1f6a7c6 1035 @retval EFI_NOT_FOUND FV image can't be found.\r
1036 @retval EFI_SUCCESS Successfully to process it.\r
288f9b38
LG
1037\r
1038**/\r
1039EFI_STATUS\r
1040ProcessFvFile (\r
1041 IN EFI_PEI_SERVICES **PeiServices,\r
1042 IN EFI_PEI_FILE_HANDLE FvFileHandle,\r
1043 OUT UINT32 *AuthenticationState\r
1044 );\r
1045\r
192f6d4c 1046#endif\r