]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Core/Pei/PeiMain.h
Use two PCDs to replace _DISABLE_UNUSED_HII_PROTOCOLS_ macro.
[mirror_edk2.git] / MdeModulePkg / Core / Pei / PeiMain.h
CommitLineData
615c6dd0 1/** @file\r
192f6d4c 2\r
3Copyright (c) 2006 - 2007, Intel Corporation\r
4All rights reserved. This program and the accompanying materials\r
5are licensed and made available under the terms and conditions of the BSD License\r
6which accompanies this distribution. The full text of the license may be found at\r
7http://opensource.org/licenses/bsd-license.php\r
8\r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
11\r
12Module Name:\r
13\r
14 PeiMain.h\r
15\r
16Abstract:\r
17\r
18 Definition of Pei Core Structures and Services\r
19\r
20Revision History\r
21\r
615c6dd0 22**/\r
192f6d4c 23\r
24#ifndef _PEI_MAIN_H_\r
25#define _PEI_MAIN_H_\r
26\r
859b72fa 27#include <PiPei.h>\r
859b72fa
A
28#include <Ppi/DxeIpl.h>\r
29#include <Ppi/MemoryDiscovered.h>\r
859b72fa 30#include <Ppi/StatusCode.h>\r
859b72fa 31#include <Ppi/Reset.h>\r
b0d803fe 32#include <Ppi/FirmwareVolume.h>\r
33#include <Ppi/FirmwareVolumeInfo.h>\r
34#include <Ppi/Decompress.h>\r
35#include <Ppi/GuidedSectionExtraction.h>\r
36#include <Ppi/LoadFile.h>\r
37#include <Ppi/Security2.h>\r
58dcdada 38#include <Ppi/TemporaryRamSupport.h>\r
859b72fa
A
39#include <Library/DebugLib.h>\r
40#include <Library/PeiCoreEntryPoint.h>\r
41#include <Library/BaseLib.h>\r
42#include <Library/HobLib.h>\r
43#include <Library/PerformanceLib.h>\r
44#include <Library/PeiServicesLib.h>\r
45#include <Library/ReportStatusCodeLib.h>\r
c58cf83d 46#include <Library/PeCoffLib.h>\r
859b72fa
A
47#include <Library/PeCoffGetEntryPointLib.h>\r
48#include <Library/BaseMemoryLib.h>\r
b0d803fe 49#include <Library/CacheMaintenanceLib.h>\r
859b72fa 50#include <Library/TimerLib.h>\r
177aabe6 51#include <Library/PcdLib.h>\r
28dc3c67 52#include <IndustryStandard/PeImage.h>\r
14e8823a 53#include <Library/PeiServicesTablePointerLib.h>\r
b0d803fe 54#include <Library/MemoryAllocationLib.h>\r
288f9b38 55#include <Library/PeiPiLib.h>\r
b0d803fe 56#include <Guid/FirmwareFileSystem2.h>\r
57#include <Guid/AprioriFileName.h>\r
192f6d4c 58\r
3a63377f 59#define PEI_CORE_INTERNAL_FFS_FILE_DISPATCH_TYPE 0xff\r
60\r
192f6d4c 61//\r
62// Pei Core private data structures\r
63//\r
64typedef union {\r
65 EFI_PEI_PPI_DESCRIPTOR *Ppi;\r
66 EFI_PEI_NOTIFY_DESCRIPTOR *Notify;\r
67 VOID *Raw;\r
68} PEI_PPI_LIST_POINTERS;\r
69\r
192f6d4c 70typedef struct {\r
71 INTN PpiListEnd;\r
72 INTN NotifyListEnd;\r
73 INTN DispatchListEnd;\r
74 INTN LastDispatchedInstall;\r
75 INTN LastDispatchedNotify;\r
eaf539d0 76 PEI_PPI_LIST_POINTERS PpiListPtrs[FixedPcdGet32 (PcdPeiCoreMaxPpiSupported)];\r
192f6d4c 77} PEI_PPI_DATABASE;\r
78\r
3a63377f 79\r
3a63377f 80//\r
81// PEI_CORE_FV_HANDE.PeimState\r
82// Do not change these values as there is code doing math to change states.\r
83// Look for Private->Fv[FvCount].PeimState[PeimCount]++;\r
84//\r
85#define PEIM_STATE_NOT_DISPATCHED 0x00\r
86#define PEIM_STATE_DISPATCHED 0x01\r
87#define PEIM_STATE_REGISITER_FOR_SHADOW 0x02\r
88#define PEIM_STATE_DONE 0x03\r
89\r
90typedef struct {\r
91 EFI_FIRMWARE_VOLUME_HEADER *FvHeader;\r
50cb16d9 92 UINT8 PeimState[FixedPcdGet32 (PcdPeiCoreMaxPeimPerFv)];\r
177aabe6 93 EFI_PEI_FILE_HANDLE FvFileHandles[FixedPcdGet32 (PcdPeiCoreMaxPeimPerFv)];\r
3a63377f 94 BOOLEAN ScanFv;\r
95} PEI_CORE_FV_HANDLE;\r
96\r
288f9b38
LG
97#define CACHE_SETION_MAX_NUMBER 0x10\r
98typedef struct {\r
99 EFI_COMMON_SECTION_HEADER* Section[CACHE_SETION_MAX_NUMBER];\r
100 VOID* SectionData[CACHE_SETION_MAX_NUMBER];\r
101 UINTN SectionSize[CACHE_SETION_MAX_NUMBER];\r
102 UINTN AllSectionCount;\r
103 UINTN SectionIndex;\r
104} CACHE_SECTION_DATA;\r
105\r
192f6d4c 106//\r
107// Pei Core private data structure instance\r
108//\r
109\r
110#define PEI_CORE_HANDLE_SIGNATURE EFI_SIGNATURE_32('P','e','i','C')\r
111\r
112typedef struct{\r
113 UINTN Signature;\r
114 EFI_PEI_SERVICES *PS; // Point to ServiceTableShadow\r
115 PEI_PPI_DATABASE PpiData;\r
3a63377f 116 UINTN FvCount;\r
177aabe6 117 PEI_CORE_FV_HANDLE Fv[FixedPcdGet32 (PcdPeiCoreMaxFvSupported)];\r
118 EFI_PEI_FILE_HANDLE CurrentFvFileHandles[FixedPcdGet32 (PcdPeiCoreMaxPeimPerFv)];\r
3a63377f 119 UINTN AprioriCount;\r
50cb16d9 120 UINTN CurrentPeimFvCount;\r
3a63377f 121 UINTN CurrentPeimCount;\r
122 EFI_PEI_FILE_HANDLE CurrentFileHandle;\r
123 UINTN AllFvCount;\r
177aabe6 124 EFI_PEI_FV_HANDLE AllFv[FixedPcdGet32 (PcdPeiCoreMaxFvSupported)];\r
192f6d4c 125 EFI_PEI_HOB_POINTERS HobList;\r
126 BOOLEAN SwitchStackSignal;\r
127 BOOLEAN PeiMemoryInstalled;\r
128 EFI_PHYSICAL_ADDRESS StackBase;\r
129 UINT64 StackSize;\r
130 VOID *BottomOfCarHeap;\r
131 VOID *TopOfCarHeap;\r
132 VOID *CpuIo;\r
b0d803fe 133 EFI_PEI_SECURITY2_PPI *PrivateSecurityPpi;\r
192f6d4c 134 EFI_PEI_SERVICES ServiceTableShadow;\r
58dcdada 135 UINTN SizeOfTemporaryMemory;\r
192f6d4c 136 UINTN SizeOfCacheAsRam;\r
137 VOID *MaxTopOfCarHeap;\r
b0d803fe 138 EFI_PEI_PPI_DESCRIPTOR *XipLoadFile;\r
58dcdada 139 EFI_PHYSICAL_ADDRESS PhysicalMemoryBegin;\r
140 UINT64 PhysicalMemoryLength;\r
141 EFI_PHYSICAL_ADDRESS FreePhysicalMemoryTop;\r
142 VOID* ShadowedPeiCore;\r
288f9b38 143 CACHE_SECTION_DATA CacheSection;\r
192f6d4c 144} PEI_CORE_INSTANCE;\r
145\r
146//\r
147// Pei Core Instance Data Macros\r
148//\r
149\r
150#define PEI_CORE_INSTANCE_FROM_PS_THIS(a) \\r
151 CR(a, PEI_CORE_INSTANCE, PS, PEI_CORE_HANDLE_SIGNATURE)\r
152\r
153//\r
154// BUGBUG: Where does this go really?\r
155//\r
156typedef\r
157EFI_STATUS\r
158(EFIAPI *PEI_CORE_ENTRY_POINT)(\r
b98c2ab7 159 IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData,\r
160 IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList,\r
161 IN PEI_CORE_INSTANCE *OldCoreData\r
192f6d4c 162 );\r
163\r
164//\r
165// Union of temporarily used function pointers (to save stack space)\r
166//\r
167typedef union {\r
168 PEI_CORE_ENTRY_POINT PeiCore;\r
1c9d209f 169 EFI_PEIM_ENTRY_POINT2 PeimEntry;\r
192f6d4c 170 EFI_PEIM_NOTIFY_ENTRY_POINT PeimNotifyEntry;\r
171 EFI_DXE_IPL_PPI *DxeIpl;\r
172 EFI_PEI_PPI_DESCRIPTOR *PpiDescriptor;\r
173 EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor;\r
174 VOID *Raw;\r
175} PEI_CORE_TEMP_POINTERS;\r
176\r
177\r
b98c2ab7 178\r
179typedef struct {\r
180 CONST EFI_SEC_PEI_HAND_OFF *SecCoreData;\r
181 EFI_PEI_PPI_DESCRIPTOR *PpiList;\r
182 VOID *Data;\r
183} PEI_CORE_PARAMETERS;\r
184\r
192f6d4c 185//\r
186// PeiCore function\r
187//\r
188EFI_STATUS\r
189EFIAPI\r
190PeiCore (\r
5aae0aa7 191 IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData,\r
192 IN CONST EFI_PEI_PPI_DESCRIPTOR *PpList,\r
193 IN VOID *Data\r
192f6d4c 194 )\r
195/*++\r
196\r
197Routine Description:\r
198\r
199 The entry routine to Pei Core, invoked by PeiMain during transition\r
200 from SEC to PEI. After switching stack in the PEI core, it will restart\r
201 with the old core data.\r
202\r
203Arguments:\r
204\r
205 PeiStartupDescriptor - Information and services provided by SEC phase.\r
206 OldCoreData - Pointer to old core data that is used to initialize the\r
207 core's data areas.\r
208\r
209Returns:\r
210\r
211 This function never returns\r
212 EFI_NOT_FOUND - Never reach\r
213\r
214--*/\r
215;\r
216\r
217//\r
218// Dispatcher support functions\r
219//\r
220\r
b0d803fe 221BOOLEAN\r
192f6d4c 222PeimDispatchReadiness (\r
223 IN EFI_PEI_SERVICES **PeiServices,\r
b0d803fe 224 IN VOID *DependencyExpression\r
192f6d4c 225 )\r
226/*++\r
227\r
228Routine Description:\r
229\r
230 This is the POSTFIX version of the dependency evaluator. When a\r
231 PUSH [PPI GUID] is encountered, a pointer to the GUID is stored on\r
232 the evaluation stack. When that entry is poped from the evaluation\r
233 stack, the PPI is checked if it is installed. This method allows\r
234 some time savings as not all PPIs must be checked for certain\r
235 operation types (AND, OR).\r
236\r
237Arguments:\r
238\r
239 PeiServices - Calling context.\r
240\r
241 DependencyExpression - Pointer to a dependency expression. The Grammar adheres to\r
242 the BNF described above and is stored in postfix notation.\r
192f6d4c 243\r
244Returns:\r
245\r
246 Status = EFI_SUCCESS if it is a well-formed Grammar\r
247 EFI_INVALID_PARAMETER if the dependency expression overflows\r
248 the evaluation stack\r
249 EFI_INVALID_PARAMETER if the dependency expression underflows\r
250 the evaluation stack\r
251 EFI_INVALID_PARAMETER if the dependency expression is not a\r
252 well-formed Grammar.\r
253--*/\r
254;\r
255\r
256\r
b0d803fe 257VOID\r
192f6d4c 258PeiDispatcher (\r
5aae0aa7 259 IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData,\r
b0d803fe 260 IN PEI_CORE_INSTANCE *PrivateData\r
192f6d4c 261 )\r
262\r
263/*++\r
264\r
265Routine Description:\r
266\r
267 Conduct PEIM dispatch.\r
268\r
269Arguments:\r
270\r
271 PeiStartupDescriptor - Pointer to IN EFI_PEI_STARTUP_DESCRIPTOR\r
272 PrivateData - Pointer to the private data passed in from caller\r
273 DispatchData - Pointer to PEI_CORE_DISPATCH_DATA data.\r
274\r
275Returns:\r
276\r
277 EFI_SUCCESS - Successfully dispatched PEIM.\r
278 EFI_NOT_FOUND - The dispatch failed.\r
279\r
280--*/\r
281;\r
282\r
283\r
284VOID\r
285InitializeDispatcherData (\r
b0d803fe 286 IN PEI_CORE_INSTANCE *PrivateData,\r
192f6d4c 287 IN PEI_CORE_INSTANCE *OldCoreData,\r
5aae0aa7 288 IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData\r
192f6d4c 289 )\r
290/*++\r
291\r
292Routine Description:\r
293\r
294 Initialize the Dispatcher's data members\r
295\r
296Arguments:\r
297\r
298 PeiServices - The PEI core services table.\r
299 OldCoreData - Pointer to old core data (before switching stack).\r
300 NULL if being run in non-permament memory mode.\r
301 PeiStartupDescriptor - Information and services provided by SEC phase.\r
302\r
303\r
304Returns:\r
305\r
306 None\r
307\r
308--*/\r
309;\r
310\r
311\r
58dcdada 312EFI_STATUS\r
313FindNextPeim (\r
314 IN EFI_PEI_SERVICES **PeiServices,\r
315 IN EFI_FIRMWARE_VOLUME_HEADER *FwVolHeader,\r
316 IN OUT EFI_FFS_FILE_HEADER **PeimFileHeader\r
317 )\r
318/*++\r
319\r
320Routine Description:\r
321 Given the input file pointer, search for the next matching file in the\r
322 FFS volume. The search starts from FileHeader inside\r
323 the Firmware Volume defined by FwVolHeader.\r
324\r
325Arguments:\r
326 PeiServices - Pointer to the PEI Core Services Table.\r
327\r
328 FwVolHeader - Pointer to the FV header of the volume to search.\r
329 This parameter must point to a valid FFS volume.\r
330\r
331 PeimFileHeader - Pointer to the current file from which to begin searching.\r
332 This pointer will be updated upon return to reflect the file found.\r
333\r
334Returns:\r
335 EFI_NOT_FOUND - No files matching the search criteria were found\r
336 EFI_SUCCESS\r
337\r
338--*/\r
339;\r
340\r
192f6d4c 341BOOLEAN\r
342Dispatched (\r
343 IN UINT8 CurrentPeim,\r
344 IN UINT32 DispatchedPeimBitMap\r
345 )\r
346/*++\r
347\r
348Routine Description:\r
349\r
350 This routine checks to see if a particular PEIM has been dispatched during\r
351 the PEI core dispatch.\r
352\r
353Arguments:\r
354 CurrentPeim - The PEIM/FV in the bit array to check.\r
355 DispatchedPeimBitMap - Bit array, each bit corresponds to a PEIM/FV.\r
356\r
357Returns:\r
358 TRUE if PEIM already dispatched\r
359 FALSE if not\r
360\r
361--*/\r
362;\r
363\r
364VOID\r
365SetDispatched (\r
366 IN EFI_PEI_SERVICES **PeiServices,\r
367 IN UINT8 CurrentPeim,\r
368 OUT UINT32 *DispatchedPeimBitMap\r
369 )\r
370/*++\r
371\r
372Routine Description:\r
373\r
374 This routine sets a PEIM as having been dispatched once its entry\r
375 point has been invoked.\r
376\r
377Arguments:\r
378\r
379 PeiServices - The PEI core services table.\r
380 CurrentPeim - The PEIM/FV in the bit array to check.\r
381 DispatchedPeimBitMap - Bit array, each bit corresponds to a PEIM/FV.\r
382\r
383Returns:\r
384 None\r
385\r
386--*/\r
387;\r
388\r
389BOOLEAN\r
390DepexSatisfied (\r
b0d803fe 391 IN PEI_CORE_INSTANCE *Private,\r
392 IN EFI_PEI_FILE_HANDLE FileHandle,\r
393 IN UINTN PeimCount\r
192f6d4c 394 )\r
395/*++\r
396\r
397Routine Description:\r
398\r
399 This routine parses the Dependency Expression, if available, and\r
400 decides if the module can be executed.\r
401\r
402Arguments:\r
403 PeiServices - The PEI Service Table\r
404 CurrentPeimAddress - Address of the PEIM Firmware File under investigation\r
405\r
406Returns:\r
407 TRUE - Can be dispatched\r
408 FALSE - Cannot be dispatched\r
409\r
410--*/\r
411;\r
412\r
192f6d4c 413//\r
414// PPI support functions\r
415//\r
416VOID\r
417InitializePpiServices (\r
b0d803fe 418 IN PEI_CORE_INSTANCE *PrivateData,\r
192f6d4c 419 IN PEI_CORE_INSTANCE *OldCoreData\r
420 )\r
421/*++\r
422\r
423Routine Description:\r
424\r
425 Initialize PPI services.\r
426\r
427Arguments:\r
428\r
429 PeiServices - The PEI core services table.\r
430 OldCoreData - Pointer to the PEI Core data.\r
431 NULL if being run in non-permament memory mode.\r
432\r
433Returns:\r
434 Nothing\r
435\r
436--*/\r
437;\r
438\r
439VOID\r
440ConvertPpiPointers (\r
58dcdada 441 IN CONST EFI_PEI_SERVICES **PeiServices,\r
442 IN UINTN OldCheckingBottom,\r
443 IN UINTN OldCheckingTop,\r
192f6d4c 444 IN EFI_HOB_HANDOFF_INFO_TABLE *NewHandOffHob\r
445 )\r
446/*++\r
447\r
448Routine Description:\r
449\r
450 Migrate the Hob list from the CAR stack to PEI installed memory.\r
451\r
452Arguments:\r
453\r
58dcdada 454 PeiServices - The PEI core services table.\r
455 OldCheckingBottom - The old checking bottom.\r
456 OldCheckingTop - The old checking top.\r
457 NewHandOffHob - The new handoff HOB list.\r
192f6d4c 458\r
459Returns:\r
460\r
461--*/\r
462;\r
463\r
464EFI_STATUS\r
465EFIAPI\r
466PeiInstallPpi (\r
0c2b5da8 467 IN CONST EFI_PEI_SERVICES **PeiServices,\r
468 IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList\r
192f6d4c 469 )\r
470/*++\r
471\r
472Routine Description:\r
473\r
474 Install PPI services.\r
475\r
476Arguments:\r
477\r
478 PeiServices - Pointer to the PEI Service Table\r
479 PpiList - Pointer to a list of PEI PPI Descriptors.\r
480\r
481Returns:\r
482\r
483 EFI_SUCCESS - if all PPIs in PpiList are successfully installed.\r
484 EFI_INVALID_PARAMETER - if PpiList is NULL pointer\r
485 EFI_INVALID_PARAMETER - if any PPI in PpiList is not valid\r
486 EFI_OUT_OF_RESOURCES - if there is no more memory resource to install PPI\r
487\r
488--*/\r
489;\r
490\r
491EFI_STATUS\r
492EFIAPI\r
493PeiReInstallPpi (\r
0c2b5da8 494 IN CONST EFI_PEI_SERVICES **PeiServices,\r
495 IN CONST EFI_PEI_PPI_DESCRIPTOR *OldPpi,\r
496 IN CONST EFI_PEI_PPI_DESCRIPTOR *NewPpi\r
192f6d4c 497 )\r
498/*++\r
499\r
500Routine Description:\r
501\r
502 Re-Install PPI services.\r
503\r
504Arguments:\r
505\r
506 PeiServices - Pointer to the PEI Service Table\r
507 OldPpi - Pointer to the old PEI PPI Descriptors.\r
508 NewPpi - Pointer to the new PEI PPI Descriptors.\r
509\r
510Returns:\r
511\r
512 EFI_SUCCESS - if the operation was successful\r
513 EFI_INVALID_PARAMETER - if OldPpi or NewPpi is NULL\r
514 EFI_INVALID_PARAMETER - if NewPpi is not valid\r
515 EFI_NOT_FOUND - if the PPI was not in the database\r
516\r
517--*/\r
518;\r
519\r
520EFI_STATUS\r
521EFIAPI\r
522PeiLocatePpi (\r
0c2b5da8 523 IN CONST EFI_PEI_SERVICES **PeiServices,\r
524 IN CONST EFI_GUID *Guid,\r
192f6d4c 525 IN UINTN Instance,\r
526 IN OUT EFI_PEI_PPI_DESCRIPTOR **PpiDescriptor,\r
527 IN OUT VOID **Ppi\r
528 )\r
529/*++\r
530\r
531Routine Description:\r
532\r
533 Locate a given named PPI.\r
534\r
535Arguments:\r
536\r
537 PeiServices - Pointer to the PEI Service Table\r
538 Guid - Pointer to GUID of the PPI.\r
539 Instance - Instance Number to discover.\r
540 PpiDescriptor - Pointer to reference the found descriptor. If not NULL,\r
541 returns a pointer to the descriptor (includes flags, etc)\r
542 Ppi - Pointer to reference the found PPI\r
543\r
544Returns:\r
545\r
546 Status - EFI_SUCCESS if the PPI is in the database\r
547 EFI_NOT_FOUND if the PPI is not in the database\r
548--*/\r
549;\r
550\r
551EFI_STATUS\r
552EFIAPI\r
553PeiNotifyPpi (\r
0c2b5da8 554 IN CONST EFI_PEI_SERVICES **PeiServices,\r
555 IN CONST EFI_PEI_NOTIFY_DESCRIPTOR *NotifyList\r
192f6d4c 556 )\r
557/*++\r
558\r
559Routine Description:\r
560\r
561 Install a notification for a given PPI.\r
562\r
563Arguments:\r
564\r
565 PeiServices - Pointer to the PEI Service Table\r
566 NotifyList - Pointer to list of Descriptors to notify upon.\r
567\r
568Returns:\r
569\r
570 Status - EFI_SUCCESS if successful\r
571 EFI_OUT_OF_RESOURCES if no space in the database\r
572 EFI_INVALID_PARAMETER if not a good decriptor\r
573\r
574--*/\r
575;\r
576\r
577VOID\r
578ProcessNotifyList (\r
b0d803fe 579 IN PEI_CORE_INSTANCE *PrivateData\r
192f6d4c 580 )\r
581/*++\r
582\r
583Routine Description:\r
584\r
585 Process the Notify List at dispatch level.\r
586\r
587Arguments:\r
588\r
589 PeiServices - Pointer to the PEI Service Table\r
590\r
591Returns:\r
592\r
593--*/\r
594;\r
595\r
596VOID\r
597DispatchNotify (\r
b0d803fe 598 IN PEI_CORE_INSTANCE *PrivateData,\r
192f6d4c 599 IN UINTN NotifyType,\r
600 IN INTN InstallStartIndex,\r
601 IN INTN InstallStopIndex,\r
602 IN INTN NotifyStartIndex,\r
603 IN INTN NotifyStopIndex\r
604 )\r
605/*++\r
606\r
607Routine Description:\r
608\r
609 Dispatch notifications.\r
610\r
611Arguments:\r
612\r
613 PeiServices - Pointer to the PEI Service Table\r
614 NotifyType - Type of notify to fire.\r
615 InstallStartIndex - Install Beginning index.\r
616 InstallStopIndex - Install Ending index.\r
617 NotifyStartIndex - Notify Beginning index.\r
618 NotifyStopIndex - Notify Ending index.\r
619\r
620Returns: None\r
621\r
622--*/\r
623;\r
624\r
625//\r
626// Boot mode support functions\r
627//\r
628EFI_STATUS\r
629EFIAPI\r
630PeiGetBootMode (\r
0c2b5da8 631 IN CONST EFI_PEI_SERVICES **PeiServices,\r
192f6d4c 632 IN OUT EFI_BOOT_MODE *BootMode\r
633 )\r
634/*++\r
635\r
636Routine Description:\r
637\r
638 This service enables PEIMs to ascertain the present value of the boot mode.\r
639\r
640Arguments:\r
641\r
642 PeiServices - The PEI core services table.\r
643 BootMode - A pointer to contain the value of the boot mode.\r
644\r
645Returns:\r
646\r
647 EFI_SUCCESS - The boot mode was returned successfully.\r
648 EFI_INVALID_PARAMETER - BootMode is NULL.\r
649\r
650--*/\r
651;\r
652\r
653EFI_STATUS\r
654EFIAPI\r
655PeiSetBootMode (\r
0c2b5da8 656 IN CONST EFI_PEI_SERVICES **PeiServices,\r
192f6d4c 657 IN EFI_BOOT_MODE BootMode\r
658 )\r
659/*++\r
660\r
661Routine Description:\r
662\r
663 This service enables PEIMs to update the boot mode variable.\r
664\r
665Arguments:\r
666\r
667 PeiServices - The PEI core services table.\r
668 BootMode - The value of the boot mode to set.\r
669\r
670Returns:\r
671\r
672 EFI_SUCCESS - The value was successfully updated\r
673\r
674--*/\r
675;\r
676\r
677//\r
678// Security support functions\r
679//\r
680VOID\r
681InitializeSecurityServices (\r
682 IN EFI_PEI_SERVICES **PeiServices,\r
683 IN PEI_CORE_INSTANCE *OldCoreData\r
684 )\r
685/*++\r
686\r
687Routine Description:\r
688\r
689 Initialize the security services.\r
690\r
691Arguments:\r
692\r
693 PeiServices - The PEI core services table.\r
694 OldCoreData - Pointer to the old core data.\r
695 NULL if being run in non-permament memory mode.\r
696Returns:\r
697\r
698 None\r
699\r
700--*/\r
701;\r
702\r
703EFI_STATUS\r
704VerifyFv (\r
705 IN EFI_FIRMWARE_VOLUME_HEADER *CurrentFvAddress\r
706 )\r
707/*++\r
708\r
709Routine Description:\r
710\r
711 Provide a callout to the OEM FV verification service.\r
712\r
713Arguments:\r
714\r
715 CurrentFvAddress - Pointer to the FV under investigation.\r
716\r
717Returns:\r
718\r
719 Status - EFI_SUCCESS\r
720\r
721--*/\r
722;\r
723\r
724\r
725EFI_STATUS\r
726VerifyPeim (\r
b0d803fe 727 IN PEI_CORE_INSTANCE *PrivateData,\r
728 IN EFI_PEI_FV_HANDLE VolumeHandle,\r
729 IN EFI_PEI_FILE_HANDLE FileHandle\r
192f6d4c 730 )\r
731/*++\r
732\r
733Routine Description:\r
734\r
735 Provide a callout to the security verification service.\r
736\r
737Arguments:\r
738\r
739 PeiServices - The PEI core services table.\r
740 CurrentPeimAddress - Pointer to the Firmware File under investigation.\r
741\r
742Returns:\r
743\r
744 EFI_SUCCESS - Image is OK\r
745 EFI_SECURITY_VIOLATION - Image is illegal\r
746\r
747--*/\r
748;\r
749\r
750\r
751EFI_STATUS\r
752EFIAPI\r
753PeiGetHobList (\r
0c2b5da8 754 IN CONST EFI_PEI_SERVICES **PeiServices,\r
192f6d4c 755 IN OUT VOID **HobList\r
756 )\r
757/*++\r
758\r
759Routine Description:\r
760\r
761 Gets the pointer to the HOB List.\r
762\r
763Arguments:\r
764\r
765 PeiServices - The PEI core services table.\r
766 HobList - Pointer to the HOB List.\r
767\r
768Returns:\r
769\r
770 EFI_SUCCESS - Get the pointer of HOB List\r
771 EFI_NOT_AVAILABLE_YET - the HOB List is not yet published\r
772 EFI_INVALID_PARAMETER - HobList is NULL (in debug mode)\r
773\r
774--*/\r
775;\r
776\r
777EFI_STATUS\r
778EFIAPI\r
779PeiCreateHob (\r
0c2b5da8 780 IN CONST EFI_PEI_SERVICES **PeiServices,\r
192f6d4c 781 IN UINT16 Type,\r
782 IN UINT16 Length,\r
783 IN OUT VOID **Hob\r
784 )\r
785/*++\r
786\r
787Routine Description:\r
788\r
789 Add a new HOB to the HOB List.\r
790\r
791Arguments:\r
792\r
793 PeiServices - The PEI core services table.\r
794 Type - Type of the new HOB.\r
795 Length - Length of the new HOB to allocate.\r
796 Hob - Pointer to the new HOB.\r
797\r
798Returns:\r
799\r
800 Status - EFI_SUCCESS\r
801 - EFI_INVALID_PARAMETER if Hob is NULL\r
802 - EFI_NOT_AVAILABLE_YET if HobList is still not available.\r
803 - EFI_OUT_OF_RESOURCES if there is no more memory to grow the Hoblist.\r
804\r
805--*/\r
806;\r
807\r
808EFI_STATUS\r
809PeiCoreBuildHobHandoffInfoTable (\r
810 IN EFI_BOOT_MODE BootMode,\r
811 IN EFI_PHYSICAL_ADDRESS MemoryBegin,\r
812 IN UINT64 MemoryLength\r
813 )\r
814/*++\r
815\r
816Routine Description:\r
817\r
818 Builds a Handoff Information Table HOB\r
819\r
820Arguments:\r
821\r
822 BootMode - Current Bootmode\r
823 MemoryBegin - Start Memory Address.\r
824 MemoryLength - Length of Memory.\r
825\r
826Returns:\r
827\r
828 EFI_SUCCESS\r
829\r
830--*/\r
831;\r
832\r
833\r
834//\r
835// FFS Fw Volume support functions\r
836//\r
837EFI_STATUS\r
838EFIAPI\r
839PeiFfsFindNextFile (\r
0c2b5da8 840 IN CONST EFI_PEI_SERVICES **PeiServices,\r
192f6d4c 841 IN UINT8 SearchType,\r
0c2b5da8 842 IN EFI_PEI_FV_HANDLE FwVolHeader,\r
843 IN OUT EFI_PEI_FILE_HANDLE *FileHeader\r
192f6d4c 844 )\r
845/*++\r
846\r
847Routine Description:\r
848 Given the input file pointer, search for the next matching file in the\r
849 FFS volume as defined by SearchType. The search starts from FileHeader inside\r
850 the Firmware Volume defined by FwVolHeader.\r
851\r
852Arguments:\r
853 PeiServices - Pointer to the PEI Core Services Table.\r
854\r
855 SearchType - Filter to find only files of this type.\r
856 Type EFI_FV_FILETYPE_ALL causes no filtering to be done.\r
857\r
858 FwVolHeader - Pointer to the FV header of the volume to search.\r
859 This parameter must point to a valid FFS volume.\r
860\r
861 FileHeader - Pointer to the current file from which to begin searching.\r
862 This pointer will be updated upon return to reflect the file found.\r
863\r
864Returns:\r
865 EFI_NOT_FOUND - No files matching the search criteria were found\r
866 EFI_SUCCESS\r
867\r
868--*/\r
869;\r
870\r
871EFI_STATUS\r
872EFIAPI\r
873PeiFfsFindSectionData (\r
b0d803fe 874 IN CONST EFI_PEI_SERVICES **PeiServices,\r
192f6d4c 875 IN EFI_SECTION_TYPE SectionType,\r
0c2b5da8 876 IN EFI_PEI_FILE_HANDLE FfsFileHeader,\r
192f6d4c 877 IN OUT VOID **SectionData\r
878 )\r
879/*++\r
880\r
881Routine Description:\r
882 Given the input file pointer, search for the next matching section in the\r
883 FFS volume.\r
884\r
885Arguments:\r
886 PeiServices - Pointer to the PEI Core Services Table.\r
887 SearchType - Filter to find only sections of this type.\r
888 FfsFileHeader - Pointer to the current file to search.\r
889 SectionData - Pointer to the Section matching SectionType in FfsFileHeader.\r
890 - NULL if section not found\r
891\r
892Returns:\r
893 EFI_NOT_FOUND - No files matching the search criteria were found\r
894 EFI_SUCCESS\r
895\r
896--*/\r
897;\r
898\r
899EFI_STATUS\r
900EFIAPI\r
901PeiFvFindNextVolume (\r
0c2b5da8 902 IN CONST EFI_PEI_SERVICES **PeiServices,\r
192f6d4c 903 IN UINTN Instance,\r
0c2b5da8 904 IN OUT EFI_PEI_FV_HANDLE *FwVolHeader\r
192f6d4c 905 )\r
906/*++\r
907\r
908Routine Description:\r
909\r
910 Return the BFV location\r
911\r
912 BugBug -- Move this to the location of this code to where the\r
913 other FV and FFS support code lives.\r
914 Also, update to use FindFV for instances #'s >= 1.\r
915\r
916Arguments:\r
917\r
918 PeiServices - The PEI core services table.\r
919 Instance - Instance of FV to find\r
920 FwVolHeader - Pointer to contain the data to return\r
921\r
922Returns:\r
923 Pointer to the Firmware Volume instance requested\r
924\r
925 EFI_INVALID_PARAMETER - FwVolHeader is NULL\r
926\r
927 EFI_SUCCESS - Firmware volume instance successfully found.\r
928\r
929--*/\r
930;\r
931\r
932//\r
933// Memory support functions\r
934//\r
935VOID\r
936InitializeMemoryServices (\r
b0d803fe 937 IN PEI_CORE_INSTANCE *PrivateData,\r
5aae0aa7 938 IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData,\r
192f6d4c 939 IN PEI_CORE_INSTANCE *OldCoreData\r
940 )\r
941/*++\r
942\r
943Routine Description:\r
944\r
945 Initialize the memory services.\r
946\r
947Arguments:\r
948\r
949 PeiServices - The PEI core services table.\r
950 PeiStartupDescriptor - Information and services provided by SEC phase.\r
951 OldCoreData - Pointer to the PEI Core data.\r
952 NULL if being run in non-permament memory mode.\r
953\r
954Returns:\r
955\r
956 None\r
957\r
958--*/\r
959;\r
960\r
961EFI_STATUS\r
962EFIAPI\r
963PeiInstallPeiMemory (\r
0c2b5da8 964 IN CONST EFI_PEI_SERVICES **PeiServices,\r
192f6d4c 965 IN EFI_PHYSICAL_ADDRESS MemoryBegin,\r
966 IN UINT64 MemoryLength\r
967 )\r
968/*++\r
969\r
970Routine Description:\r
971\r
972 Install the permanent memory is now available.\r
973 Creates HOB (PHIT and Stack).\r
974\r
975Arguments:\r
976\r
977 PeiServices - The PEI core services table.\r
978 MemoryBegin - Start of memory address.\r
979 MemoryLength - Length of memory.\r
980\r
981Returns:\r
982\r
983 Status - EFI_SUCCESS\r
984\r
985--*/\r
986;\r
987\r
988EFI_STATUS\r
989EFIAPI\r
990PeiAllocatePages (\r
0c2b5da8 991 IN CONST EFI_PEI_SERVICES **PeiServices,\r
192f6d4c 992 IN EFI_MEMORY_TYPE MemoryType,\r
993 IN UINTN Pages,\r
994 OUT EFI_PHYSICAL_ADDRESS *Memory\r
995 )\r
996/*++\r
997\r
998Routine Description:\r
999\r
1000 Memory allocation service on permanent memory,\r
1001 not usable prior to the memory installation.\r
1002\r
1003Arguments:\r
1004\r
1005 PeiServices - The PEI core services table.\r
1006 Type - Type of allocation.\r
1007 MemoryType - Type of memory to allocate.\r
1008 Pages - Number of pages to allocate.\r
1009 Memory - Pointer of memory allocated.\r
1010\r
1011Returns:\r
1012\r
1013 Status - EFI_SUCCESS The allocation was successful\r
1014 EFI_INVALID_PARAMETER Only AllocateAnyAddress is supported.\r
1015 EFI_NOT_AVAILABLE_YET Called with permanent memory not available\r
1016 EFI_OUT_OF_RESOURCES There is not enough HOB heap to satisfy the requirement\r
1017 to allocate the number of pages.\r
1018\r
1019--*/\r
1020;\r
1021\r
1022EFI_STATUS\r
1023EFIAPI\r
1024PeiAllocatePool (\r
0c2b5da8 1025 IN CONST EFI_PEI_SERVICES **PeiServices,\r
192f6d4c 1026 IN UINTN Size,\r
1027 OUT VOID **Buffer\r
1028 )\r
1029/*++\r
1030\r
1031Routine Description:\r
1032\r
1033 Memory allocation service on the CAR.\r
1034\r
1035Arguments:\r
1036\r
1037 PeiServices - The PEI core services table.\r
1038\r
1039 Size - Amount of memory required\r
1040\r
1041 Buffer - Address of pointer to the buffer\r
1042\r
1043Returns:\r
1044\r
1045 Status - EFI_SUCCESS The allocation was successful\r
1046 EFI_OUT_OF_RESOURCES There is not enough heap to satisfy the requirement\r
1047 to allocate the requested size.\r
1048\r
1049--*/\r
1050;\r
1051\r
1052EFI_STATUS\r
1053PeiLoadImage (\r
1054 IN EFI_PEI_SERVICES **PeiServices,\r
b0d803fe 1055 IN EFI_PEI_FILE_HANDLE FileHandle,\r
1056 OUT EFI_PHYSICAL_ADDRESS *EntryPoint,\r
1057 OUT UINT32 *AuthenticationState\r
192f6d4c 1058 )\r
1059/*++\r
1060\r
1061Routine Description:\r
1062\r
1063 Get entry point of a Peim file.\r
1064\r
1065Arguments:\r
1066\r
1067 PeiServices - Calling context.\r
1068\r
1069 PeimFileHeader - Peim file's header.\r
1070\r
1071 EntryPoint - Entry point of that Peim file.\r
1072\r
1073Returns:\r
1074\r
1075 Status code.\r
1076\r
1077--*/\r
1078;\r
1079\r
1080\r
1081EFI_STATUS\r
1082EFIAPI\r
1083PeiReportStatusCode (\r
0c2b5da8 1084 IN CONST EFI_PEI_SERVICES **PeiServices,\r
192f6d4c 1085 IN EFI_STATUS_CODE_TYPE CodeType,\r
1086 IN EFI_STATUS_CODE_VALUE Value,\r
1087 IN UINT32 Instance,\r
0c2b5da8 1088 IN CONST EFI_GUID *CallerId,\r
1089 IN CONST EFI_STATUS_CODE_DATA *Data OPTIONAL\r
192f6d4c 1090 )\r
1091/*++\r
1092\r
1093Routine Description:\r
1094\r
1095 Core version of the Status Code reporter\r
1096\r
1097Arguments:\r
1098\r
1099 PeiServices - The PEI core services table.\r
1100\r
1101 CodeType - Type of Status Code.\r
1102\r
1103 Value - Value to output for Status Code.\r
1104\r
1105 Instance - Instance Number of this status code.\r
1106\r
1107 CallerId - ID of the caller of this status code.\r
1108\r
1109 Data - Optional data associated with this status code.\r
1110\r
1111Returns:\r
1112\r
1113 Status - EFI_SUCCESS if status code is successfully reported\r
1114 - EFI_NOT_AVAILABLE_YET if StatusCodePpi has not been installed\r
1115\r
1116--*/\r
1117;\r
1118\r
1119\r
1120EFI_STATUS\r
1121EFIAPI\r
1122PeiResetSystem (\r
b0d803fe 1123 IN CONST EFI_PEI_SERVICES **PeiServices\r
192f6d4c 1124 )\r
1125/*++\r
1126\r
1127Routine Description:\r
1128\r
1129 Core version of the Reset System\r
1130\r
1131Arguments:\r
1132\r
1133 PeiServices - The PEI core services table.\r
1134\r
1135Returns:\r
1136\r
1137 Status - EFI_NOT_AVAILABLE_YET. PPI not available yet.\r
1138 - EFI_DEVICE_ERROR. Did not reset system.\r
1139\r
1140 Otherwise, resets the system.\r
1141\r
1142--*/\r
1143;\r
1144\r
50cb16d9 1145VOID\r
b0d803fe 1146PeiInitializeFv (\r
1147 IN PEI_CORE_INSTANCE *PrivateData,\r
1148 IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData\r
1149 )\r
1150/*++\r
1151\r
1152Routine Description:\r
1153\r
1154 Initialize PeiCore Fv List.\r
1155\r
1156Arguments:\r
1157 PrivateData - Pointer to PEI_CORE_INSTANCE.\r
1158 SecCoreData - Pointer to EFI_SEC_PEI_HAND_OFF.\r
1159\r
1160Returns:\r
50cb16d9 1161 NONE\r
1162\r
1163--*/\r
b0d803fe 1164;\r
1165\r
1166EFI_STATUS\r
1167EFIAPI\r
1168FirmwareVolmeInfoPpiNotifyCallback (\r
1169 IN EFI_PEI_SERVICES **PeiServices,\r
1170 IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor,\r
1171 IN VOID *Ppi\r
1172 )\r
1173/*++\r
1174\r
1175Routine Description:\r
1176\r
1177 Process Firmware Volum Information once FvInfoPPI install.\r
1178\r
1179Arguments:\r
1180\r
1181 PeiServices - General purpose services available to every PEIM.\r
50cb16d9 1182\r
b0d803fe 1183Returns:\r
1184\r
1185 Status - EFI_SUCCESS if the interface could be successfully\r
1186 installed\r
1187\r
1188--*/\r
1189;\r
1190\r
1191\r
1192EFI_STATUS\r
50cb16d9 1193EFIAPI\r
b0d803fe 1194PeiFfsFindFileByName (\r
1195 IN CONST EFI_GUID *FileName,\r
1196 IN EFI_PEI_FV_HANDLE VolumeHandle,\r
1197 OUT EFI_PEI_FILE_HANDLE *FileHandle\r
1198 )\r
1199/*++\r
1200\r
1201Routine Description:\r
1202\r
1203 Given the input VolumeHandle, search for the next matching name file.\r
1204\r
1205Arguments:\r
1206\r
1207 FileName - File name to search.\r
1208 VolumeHandle - The current FV to search.\r
1209 FileHandle - Pointer to the file matching name in VolumeHandle.\r
1210 - NULL if file not found\r
1211Returns:\r
1212 EFI_STATUS\r
50cb16d9 1213\r
1214--*/\r
b0d803fe 1215;\r
1216\r
1217\r
1218EFI_STATUS\r
50cb16d9 1219EFIAPI\r
b0d803fe 1220PeiFfsGetFileInfo (\r
1221 IN EFI_PEI_FILE_HANDLE FileHandle,\r
1222 OUT EFI_FV_FILE_INFO *FileInfo\r
1223 )\r
1224/*++\r
1225\r
1226Routine Description:\r
1227\r
1228 Collect information of given file.\r
1229\r
1230Arguments:\r
1231 FileHandle - The handle to file.\r
1232 FileInfo - Pointer to the file information.\r
1233\r
1234Returns:\r
1235 EFI_STATUS\r
50cb16d9 1236\r
1237--*/\r
b0d803fe 1238;\r
1239\r
1240EFI_STATUS\r
50cb16d9 1241EFIAPI\r
b0d803fe 1242PeiFfsGetVolumeInfo (\r
1243 IN EFI_PEI_FV_HANDLE VolumeHandle,\r
1244 OUT EFI_FV_INFO *VolumeInfo\r
1245 )\r
1246/*++\r
1247\r
1248Routine Description:\r
1249\r
1250 Collect information of given Fv Volume.\r
1251\r
1252Arguments:\r
1253 VolumeHandle - The handle to Fv Volume.\r
1254 VolumeInfo - The pointer to volume information.\r
50cb16d9 1255\r
b0d803fe 1256Returns:\r
1257 EFI_STATUS\r
50cb16d9 1258\r
1259--*/\r
b0d803fe 1260;\r
1261\r
1262\r
1263EFI_STATUS\r
1264EFIAPI\r
1265PeiRegisterForShadow (\r
1266 IN EFI_PEI_FILE_HANDLE FileHandle\r
1267 )\r
1268/*++\r
1269\r
1270Routine Description:\r
1271\r
1272 This routine enable a PEIM to register itself to shadow when PEI Foundation\r
1273 discovery permanent memory.\r
1274\r
1275Arguments:\r
1276 FileHandle - File handle of a PEIM.\r
50cb16d9 1277\r
b0d803fe 1278Returns:\r
1279 EFI_NOT_FOUND - The file handle doesn't point to PEIM itself.\r
1280 EFI_ALREADY_STARTED - Indicate that the PEIM has been registered itself.\r
1281 EFI_SUCCESS - Successfully to register itself.\r
1282\r
50cb16d9 1283--*/\r
b0d803fe 1284;\r
1285\r
1286\r
14e8823a 1287/**\r
1288 This routine enable a PEIM to register itself to shadow when PEI Foundation\r
1289 discovery permanent memory.\r
1290\r
1291 @param FileHandle File handle of a PEIM.\r
50cb16d9 1292\r
14e8823a 1293 @retval EFI_NOT_FOUND The file handle doesn't point to PEIM itself.\r
1294 @retval EFI_ALREADY_STARTED Indicate that the PEIM has been registered itself.\r
1295 @retval EFI_SUCCESS Successfully to register itself.\r
1296\r
50cb16d9 1297**/\r
14e8823a 1298EFI_STATUS\r
1299EFIAPI\r
1300PeiRegisterForShadow (\r
1301 IN EFI_PEI_FILE_HANDLE FileHandle\r
1302 )\r
1303;\r
1304\r
b0d803fe 1305EFI_STATUS\r
1306PeiFindFileEx (\r
1307 IN CONST EFI_PEI_FV_HANDLE FvHandle,\r
1308 IN CONST EFI_GUID *FileName, OPTIONAL\r
1309 IN EFI_FV_FILETYPE SearchType,\r
1310 IN OUT EFI_PEI_FILE_HANDLE *FileHandle,\r
1311 IN OUT EFI_PEI_FV_HANDLE *AprioriFile OPTIONAL\r
1312 )\r
1313/*++\r
1314\r
1315Routine Description:\r
1316 Given the input file pointer, search for the next matching file in the\r
1317 FFS volume as defined by SearchType. The search starts from FileHeader inside\r
1318 the Firmware Volume defined by FwVolHeader.\r
1319\r
1320Arguments:\r
1321 PeiServices - Pointer to the PEI Core Services Table.\r
1322 SearchType - Filter to find only files of this type.\r
1323 Type EFI_FV_FILETYPE_ALL causes no filtering to be done.\r
1324 FwVolHeader - Pointer to the FV header of the volume to search.\r
1325 This parameter must point to a valid FFS volume.\r
1326 FileHeader - Pointer to the current file from which to begin searching.\r
1327 This pointer will be updated upon return to reflect the file found.\r
50cb16d9 1328 Flag - Indicator for if this is for PEI Dispath search\r
1329\r
b0d803fe 1330Returns:\r
1331 EFI_NOT_FOUND - No files matching the search criteria were found\r
1332 EFI_SUCCESS\r
1333\r
1334--*/\r
1335;\r
1336\r
1337VOID\r
1338InitializeImageServices (\r
1339 IN PEI_CORE_INSTANCE *PrivateData,\r
1340 IN PEI_CORE_INSTANCE *OldCoreData\r
1341 )\r
1342/*++\r
1343\r
1344Routine Description:\r
1345\r
c58cf83d 1346 Install Pei Load File PPI.\r
b0d803fe 1347\r
1348Arguments:\r
1349\r
1350 PrivateData - Pointer to PEI_CORE_INSTANCE.\r
1351 OldCoreData - Pointer to PEI_CORE_INSTANCE.\r
1352\r
1353Returns:\r
1354\r
1355 NONE.\r
50cb16d9 1356\r
1357--*/\r
b0d803fe 1358;\r
1359\r
288f9b38
LG
1360/**\r
1361 Get Fv image from the FV type file, then install FV INFO ppi, Build FV hob.\r
1362\r
1363 @param PeiServices Pointer to the PEI Core Services Table.\r
1364 @param FileHandle File handle of a Fv type file.\r
1365 @param AuthenticationState Pointer to attestation authentication state of image.\r
1366\r
50cb16d9 1367\r
288f9b38
LG
1368 @retval EFI_NOT_FOUND FV image can't be found.\r
1369 @retval EFI_SUCCESS Successfully to process it.\r
1370\r
1371**/\r
1372EFI_STATUS\r
1373ProcessFvFile (\r
1374 IN EFI_PEI_SERVICES **PeiServices,\r
1375 IN EFI_PEI_FILE_HANDLE FvFileHandle,\r
1376 OUT UINT32 *AuthenticationState\r
1377 );\r
1378\r
192f6d4c 1379#endif\r