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