]> git.proxmox.com Git - mirror_edk2.git/blame_incremental - MdeModulePkg/Core/Pei/PeiMain.h
MdeModulePkg PeiCore: Correct the comments of PeiResetSystem2
[mirror_edk2.git] / MdeModulePkg / Core / Pei / PeiMain.h
... / ...
CommitLineData
1/** @file\r
2 Definition of Pei Core Structures and Services\r
3 \r
4Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>\r
5This 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
13**/\r
14\r
15#ifndef _PEI_MAIN_H_\r
16#define _PEI_MAIN_H_\r
17\r
18#include <PiPei.h>\r
19#include <Ppi/DxeIpl.h>\r
20#include <Ppi/MemoryDiscovered.h>\r
21#include <Ppi/StatusCode.h>\r
22#include <Ppi/Reset.h>\r
23#include <Ppi/Reset2.h>\r
24#include <Ppi/FirmwareVolume.h>\r
25#include <Ppi/FirmwareVolumeInfo.h>\r
26#include <Ppi/FirmwareVolumeInfo2.h>\r
27#include <Ppi/Decompress.h>\r
28#include <Ppi/GuidedSectionExtraction.h>\r
29#include <Ppi/LoadFile.h>\r
30#include <Ppi/Security2.h>\r
31#include <Ppi/TemporaryRamSupport.h>\r
32#include <Ppi/TemporaryRamDone.h>\r
33#include <Library/DebugLib.h>\r
34#include <Library/PeiCoreEntryPoint.h>\r
35#include <Library/BaseLib.h>\r
36#include <Library/HobLib.h>\r
37#include <Library/PerformanceLib.h>\r
38#include <Library/PeiServicesLib.h>\r
39#include <Library/ReportStatusCodeLib.h>\r
40#include <Library/PeCoffLib.h>\r
41#include <Library/PeCoffGetEntryPointLib.h>\r
42#include <Library/BaseMemoryLib.h>\r
43#include <Library/CacheMaintenanceLib.h>\r
44#include <Library/PcdLib.h>\r
45#include <IndustryStandard/PeImage.h>\r
46#include <Library/PeiServicesTablePointerLib.h>\r
47#include <Library/MemoryAllocationLib.h>\r
48#include <Guid/FirmwareFileSystem2.h>\r
49#include <Guid/FirmwareFileSystem3.h>\r
50#include <Guid/AprioriFileName.h>\r
51\r
52///\r
53/// It is an FFS type extension used for PeiFindFileEx. It indicates current\r
54/// Ffs searching is for all PEIMs can be dispatched by PeiCore.\r
55///\r
56#define PEI_CORE_INTERNAL_FFS_FILE_DISPATCH_TYPE 0xff\r
57\r
58///\r
59/// Pei Core private data structures\r
60///\r
61typedef union {\r
62 EFI_PEI_PPI_DESCRIPTOR *Ppi;\r
63 EFI_PEI_NOTIFY_DESCRIPTOR *Notify;\r
64 VOID *Raw;\r
65} PEI_PPI_LIST_POINTERS;\r
66\r
67///\r
68/// PPI database structure which contains two link: PpiList and NotifyList. PpiList\r
69/// is in head of PpiListPtrs array and notify is in end of PpiListPtrs.\r
70///\r
71typedef struct {\r
72 ///\r
73 /// index of end of PpiList link list.\r
74 ///\r
75 INTN PpiListEnd;\r
76 ///\r
77 /// index of end of notify link list.\r
78 ///\r
79 INTN NotifyListEnd;\r
80 ///\r
81 /// index of the dispatched notify list.\r
82 ///\r
83 INTN DispatchListEnd;\r
84 ///\r
85 /// index of last installed Ppi description in PpiList link list.\r
86 ///\r
87 INTN LastDispatchedInstall;\r
88 ///\r
89 /// index of last dispatched notify in Notify link list.\r
90 /// \r
91 INTN LastDispatchedNotify;\r
92 ///\r
93 /// Ppi database has the PcdPeiCoreMaxPpiSupported number of entries.\r
94 ///\r
95 PEI_PPI_LIST_POINTERS *PpiListPtrs;\r
96} PEI_PPI_DATABASE;\r
97\r
98\r
99//\r
100// PEI_CORE_FV_HANDE.PeimState\r
101// Do not change these values as there is code doing math to change states.\r
102// Look for Private->Fv[FvCount].PeimState[PeimCount]++;\r
103//\r
104#define PEIM_STATE_NOT_DISPATCHED 0x00\r
105#define PEIM_STATE_DISPATCHED 0x01\r
106#define PEIM_STATE_REGISITER_FOR_SHADOW 0x02\r
107#define PEIM_STATE_DONE 0x03\r
108\r
109typedef struct {\r
110 EFI_FIRMWARE_VOLUME_HEADER *FvHeader;\r
111 EFI_PEI_FIRMWARE_VOLUME_PPI *FvPpi;\r
112 EFI_PEI_FV_HANDLE FvHandle;\r
113 //\r
114 // Ponter to the buffer with the PcdPeiCoreMaxPeimPerFv number of Entries.\r
115 //\r
116 UINT8 *PeimState;\r
117 //\r
118 // Ponter to the buffer with the PcdPeiCoreMaxPeimPerFv number of Entries.\r
119 //\r
120 EFI_PEI_FILE_HANDLE *FvFileHandles;\r
121 BOOLEAN ScanFv;\r
122 UINT32 AuthenticationStatus;\r
123} PEI_CORE_FV_HANDLE;\r
124\r
125typedef struct {\r
126 EFI_GUID FvFormat;\r
127 VOID *FvInfo;\r
128 UINT32 FvInfoSize;\r
129 UINT32 AuthenticationStatus;\r
130 EFI_PEI_NOTIFY_DESCRIPTOR NotifyDescriptor;\r
131} PEI_CORE_UNKNOW_FORMAT_FV_INFO;\r
132\r
133#define CACHE_SETION_MAX_NUMBER 0x10\r
134typedef struct {\r
135 EFI_COMMON_SECTION_HEADER* Section[CACHE_SETION_MAX_NUMBER];\r
136 VOID* SectionData[CACHE_SETION_MAX_NUMBER];\r
137 UINTN SectionSize[CACHE_SETION_MAX_NUMBER];\r
138 UINT32 AuthenticationStatus[CACHE_SETION_MAX_NUMBER];\r
139 UINTN AllSectionCount;\r
140 UINTN SectionIndex;\r
141} CACHE_SECTION_DATA;\r
142\r
143#define HOLE_MAX_NUMBER 0x3\r
144typedef struct {\r
145 EFI_PHYSICAL_ADDRESS Base;\r
146 UINTN Size;\r
147 UINTN Offset;\r
148 BOOLEAN OffsetPositive;\r
149} HOLE_MEMORY_DATA;\r
150\r
151///\r
152/// Forward declaration for PEI_CORE_INSTANCE\r
153///\r
154typedef struct _PEI_CORE_INSTANCE PEI_CORE_INSTANCE;\r
155\r
156\r
157/**\r
158 Function Pointer type for PeiCore function.\r
159 @param SecCoreData Points to a data structure containing SEC to PEI handoff data, such as the size \r
160 and location of temporary RAM, the stack location and the BFV location.\r
161 @param PpiList Points to a list of one or more PPI descriptors to be installed initially by the PEI core.\r
162 An empty PPI list consists of a single descriptor with the end-tag\r
163 EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST. As part of its initialization\r
164 phase, the PEI Foundation will add these SEC-hosted PPIs to its PPI database such\r
165 that both the PEI Foundation and any modules can leverage the associated service\r
166 calls and/or code in these early PPIs\r
167 @param OldCoreData Pointer to old core data that is used to initialize the\r
168 core's data areas.\r
169**/\r
170typedef\r
171EFI_STATUS\r
172(EFIAPI *PEICORE_FUNCTION_POINTER)(\r
173 IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData,\r
174 IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList,\r
175 IN PEI_CORE_INSTANCE *OldCoreData\r
176 );\r
177\r
178#define PEI_CORE_HANDLE_SIGNATURE SIGNATURE_32('P','e','i','C')\r
179\r
180///\r
181/// Pei Core private data structure instance\r
182///\r
183struct _PEI_CORE_INSTANCE {\r
184 UINTN Signature;\r
185 \r
186 ///\r
187 /// Point to ServiceTableShadow\r
188 ///\r
189 EFI_PEI_SERVICES *Ps;\r
190 PEI_PPI_DATABASE PpiData;\r
191 \r
192 ///\r
193 /// The count of FVs which contains FFS and could be dispatched by PeiCore.\r
194 ///\r
195 UINTN FvCount;\r
196 \r
197 ///\r
198 /// Pointer to the buffer with the PcdPeiCoreMaxFvSupported number of entries.\r
199 /// Each entry is for one FV which contains FFS and could be dispatched by PeiCore.\r
200 ///\r
201 PEI_CORE_FV_HANDLE *Fv;\r
202\r
203 ///\r
204 /// Pointer to the buffer with the PcdPeiCoreMaxFvSupported number of entries.\r
205 /// Each entry is for one FV which could not be dispatched by PeiCore.\r
206 ///\r
207 PEI_CORE_UNKNOW_FORMAT_FV_INFO *UnknownFvInfo;\r
208 UINTN UnknownFvInfoCount;\r
209 \r
210 ///\r
211 /// Pointer to the buffer with the PcdPeiCoreMaxPeimPerFv number of entries.\r
212 ///\r
213 EFI_PEI_FILE_HANDLE *CurrentFvFileHandles;\r
214 UINTN AprioriCount;\r
215 UINTN CurrentPeimFvCount;\r
216 UINTN CurrentPeimCount;\r
217 EFI_PEI_FILE_HANDLE CurrentFileHandle;\r
218 BOOLEAN PeimNeedingDispatch;\r
219 BOOLEAN PeimDispatchOnThisPass;\r
220 BOOLEAN PeimDispatcherReenter;\r
221 EFI_PEI_HOB_POINTERS HobList;\r
222 BOOLEAN SwitchStackSignal;\r
223 BOOLEAN PeiMemoryInstalled;\r
224 VOID *CpuIo;\r
225 EFI_PEI_SECURITY2_PPI *PrivateSecurityPpi;\r
226 EFI_PEI_SERVICES ServiceTableShadow;\r
227 EFI_PEI_PPI_DESCRIPTOR *XipLoadFile;\r
228 EFI_PHYSICAL_ADDRESS PhysicalMemoryBegin;\r
229 UINT64 PhysicalMemoryLength;\r
230 EFI_PHYSICAL_ADDRESS FreePhysicalMemoryTop;\r
231 UINTN HeapOffset;\r
232 BOOLEAN HeapOffsetPositive;\r
233 UINTN StackOffset;\r
234 BOOLEAN StackOffsetPositive;\r
235 PEICORE_FUNCTION_POINTER ShadowedPeiCore;\r
236 CACHE_SECTION_DATA CacheSection;\r
237 //\r
238 // For Loading modules at fixed address feature to cache the top address below which the \r
239 // Runtime code, boot time code and PEI memory will be placed. Please note that the offset between this field \r
240 // and Ps should not be changed since maybe user could get this top address by using the offet to Ps. \r
241 //\r
242 EFI_PHYSICAL_ADDRESS LoadModuleAtFixAddressTopAddress;\r
243 //\r
244 // The field is define for Loading modules at fixed address feature to tracker the PEI code\r
245 // memory range usage. It is a bit mapped array in which every bit indicates the correspoding memory page\r
246 // available or not. \r
247 //\r
248 UINT64 *PeiCodeMemoryRangeUsageBitMap;\r
249 //\r
250 // This field points to the shadowed image read function\r
251 //\r
252 PE_COFF_LOADER_READ_FILE ShadowedImageRead;\r
253\r
254 //\r
255 // Pointer to the temp buffer with the PcdPeiCoreMaxPeimPerFv + 1 number of entries.\r
256 //\r
257 EFI_PEI_FILE_HANDLE *FileHandles;\r
258 //\r
259 // Pointer to the temp buffer with the PcdPeiCoreMaxPeimPerFv number of entries.\r
260 //\r
261 EFI_GUID *FileGuid;\r
262\r
263 //\r
264 // Temp Memory Range is not covered by PeiTempMem and Stack.\r
265 // Those Memory Range will be migrated into phisical memory. \r
266 //\r
267 HOLE_MEMORY_DATA HoleData[HOLE_MAX_NUMBER];\r
268};\r
269\r
270///\r
271/// Pei Core Instance Data Macros\r
272///\r
273#define PEI_CORE_INSTANCE_FROM_PS_THIS(a) \\r
274 CR(a, PEI_CORE_INSTANCE, Ps, PEI_CORE_HANDLE_SIGNATURE)\r
275\r
276///\r
277/// Union of temporarily used function pointers (to save stack space)\r
278///\r
279typedef union {\r
280 PEICORE_FUNCTION_POINTER PeiCore;\r
281 EFI_PEIM_ENTRY_POINT2 PeimEntry;\r
282 EFI_PEIM_NOTIFY_ENTRY_POINT PeimNotifyEntry;\r
283 EFI_DXE_IPL_PPI *DxeIpl;\r
284 EFI_PEI_PPI_DESCRIPTOR *PpiDescriptor;\r
285 EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor;\r
286 VOID *Raw;\r
287} PEI_CORE_TEMP_POINTERS;\r
288\r
289typedef struct {\r
290 CONST EFI_SEC_PEI_HAND_OFF *SecCoreData;\r
291 EFI_PEI_PPI_DESCRIPTOR *PpiList;\r
292 VOID *Data;\r
293} PEI_CORE_PARAMETERS;\r
294\r
295//\r
296// PeiCore function\r
297//\r
298/**\r
299\r
300 The entry routine to Pei Core, invoked by PeiMain during transition\r
301 from SEC to PEI. After switching stack in the PEI core, it will restart\r
302 with the old core data.\r
303\r
304\r
305 @param SecCoreData Points to a data structure containing SEC to PEI handoff data, such as the size \r
306 and location of temporary RAM, the stack location and the BFV location.\r
307 @param PpiList Points to a list of one or more PPI descriptors to be installed initially by the PEI core.\r
308 An empty PPI list consists of a single descriptor with the end-tag\r
309 EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST. As part of its initialization\r
310 phase, the PEI Foundation will add these SEC-hosted PPIs to its PPI database such\r
311 that both the PEI Foundation and any modules can leverage the associated service\r
312 calls and/or code in these early PPIs\r
313 @param Data Pointer to old core data that is used to initialize the\r
314 core's data areas.\r
315\r
316**/\r
317VOID\r
318EFIAPI\r
319PeiCore (\r
320 IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData,\r
321 IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList,\r
322 IN VOID *Data\r
323 );\r
324\r
325//\r
326// Dispatcher support functions\r
327//\r
328\r
329/**\r
330\r
331 This is the POSTFIX version of the dependency evaluator. When a\r
332 PUSH [PPI GUID] is encountered, a pointer to the GUID is stored on\r
333 the evaluation stack. When that entry is poped from the evaluation\r
334 stack, the PPI is checked if it is installed. This method allows\r
335 some time savings as not all PPIs must be checked for certain\r
336 operation types (AND, OR).\r
337\r
338\r
339 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
340 @param DependencyExpression Pointer to a dependency expression. The Grammar adheres to\r
341 the BNF described above and is stored in postfix notation.\r
342\r
343 @retval TRUE if it is a well-formed Grammar\r
344 @retval FALSE if the dependency expression overflows the evaluation stack\r
345 if the dependency expression underflows the evaluation stack\r
346 if the dependency expression is not a well-formed Grammar.\r
347\r
348**/\r
349BOOLEAN\r
350PeimDispatchReadiness (\r
351 IN EFI_PEI_SERVICES **PeiServices,\r
352 IN VOID *DependencyExpression\r
353 );\r
354\r
355/**\r
356 Conduct PEIM dispatch.\r
357\r
358 @param SecCoreData Pointer to the data structure containing SEC to PEI handoff data\r
359 @param PrivateData Pointer to the private data passed in from caller\r
360\r
361**/\r
362VOID\r
363PeiDispatcher (\r
364 IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData,\r
365 IN PEI_CORE_INSTANCE *PrivateData\r
366 );\r
367\r
368/**\r
369 Initialize the Dispatcher's data members\r
370\r
371 @param PrivateData PeiCore's private data structure\r
372 @param OldCoreData Old data from SecCore\r
373 NULL if being run in non-permament memory mode.\r
374 @param SecCoreData Points to a data structure containing SEC to PEI handoff data, such as the size\r
375 and location of temporary RAM, the stack location and the BFV location.\r
376\r
377**/\r
378VOID\r
379InitializeDispatcherData (\r
380 IN PEI_CORE_INSTANCE *PrivateData,\r
381 IN PEI_CORE_INSTANCE *OldCoreData,\r
382 IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData\r
383 );\r
384\r
385/**\r
386 This routine parses the Dependency Expression, if available, and\r
387 decides if the module can be executed.\r
388\r
389\r
390 @param Private PeiCore's private data structure\r
391 @param FileHandle PEIM's file handle\r
392 @param PeimCount The index of last dispatched PEIM.\r
393\r
394 @retval TRUE Can be dispatched\r
395 @retval FALSE Cannot be dispatched\r
396\r
397**/\r
398BOOLEAN\r
399DepexSatisfied (\r
400 IN PEI_CORE_INSTANCE *Private,\r
401 IN EFI_PEI_FILE_HANDLE FileHandle,\r
402 IN UINTN PeimCount\r
403 );\r
404\r
405//\r
406// PPI support functions\r
407//\r
408/**\r
409\r
410 Initialize PPI services.\r
411\r
412 @param PrivateData Pointer to the PEI Core data.\r
413 @param OldCoreData Pointer to old PEI Core data. \r
414 NULL if being run in non-permament memory mode.\r
415\r
416**/\r
417VOID\r
418InitializePpiServices (\r
419 IN PEI_CORE_INSTANCE *PrivateData,\r
420 IN PEI_CORE_INSTANCE *OldCoreData\r
421 );\r
422\r
423/**\r
424\r
425 Migrate the Hob list from the temporary memory stack to PEI installed memory.\r
426\r
427 @param SecCoreData Points to a data structure containing SEC to PEI handoff data, such as the size \r
428 and location of temporary RAM, the stack location and the BFV location.\r
429 @param PrivateData Pointer to PeiCore's private data structure.\r
430\r
431**/\r
432VOID\r
433ConvertPpiPointers (\r
434 IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData,\r
435 IN PEI_CORE_INSTANCE *PrivateData\r
436 );\r
437\r
438/**\r
439\r
440 Install PPI services. It is implementation of EFI_PEI_SERVICE.InstallPpi.\r
441\r
442 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
443 @param PpiList Pointer to ppi array that want to be installed.\r
444\r
445 @retval EFI_SUCCESS if all PPIs in PpiList are successfully installed.\r
446 @retval EFI_INVALID_PARAMETER if PpiList is NULL pointer\r
447 if any PPI in PpiList is not valid\r
448 @retval EFI_OUT_OF_RESOURCES if there is no more memory resource to install PPI\r
449\r
450**/\r
451EFI_STATUS\r
452EFIAPI\r
453PeiInstallPpi (\r
454 IN CONST EFI_PEI_SERVICES **PeiServices,\r
455 IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList\r
456 );\r
457\r
458/**\r
459\r
460 Re-Install PPI services.\r
461\r
462 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
463 @param OldPpi Pointer to the old PEI PPI Descriptors.\r
464 @param NewPpi Pointer to the new PEI PPI Descriptors.\r
465\r
466 @retval EFI_SUCCESS if the operation was successful\r
467 @retval EFI_INVALID_PARAMETER if OldPpi or NewPpi is NULL\r
468 if NewPpi is not valid\r
469 @retval EFI_NOT_FOUND if the PPI was not in the database\r
470\r
471**/\r
472EFI_STATUS\r
473EFIAPI\r
474PeiReInstallPpi (\r
475 IN CONST EFI_PEI_SERVICES **PeiServices,\r
476 IN CONST EFI_PEI_PPI_DESCRIPTOR *OldPpi,\r
477 IN CONST EFI_PEI_PPI_DESCRIPTOR *NewPpi\r
478 );\r
479\r
480/**\r
481\r
482 Locate a given named PPI.\r
483\r
484\r
485 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
486 @param Guid Pointer to GUID of the PPI.\r
487 @param Instance Instance Number to discover.\r
488 @param PpiDescriptor Pointer to reference the found descriptor. If not NULL,\r
489 returns a pointer to the descriptor (includes flags, etc)\r
490 @param Ppi Pointer to reference the found PPI\r
491\r
492 @retval EFI_SUCCESS if the PPI is in the database\r
493 @retval EFI_NOT_FOUND if the PPI is not in the database\r
494\r
495**/\r
496EFI_STATUS\r
497EFIAPI\r
498PeiLocatePpi (\r
499 IN CONST EFI_PEI_SERVICES **PeiServices,\r
500 IN CONST EFI_GUID *Guid,\r
501 IN UINTN Instance,\r
502 IN OUT EFI_PEI_PPI_DESCRIPTOR **PpiDescriptor,\r
503 IN OUT VOID **Ppi\r
504 );\r
505\r
506/**\r
507\r
508 Install a notification for a given PPI.\r
509\r
510\r
511 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
512 @param NotifyList Pointer to list of Descriptors to notify upon.\r
513\r
514 @retval EFI_SUCCESS if successful\r
515 @retval EFI_OUT_OF_RESOURCES if no space in the database\r
516 @retval EFI_INVALID_PARAMETER if not a good decriptor\r
517\r
518**/\r
519EFI_STATUS\r
520EFIAPI\r
521PeiNotifyPpi (\r
522 IN CONST EFI_PEI_SERVICES **PeiServices,\r
523 IN CONST EFI_PEI_NOTIFY_DESCRIPTOR *NotifyList\r
524 );\r
525\r
526/**\r
527\r
528 Process the Notify List at dispatch level.\r
529\r
530 @param PrivateData PeiCore's private data structure.\r
531\r
532**/\r
533VOID\r
534ProcessNotifyList (\r
535 IN PEI_CORE_INSTANCE *PrivateData\r
536 );\r
537\r
538/**\r
539\r
540 Dispatch notifications.\r
541\r
542 @param PrivateData PeiCore's private data structure\r
543 @param NotifyType Type of notify to fire.\r
544 @param InstallStartIndex Install Beginning index.\r
545 @param InstallStopIndex Install Ending index.\r
546 @param NotifyStartIndex Notify Beginning index.\r
547 @param NotifyStopIndex Notify Ending index.\r
548\r
549**/\r
550VOID\r
551DispatchNotify (\r
552 IN PEI_CORE_INSTANCE *PrivateData,\r
553 IN UINTN NotifyType,\r
554 IN INTN InstallStartIndex,\r
555 IN INTN InstallStopIndex,\r
556 IN INTN NotifyStartIndex,\r
557 IN INTN NotifyStopIndex\r
558 );\r
559\r
560//\r
561// Boot mode support functions\r
562//\r
563/**\r
564 This service enables PEIMs to ascertain the present value of the boot mode.\r
565\r
566 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
567 @param BootMode A pointer to contain the value of the boot mode.\r
568\r
569 @retval EFI_SUCCESS The boot mode was returned successfully.\r
570 @retval EFI_INVALID_PARAMETER BootMode is NULL.\r
571\r
572**/\r
573EFI_STATUS\r
574EFIAPI\r
575PeiGetBootMode (\r
576 IN CONST EFI_PEI_SERVICES **PeiServices,\r
577 IN OUT EFI_BOOT_MODE *BootMode\r
578 );\r
579\r
580/**\r
581 This service enables PEIMs to update the boot mode variable.\r
582\r
583\r
584 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
585 @param BootMode The value of the boot mode to set.\r
586\r
587 @return EFI_SUCCESS The value was successfully updated\r
588\r
589**/\r
590EFI_STATUS\r
591EFIAPI\r
592PeiSetBootMode (\r
593 IN CONST EFI_PEI_SERVICES **PeiServices,\r
594 IN EFI_BOOT_MODE BootMode\r
595 );\r
596\r
597//\r
598// Security support functions\r
599//\r
600/**\r
601\r
602 Initialize the security services.\r
603\r
604 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
605 @param OldCoreData Pointer to the old core data.\r
606 NULL if being run in non-permament memory mode.\r
607\r
608**/\r
609VOID\r
610InitializeSecurityServices (\r
611 IN EFI_PEI_SERVICES **PeiServices,\r
612 IN PEI_CORE_INSTANCE *OldCoreData\r
613 );\r
614\r
615/**\r
616 Verify a Firmware volume.\r
617\r
618 @param CurrentFvAddress Pointer to the current Firmware Volume under consideration\r
619\r
620 @retval EFI_SUCCESS Firmware Volume is legal\r
621 @retval EFI_SECURITY_VIOLATION Firmware Volume fails integrity test\r
622\r
623**/\r
624EFI_STATUS\r
625VerifyFv (\r
626 IN EFI_FIRMWARE_VOLUME_HEADER *CurrentFvAddress\r
627 );\r
628\r
629/**\r
630 Provide a callout to the security verification service.\r
631\r
632 @param PrivateData PeiCore's private data structure\r
633 @param VolumeHandle Handle of FV\r
634 @param FileHandle Handle of PEIM's ffs\r
635 @param AuthenticationStatus Authentication status\r
636\r
637 @retval EFI_SUCCESS Image is OK\r
638 @retval EFI_SECURITY_VIOLATION Image is illegal\r
639 @retval EFI_NOT_FOUND If security PPI is not installed.\r
640**/\r
641EFI_STATUS\r
642VerifyPeim (\r
643 IN PEI_CORE_INSTANCE *PrivateData,\r
644 IN EFI_PEI_FV_HANDLE VolumeHandle,\r
645 IN EFI_PEI_FILE_HANDLE FileHandle,\r
646 IN UINT32 AuthenticationStatus\r
647 );\r
648\r
649/**\r
650\r
651 Gets the pointer to the HOB List.\r
652\r
653\r
654 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
655 @param HobList Pointer to the HOB List.\r
656\r
657 @retval EFI_SUCCESS Get the pointer of HOB List\r
658 @retval EFI_NOT_AVAILABLE_YET the HOB List is not yet published\r
659 @retval EFI_INVALID_PARAMETER HobList is NULL (in debug mode)\r
660\r
661**/\r
662EFI_STATUS\r
663EFIAPI\r
664PeiGetHobList (\r
665 IN CONST EFI_PEI_SERVICES **PeiServices,\r
666 IN OUT VOID **HobList\r
667 );\r
668\r
669/**\r
670 Add a new HOB to the HOB List.\r
671\r
672 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
673 @param Type Type of the new HOB.\r
674 @param Length Length of the new HOB to allocate.\r
675 @param Hob Pointer to the new HOB.\r
676\r
677 @return EFI_SUCCESS Success to create hob.\r
678 @retval EFI_INVALID_PARAMETER if Hob is NULL\r
679 @retval EFI_NOT_AVAILABLE_YET if HobList is still not available.\r
680 @retval EFI_OUT_OF_RESOURCES if there is no more memory to grow the Hoblist.\r
681\r
682**/\r
683EFI_STATUS\r
684EFIAPI\r
685PeiCreateHob (\r
686 IN CONST EFI_PEI_SERVICES **PeiServices,\r
687 IN UINT16 Type,\r
688 IN UINT16 Length,\r
689 IN OUT VOID **Hob\r
690 );\r
691\r
692/**\r
693\r
694 Builds a Handoff Information Table HOB\r
695\r
696 @param BootMode - Current Bootmode\r
697 @param MemoryBegin - Start Memory Address.\r
698 @param MemoryLength - Length of Memory.\r
699\r
700 @return EFI_SUCCESS Always success to initialize HOB.\r
701\r
702**/\r
703EFI_STATUS\r
704PeiCoreBuildHobHandoffInfoTable (\r
705 IN EFI_BOOT_MODE BootMode,\r
706 IN EFI_PHYSICAL_ADDRESS MemoryBegin,\r
707 IN UINT64 MemoryLength\r
708 );\r
709\r
710\r
711//\r
712// FFS Fw Volume support functions\r
713//\r
714/**\r
715 Searches for the next matching file in the firmware volume.\r
716\r
717 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
718 @param SearchType Filter to find only files of this type.\r
719 Type EFI_FV_FILETYPE_ALL causes no filtering to be done.\r
720 @param FvHandle Handle of firmware volume in which to search.\r
721 @param FileHandle On entry, points to the current handle from which to begin searching or NULL to start\r
722 at the beginning of the firmware volume. On exit, points the file handle of the next file\r
723 in the volume or NULL if there are no more files.\r
724\r
725 @retval EFI_NOT_FOUND The file was not found.\r
726 @retval EFI_NOT_FOUND The header checksum was not zero.\r
727 @retval EFI_SUCCESS The file was found.\r
728\r
729**/\r
730EFI_STATUS\r
731EFIAPI\r
732PeiFfsFindNextFile (\r
733 IN CONST EFI_PEI_SERVICES **PeiServices,\r
734 IN UINT8 SearchType,\r
735 IN EFI_PEI_FV_HANDLE FvHandle,\r
736 IN OUT EFI_PEI_FILE_HANDLE *FileHandle\r
737 );\r
738\r
739/**\r
740 Searches for the next matching section within the specified file.\r
741\r
742 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation\r
743 @param SectionType Filter to find only sections of this type.\r
744 @param FileHandle Pointer to the current file to search.\r
745 @param SectionData A pointer to the discovered section, if successful.\r
746 NULL if section not found\r
747\r
748 @retval EFI_NOT_FOUND The section was not found.\r
749 @retval EFI_SUCCESS The section was found.\r
750\r
751**/\r
752EFI_STATUS\r
753EFIAPI\r
754PeiFfsFindSectionData (\r
755 IN CONST EFI_PEI_SERVICES **PeiServices,\r
756 IN EFI_SECTION_TYPE SectionType,\r
757 IN EFI_PEI_FILE_HANDLE FileHandle,\r
758 OUT VOID **SectionData\r
759 );\r
760\r
761/**\r
762 Searches for the next matching section within the specified file.\r
763\r
764 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
765 @param SectionType The value of the section type to find.\r
766 @param SectionInstance Section instance to find.\r
767 @param FileHandle Handle of the firmware file to search.\r
768 @param SectionData A pointer to the discovered section, if successful.\r
769 @param AuthenticationStatus A pointer to the authentication status for this section.\r
770\r
771 @retval EFI_SUCCESS The section was found.\r
772 @retval EFI_NOT_FOUND The section was not found.\r
773\r
774**/\r
775EFI_STATUS\r
776EFIAPI\r
777PeiFfsFindSectionData3 (\r
778 IN CONST EFI_PEI_SERVICES **PeiServices,\r
779 IN EFI_SECTION_TYPE SectionType,\r
780 IN UINTN SectionInstance,\r
781 IN EFI_PEI_FILE_HANDLE FileHandle,\r
782 OUT VOID **SectionData,\r
783 OUT UINT32 *AuthenticationStatus\r
784 );\r
785\r
786/**\r
787 Search the firmware volumes by index\r
788\r
789 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation\r
790 @param Instance This instance of the firmware volume to find. The value 0 is the Boot Firmware\r
791 Volume (BFV).\r
792 @param VolumeHandle On exit, points to the next volume handle or NULL if it does not exist.\r
793\r
794 @retval EFI_INVALID_PARAMETER VolumeHandle is NULL\r
795 @retval EFI_NOT_FOUND The volume was not found.\r
796 @retval EFI_SUCCESS The volume was found.\r
797\r
798**/\r
799EFI_STATUS\r
800EFIAPI\r
801PeiFfsFindNextVolume (\r
802 IN CONST EFI_PEI_SERVICES **PeiServices,\r
803 IN UINTN Instance,\r
804 IN OUT EFI_PEI_FV_HANDLE *VolumeHandle\r
805 );\r
806\r
807//\r
808// Memory support functions\r
809//\r
810/**\r
811\r
812 Initialize the memory services.\r
813\r
814 @param PrivateData PeiCore's private data structure\r
815 @param SecCoreData Points to a data structure containing SEC to PEI handoff data, such as the size \r
816 and location of temporary RAM, the stack location and the BFV location.\r
817 @param OldCoreData Pointer to the PEI Core data.\r
818 NULL if being run in non-permament memory mode.\r
819\r
820**/\r
821VOID\r
822InitializeMemoryServices (\r
823 IN PEI_CORE_INSTANCE *PrivateData,\r
824 IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData,\r
825 IN PEI_CORE_INSTANCE *OldCoreData\r
826 );\r
827\r
828/**\r
829\r
830 Install the permanent memory is now available.\r
831 Creates HOB (PHIT and Stack).\r
832\r
833 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
834 @param MemoryBegin Start of memory address.\r
835 @param MemoryLength Length of memory.\r
836\r
837 @return EFI_SUCCESS Always success.\r
838\r
839**/\r
840EFI_STATUS\r
841EFIAPI\r
842PeiInstallPeiMemory (\r
843 IN CONST EFI_PEI_SERVICES **PeiServices,\r
844 IN EFI_PHYSICAL_ADDRESS MemoryBegin,\r
845 IN UINT64 MemoryLength\r
846 );\r
847\r
848/**\r
849\r
850 Memory allocation service on permanent memory,\r
851 not usable prior to the memory installation.\r
852\r
853\r
854 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
855 @param MemoryType Type of memory to allocate.\r
856 @param Pages Number of pages to allocate.\r
857 @param Memory Pointer of memory allocated.\r
858\r
859 @retval EFI_SUCCESS The allocation was successful\r
860 @retval EFI_INVALID_PARAMETER Only AllocateAnyAddress is supported.\r
861 @retval EFI_NOT_AVAILABLE_YET Called with permanent memory not available\r
862 @retval EFI_OUT_OF_RESOURCES There is not enough HOB heap to satisfy the requirement\r
863 to allocate the number of pages.\r
864\r
865**/\r
866EFI_STATUS\r
867EFIAPI\r
868PeiAllocatePages (\r
869 IN CONST EFI_PEI_SERVICES **PeiServices,\r
870 IN EFI_MEMORY_TYPE MemoryType,\r
871 IN UINTN Pages,\r
872 OUT EFI_PHYSICAL_ADDRESS *Memory\r
873 );\r
874\r
875/**\r
876\r
877 Memory allocation service on the temporary memory.\r
878\r
879\r
880 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
881 @param Size Amount of memory required\r
882 @param Buffer Address of pointer to the buffer\r
883\r
884 @retval EFI_SUCCESS The allocation was successful\r
885 @retval EFI_OUT_OF_RESOURCES There is not enough heap to satisfy the requirement\r
886 to allocate the requested size.\r
887\r
888**/\r
889EFI_STATUS\r
890EFIAPI\r
891PeiAllocatePool (\r
892 IN CONST EFI_PEI_SERVICES **PeiServices,\r
893 IN UINTN Size,\r
894 OUT VOID **Buffer\r
895 );\r
896\r
897/**\r
898\r
899 Routine for load image file.\r
900\r
901\r
902 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
903 @param FileHandle Pointer to the FFS file header of the image.\r
904 @param PeimState The dispatch state of the input PEIM handle.\r
905 @param EntryPoint Pointer to entry point of specified image file for output.\r
906 @param AuthenticationState Pointer to attestation authentication state of image.\r
907\r
908 @retval EFI_SUCCESS Image is successfully loaded.\r
909 @retval EFI_NOT_FOUND Fail to locate necessary PPI\r
910 @retval Others Fail to load file.\r
911\r
912**/\r
913EFI_STATUS\r
914PeiLoadImage (\r
915 IN CONST EFI_PEI_SERVICES **PeiServices,\r
916 IN EFI_PEI_FILE_HANDLE FileHandle,\r
917 IN UINT8 PeimState,\r
918 OUT EFI_PHYSICAL_ADDRESS *EntryPoint,\r
919 OUT UINT32 *AuthenticationState\r
920 );\r
921\r
922/**\r
923\r
924 Core version of the Status Code reporter\r
925\r
926\r
927 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
928 @param CodeType Type of Status Code.\r
929 @param Value Value to output for Status Code.\r
930 @param Instance Instance Number of this status code.\r
931 @param CallerId ID of the caller of this status code.\r
932 @param Data Optional data associated with this status code.\r
933\r
934 @retval EFI_SUCCESS if status code is successfully reported\r
935 @retval EFI_NOT_AVAILABLE_YET if StatusCodePpi has not been installed\r
936\r
937**/\r
938EFI_STATUS\r
939EFIAPI\r
940PeiReportStatusCode (\r
941 IN CONST EFI_PEI_SERVICES **PeiServices,\r
942 IN EFI_STATUS_CODE_TYPE CodeType,\r
943 IN EFI_STATUS_CODE_VALUE Value,\r
944 IN UINT32 Instance,\r
945 IN CONST EFI_GUID *CallerId,\r
946 IN CONST EFI_STATUS_CODE_DATA *Data OPTIONAL\r
947 );\r
948\r
949/**\r
950\r
951 Core version of the Reset System\r
952\r
953\r
954 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
955\r
956 @retval EFI_NOT_AVAILABLE_YET PPI not available yet.\r
957 @retval EFI_DEVICE_ERROR Did not reset system.\r
958 Otherwise, resets the system.\r
959\r
960**/\r
961EFI_STATUS\r
962EFIAPI\r
963PeiResetSystem (\r
964 IN CONST EFI_PEI_SERVICES **PeiServices\r
965 );\r
966\r
967/**\r
968 Resets the entire platform.\r
969\r
970 @param[in] ResetType The type of reset to perform.\r
971 @param[in] ResetStatus The status code for the reset.\r
972 @param[in] DataSize The size, in bytes, of ResetData.\r
973 @param[in] ResetData For a ResetType of EfiResetCold, EfiResetWarm, or EfiResetShutdown\r
974 the data buffer starts with a Null-terminated string, optionally\r
975 followed by additional binary data. The string is a description\r
976 that the caller may use to further indicate the reason for the\r
977 system reset. ResetData is only valid if ResetStatus is something\r
978 other than EFI_SUCCESS unless the ResetType is EfiResetPlatformSpecific\r
979 where a minimum amount of ResetData is always required.\r
980\r
981**/\r
982VOID\r
983EFIAPI\r
984PeiResetSystem2 (\r
985 IN EFI_RESET_TYPE ResetType,\r
986 IN EFI_STATUS ResetStatus,\r
987 IN UINTN DataSize,\r
988 IN VOID *ResetData OPTIONAL\r
989 );\r
990\r
991/**\r
992\r
993 Initialize PeiCore Fv List.\r
994\r
995\r
996 @param PrivateData - Pointer to PEI_CORE_INSTANCE.\r
997 @param SecCoreData - Pointer to EFI_SEC_PEI_HAND_OFF.\r
998\r
999**/\r
1000VOID\r
1001PeiInitializeFv (\r
1002 IN PEI_CORE_INSTANCE *PrivateData,\r
1003 IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData\r
1004 );\r
1005\r
1006/**\r
1007 Process Firmware Volum Information once FvInfoPPI install.\r
1008\r
1009 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
1010 @param NotifyDescriptor Address of the notification descriptor data structure.\r
1011 @param Ppi Address of the PPI that was installed.\r
1012\r
1013 @retval EFI_SUCCESS if the interface could be successfully installed\r
1014\r
1015**/\r
1016EFI_STATUS\r
1017EFIAPI\r
1018FirmwareVolmeInfoPpiNotifyCallback (\r
1019 IN EFI_PEI_SERVICES **PeiServices,\r
1020 IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor,\r
1021 IN VOID *Ppi\r
1022 );\r
1023\r
1024/**\r
1025\r
1026 Given the input VolumeHandle, search for the next matching name file.\r
1027\r
1028 @param FileName File name to search.\r
1029 @param VolumeHandle The current FV to search.\r
1030 @param FileHandle Pointer to the file matching name in VolumeHandle.\r
1031 NULL if file not found\r
1032\r
1033 @retval EFI_NOT_FOUND No files matching the search criteria were found\r
1034 @retval EFI_SUCCESS Success to search given file\r
1035\r
1036**/\r
1037EFI_STATUS\r
1038EFIAPI\r
1039PeiFfsFindFileByName (\r
1040 IN CONST EFI_GUID *FileName,\r
1041 IN EFI_PEI_FV_HANDLE VolumeHandle,\r
1042 OUT EFI_PEI_FILE_HANDLE *FileHandle\r
1043 );\r
1044\r
1045/**\r
1046 Returns information about a specific file.\r
1047\r
1048 @param FileHandle Handle of the file.\r
1049 @param FileInfo Upon exit, points to the file's information.\r
1050\r
1051 @retval EFI_INVALID_PARAMETER If FileInfo is NULL.\r
1052 @retval EFI_INVALID_PARAMETER If FileHandle does not represent a valid file.\r
1053 @retval EFI_SUCCESS File information returned.\r
1054\r
1055**/\r
1056EFI_STATUS\r
1057EFIAPI\r
1058PeiFfsGetFileInfo (\r
1059 IN EFI_PEI_FILE_HANDLE FileHandle,\r
1060 OUT EFI_FV_FILE_INFO *FileInfo\r
1061 );\r
1062\r
1063/**\r
1064 Returns information about a specific file.\r
1065\r
1066 @param FileHandle Handle of the file.\r
1067 @param FileInfo Upon exit, points to the file's information.\r
1068\r
1069 @retval EFI_INVALID_PARAMETER If FileInfo is NULL.\r
1070 @retval EFI_INVALID_PARAMETER If FileHandle does not represent a valid file.\r
1071 @retval EFI_SUCCESS File information returned.\r
1072\r
1073**/\r
1074EFI_STATUS\r
1075EFIAPI \r
1076PeiFfsGetFileInfo2 (\r
1077 IN EFI_PEI_FILE_HANDLE FileHandle,\r
1078 OUT EFI_FV_FILE_INFO2 *FileInfo\r
1079 );\r
1080\r
1081/**\r
1082 Returns information about the specified volume.\r
1083\r
1084 @param VolumeHandle Handle of the volume.\r
1085 @param VolumeInfo Upon exit, points to the volume's information.\r
1086\r
1087 @retval EFI_INVALID_PARAMETER If VolumeHandle does not represent a valid volume.\r
1088 @retval EFI_INVALID_PARAMETER If VolumeInfo is NULL.\r
1089 @retval EFI_SUCCESS Volume information returned.\r
1090**/\r
1091EFI_STATUS\r
1092EFIAPI\r
1093PeiFfsGetVolumeInfo (\r
1094 IN EFI_PEI_FV_HANDLE VolumeHandle,\r
1095 OUT EFI_FV_INFO *VolumeInfo\r
1096 );\r
1097\r
1098/**\r
1099 This routine enable a PEIM to register itself to shadow when PEI Foundation\r
1100 discovery permanent memory.\r
1101\r
1102 @param FileHandle File handle of a PEIM.\r
1103\r
1104 @retval EFI_NOT_FOUND The file handle doesn't point to PEIM itself.\r
1105 @retval EFI_ALREADY_STARTED Indicate that the PEIM has been registered itself.\r
1106 @retval EFI_SUCCESS Successfully to register itself.\r
1107\r
1108**/\r
1109EFI_STATUS\r
1110EFIAPI\r
1111PeiRegisterForShadow (\r
1112 IN EFI_PEI_FILE_HANDLE FileHandle\r
1113 );\r
1114\r
1115/**\r
1116 Initialize image service that install PeiLoadFilePpi.\r
1117\r
1118 @param PrivateData Pointer to PeiCore's private data structure PEI_CORE_INSTANCE.\r
1119 @param OldCoreData Pointer to Old PeiCore's private data.\r
1120 If NULL, PeiCore is entered at first time, stack/heap in temporary memory.\r
1121 If not NULL, PeiCore is entered at second time, stack/heap has been moved\r
1122 to permanent memory.\r
1123\r
1124**/\r
1125VOID\r
1126InitializeImageServices (\r
1127 IN PEI_CORE_INSTANCE *PrivateData,\r
1128 IN PEI_CORE_INSTANCE *OldCoreData\r
1129 );\r
1130\r
1131/**\r
1132 The wrapper function of PeiLoadImageLoadImage().\r
1133\r
1134 @param This Pointer to EFI_PEI_LOAD_FILE_PPI.\r
1135 @param FileHandle Pointer to the FFS file header of the image.\r
1136 @param ImageAddressArg Pointer to PE/TE image.\r
1137 @param ImageSizeArg Size of PE/TE image.\r
1138 @param EntryPoint Pointer to entry point of specified image file for output.\r
1139 @param AuthenticationState Pointer to attestation authentication state of image.\r
1140\r
1141 @return Status of PeiLoadImageLoadImage().\r
1142\r
1143**/\r
1144EFI_STATUS\r
1145EFIAPI\r
1146PeiLoadImageLoadImageWrapper (\r
1147 IN CONST EFI_PEI_LOAD_FILE_PPI *This,\r
1148 IN EFI_PEI_FILE_HANDLE FileHandle,\r
1149 OUT EFI_PHYSICAL_ADDRESS *ImageAddressArg, OPTIONAL\r
1150 OUT UINT64 *ImageSizeArg, OPTIONAL\r
1151 OUT EFI_PHYSICAL_ADDRESS *EntryPoint,\r
1152 OUT UINT32 *AuthenticationState\r
1153 );\r
1154\r
1155/**\r
1156\r
1157 Provide a callback for when the security PPI is installed.\r
1158\r
1159 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
1160 @param NotifyDescriptor The descriptor for the notification event.\r
1161 @param Ppi Pointer to the PPI in question.\r
1162\r
1163 @return Always success\r
1164\r
1165**/\r
1166EFI_STATUS\r
1167EFIAPI\r
1168SecurityPpiNotifyCallback (\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
1175 Get Fv image from the FV type file, then install FV INFO(2) ppi, Build FV hob.\r
1176\r
1177 @param PrivateData PeiCore's private data structure\r
1178 @param ParentFvCoreHandle Pointer of EFI_CORE_FV_HANDLE to parent Fv image that contain this Fv image.\r
1179 @param ParentFvFileHandle File handle of a Fv type file that contain this Fv image.\r
1180\r
1181 @retval EFI_NOT_FOUND FV image can't be found.\r
1182 @retval EFI_SUCCESS Successfully to process it.\r
1183 @retval EFI_OUT_OF_RESOURCES Can not allocate page when aligning FV image\r
1184 @retval EFI_SECURITY_VIOLATION Image is illegal\r
1185 @retval Others Can not find EFI_SECTION_FIRMWARE_VOLUME_IMAGE section\r
1186 \r
1187**/\r
1188EFI_STATUS\r
1189ProcessFvFile (\r
1190 IN PEI_CORE_INSTANCE *PrivateData,\r
1191 IN PEI_CORE_FV_HANDLE *ParentFvCoreHandle,\r
1192 IN EFI_PEI_FILE_HANDLE ParentFvFileHandle\r
1193 );\r
1194 \r
1195/**\r
1196 Get instance of PEI_CORE_FV_HANDLE for next volume according to given index.\r
1197 \r
1198 This routine also will install FvInfo ppi for FV hob in PI ways.\r
1199 \r
1200 @param Private Pointer of PEI_CORE_INSTANCE\r
1201 @param Instance The index of FV want to be searched.\r
1202 \r
1203 @return Instance of PEI_CORE_FV_HANDLE.\r
1204**/\r
1205PEI_CORE_FV_HANDLE *\r
1206FindNextCoreFvHandle (\r
1207 IN PEI_CORE_INSTANCE *Private,\r
1208 IN UINTN Instance\r
1209 );\r
1210 \r
1211//\r
1212// Default EFI_PEI_CPU_IO_PPI support for EFI_PEI_SERVICES table when PeiCore initialization.\r
1213// \r
1214\r
1215/**\r
1216 Memory-based read services.\r
1217 \r
1218 This function is to perform the Memory Access Read service based on installed \r
1219 instance of the EFI_PEI_CPU_IO_PPI. \r
1220 If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then \r
1221 return EFI_NOT_YET_AVAILABLE. \r
1222 \r
1223 @param PeiServices An indirect pointer to the PEI Services Table\r
1224 published by the PEI Foundation.\r
1225 @param This Pointer to local data for the interface.\r
1226 @param Width The width of the access. Enumerated in bytes.\r
1227 @param Address The physical address of the access.\r
1228 @param Count The number of accesses to perform.\r
1229 @param Buffer A pointer to the buffer of data.\r
1230\r
1231 @retval EFI_SUCCESS The function completed successfully.\r
1232 @retval EFI_NOT_YET_AVAILABLE The service has not been installed. \r
1233**/\r
1234EFI_STATUS\r
1235EFIAPI\r
1236PeiDefaultMemRead (\r
1237 IN CONST EFI_PEI_SERVICES **PeiServices,\r
1238 IN CONST EFI_PEI_CPU_IO_PPI *This,\r
1239 IN EFI_PEI_CPU_IO_PPI_WIDTH Width,\r
1240 IN UINT64 Address,\r
1241 IN UINTN Count,\r
1242 IN OUT VOID *Buffer\r
1243 );\r
1244 \r
1245/**\r
1246 Memory-based write services.\r
1247 \r
1248 This function is to perform the Memory Access Write service based on installed \r
1249 instance of the EFI_PEI_CPU_IO_PPI. \r
1250 If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then \r
1251 return EFI_NOT_YET_AVAILABLE. \r
1252 \r
1253 @param PeiServices An indirect pointer to the PEI Services Table\r
1254 published by the PEI Foundation.\r
1255 @param This Pointer to local data for the interface.\r
1256 @param Width The width of the access. Enumerated in bytes.\r
1257 @param Address The physical address of the access.\r
1258 @param Count The number of accesses to perform.\r
1259 @param Buffer A pointer to the buffer of data.\r
1260\r
1261 @retval EFI_SUCCESS The function completed successfully.\r
1262 @retval EFI_NOT_YET_AVAILABLE The service has not been installed. \r
1263**/\r
1264EFI_STATUS\r
1265EFIAPI\r
1266PeiDefaultMemWrite (\r
1267 IN CONST EFI_PEI_SERVICES **PeiServices,\r
1268 IN CONST EFI_PEI_CPU_IO_PPI *This,\r
1269 IN EFI_PEI_CPU_IO_PPI_WIDTH Width,\r
1270 IN UINT64 Address,\r
1271 IN UINTN Count,\r
1272 IN OUT VOID *Buffer\r
1273 );\r
1274 \r
1275/**\r
1276 IO-based read services.\r
1277 \r
1278 This function is to perform the IO-base read service for the EFI_PEI_CPU_IO_PPI.\r
1279 If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then \r
1280 return EFI_NOT_YET_AVAILABLE. \r
1281 \r
1282 @param PeiServices An indirect pointer to the PEI Services Table\r
1283 published by the PEI Foundation.\r
1284 @param This Pointer to local data for the interface.\r
1285 @param Width The width of the access. Enumerated in bytes.\r
1286 @param Address The physical address of the access.\r
1287 @param Count The number of accesses to perform.\r
1288 @param Buffer A pointer to the buffer of data.\r
1289\r
1290 @retval EFI_SUCCESS The function completed successfully.\r
1291 @retval EFI_NOT_YET_AVAILABLE The service has not been installed.\r
1292**/\r
1293EFI_STATUS\r
1294EFIAPI\r
1295PeiDefaultIoRead (\r
1296 IN CONST EFI_PEI_SERVICES **PeiServices,\r
1297 IN CONST EFI_PEI_CPU_IO_PPI *This,\r
1298 IN EFI_PEI_CPU_IO_PPI_WIDTH Width,\r
1299 IN UINT64 Address,\r
1300 IN UINTN Count,\r
1301 IN OUT VOID *Buffer\r
1302 );\r
1303 \r
1304/**\r
1305 IO-based write services.\r
1306 \r
1307 This function is to perform the IO-base write service for the EFI_PEI_CPU_IO_PPI.\r
1308 If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then \r
1309 return EFI_NOT_YET_AVAILABLE. \r
1310 \r
1311 @param PeiServices An indirect pointer to the PEI Services Table\r
1312 published by the PEI Foundation.\r
1313 @param This Pointer to local data for the interface.\r
1314 @param Width The width of the access. Enumerated in bytes.\r
1315 @param Address The physical address of the access.\r
1316 @param Count The number of accesses to perform.\r
1317 @param Buffer A pointer to the buffer of data.\r
1318\r
1319 @retval EFI_SUCCESS The function completed successfully.\r
1320 @retval EFI_NOT_YET_AVAILABLE The service has not been installed.\r
1321**/\r
1322EFI_STATUS\r
1323EFIAPI\r
1324PeiDefaultIoWrite (\r
1325 IN CONST EFI_PEI_SERVICES **PeiServices,\r
1326 IN CONST EFI_PEI_CPU_IO_PPI *This,\r
1327 IN EFI_PEI_CPU_IO_PPI_WIDTH Width,\r
1328 IN UINT64 Address,\r
1329 IN UINTN Count,\r
1330 IN OUT VOID *Buffer\r
1331 );\r
1332 \r
1333/**\r
1334 8-bit I/O read operations.\r
1335 \r
1336 If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then \r
1337 return 0.\r
1338 \r
1339 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.\r
1340 @param This Pointer to local data for the interface.\r
1341 @param Address The physical address of the access.\r
1342\r
1343 @return An 8-bit value returned from the I/O space.\r
1344**/\r
1345UINT8\r
1346EFIAPI\r
1347PeiDefaultIoRead8 (\r
1348 IN CONST EFI_PEI_SERVICES **PeiServices,\r
1349 IN CONST EFI_PEI_CPU_IO_PPI *This,\r
1350 IN UINT64 Address\r
1351 );\r
1352 \r
1353/**\r
1354 Reads an 16-bit I/O port.\r
1355 \r
1356 If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then \r
1357 return 0.\r
1358 \r
1359 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.\r
1360 @param This Pointer to local data for the interface.\r
1361 @param Address The physical address of the access.\r
1362\r
1363 @return A 16-bit value returned from the I/O space.\r
1364**/\r
1365UINT16\r
1366EFIAPI\r
1367PeiDefaultIoRead16 (\r
1368 IN CONST EFI_PEI_SERVICES **PeiServices,\r
1369 IN CONST EFI_PEI_CPU_IO_PPI *This,\r
1370 IN UINT64 Address\r
1371 );\r
1372 \r
1373/**\r
1374 Reads an 32-bit I/O port.\r
1375 \r
1376 If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then \r
1377 return 0.\r
1378 \r
1379 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.\r
1380 @param This Pointer to local data for the interface.\r
1381 @param Address The physical address of the access.\r
1382\r
1383 @return A 32-bit value returned from the I/O space.\r
1384**/\r
1385UINT32\r
1386EFIAPI\r
1387PeiDefaultIoRead32 (\r
1388 IN CONST EFI_PEI_SERVICES **PeiServices,\r
1389 IN CONST EFI_PEI_CPU_IO_PPI *This,\r
1390 IN UINT64 Address\r
1391 );\r
1392 \r
1393/**\r
1394 Reads an 64-bit I/O port.\r
1395 \r
1396 If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then \r
1397 return 0.\r
1398 \r
1399 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.\r
1400 @param This Pointer to local data for the interface.\r
1401 @param Address The physical address of the access.\r
1402\r
1403 @return A 64-bit value returned from the I/O space.\r
1404**/\r
1405UINT64\r
1406EFIAPI\r
1407PeiDefaultIoRead64 (\r
1408 IN CONST EFI_PEI_SERVICES **PeiServices,\r
1409 IN CONST EFI_PEI_CPU_IO_PPI *This,\r
1410 IN UINT64 Address\r
1411 );\r
1412 \r
1413/**\r
1414 8-bit I/O write operations.\r
1415\r
1416 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.\r
1417 @param This Pointer to local data for the interface.\r
1418 @param Address The physical address of the access.\r
1419 @param Data The data to write.\r
1420**/\r
1421VOID\r
1422EFIAPI\r
1423PeiDefaultIoWrite8 (\r
1424 IN CONST EFI_PEI_SERVICES **PeiServices,\r
1425 IN CONST EFI_PEI_CPU_IO_PPI *This,\r
1426 IN UINT64 Address,\r
1427 IN UINT8 Data\r
1428 );\r
1429 \r
1430/**\r
1431 16-bit I/O write operations.\r
1432\r
1433 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.\r
1434 @param This Pointer to local data for the interface.\r
1435 @param Address The physical address of the access.\r
1436 @param Data The data to write.\r
1437**/\r
1438VOID\r
1439EFIAPI\r
1440PeiDefaultIoWrite16 (\r
1441 IN CONST EFI_PEI_SERVICES **PeiServices,\r
1442 IN CONST EFI_PEI_CPU_IO_PPI *This,\r
1443 IN UINT64 Address,\r
1444 IN UINT16 Data\r
1445 );\r
1446 \r
1447/**\r
1448 32-bit I/O write operations.\r
1449\r
1450 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.\r
1451 @param This Pointer to local data for the interface.\r
1452 @param Address The physical address of the access.\r
1453 @param Data The data to write.\r
1454**/\r
1455VOID\r
1456EFIAPI\r
1457PeiDefaultIoWrite32 (\r
1458 IN CONST EFI_PEI_SERVICES **PeiServices,\r
1459 IN CONST EFI_PEI_CPU_IO_PPI *This,\r
1460 IN UINT64 Address,\r
1461 IN UINT32 Data\r
1462 );\r
1463 \r
1464/**\r
1465 64-bit I/O write operations.\r
1466\r
1467 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.\r
1468 @param This Pointer to local data for the interface.\r
1469 @param Address The physical address of the access.\r
1470 @param Data The data to write.\r
1471**/\r
1472VOID\r
1473EFIAPI\r
1474PeiDefaultIoWrite64 (\r
1475 IN CONST EFI_PEI_SERVICES **PeiServices,\r
1476 IN CONST EFI_PEI_CPU_IO_PPI *This,\r
1477 IN UINT64 Address,\r
1478 IN UINT64 Data\r
1479 );\r
1480 \r
1481/**\r
1482 8-bit memory read operations.\r
1483\r
1484 If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then \r
1485 return 0.\r
1486 \r
1487 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.\r
1488 @param This Pointer to local data for the interface.\r
1489 @param Address The physical address of the access.\r
1490\r
1491 @return An 8-bit value returned from the memory space.\r
1492\r
1493**/\r
1494UINT8\r
1495EFIAPI\r
1496PeiDefaultMemRead8 (\r
1497 IN CONST EFI_PEI_SERVICES **PeiServices,\r
1498 IN CONST EFI_PEI_CPU_IO_PPI *This,\r
1499 IN UINT64 Address\r
1500 );\r
1501 \r
1502/**\r
1503 16-bit memory read operations.\r
1504\r
1505 If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then \r
1506 return 0.\r
1507 \r
1508 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.\r
1509 @param This Pointer to local data for the interface.\r
1510 @param Address The physical address of the access.\r
1511\r
1512 @return An 16-bit value returned from the memory space.\r
1513\r
1514**/\r
1515UINT16\r
1516EFIAPI\r
1517PeiDefaultMemRead16 (\r
1518 IN CONST EFI_PEI_SERVICES **PeiServices,\r
1519 IN CONST EFI_PEI_CPU_IO_PPI *This,\r
1520 IN UINT64 Address\r
1521 );\r
1522 \r
1523/**\r
1524 32-bit memory read operations.\r
1525\r
1526 If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then \r
1527 return 0.\r
1528 \r
1529 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.\r
1530 @param This Pointer to local data for the interface.\r
1531 @param Address The physical address of the access.\r
1532\r
1533 @return An 32-bit value returned from the memory space.\r
1534\r
1535**/\r
1536UINT32\r
1537EFIAPI\r
1538PeiDefaultMemRead32 (\r
1539 IN CONST EFI_PEI_SERVICES **PeiServices,\r
1540 IN CONST EFI_PEI_CPU_IO_PPI *This,\r
1541 IN UINT64 Address\r
1542 );\r
1543 \r
1544/**\r
1545 64-bit memory read operations.\r
1546\r
1547 If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then \r
1548 return 0.\r
1549 \r
1550 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.\r
1551 @param This Pointer to local data for the interface.\r
1552 @param Address The physical address of the access.\r
1553\r
1554 @return An 64-bit value returned from the memory space.\r
1555\r
1556**/\r
1557UINT64\r
1558EFIAPI\r
1559PeiDefaultMemRead64 (\r
1560 IN CONST EFI_PEI_SERVICES **PeiServices,\r
1561 IN CONST EFI_PEI_CPU_IO_PPI *This,\r
1562 IN UINT64 Address\r
1563 );\r
1564 \r
1565/**\r
1566 8-bit memory write operations.\r
1567\r
1568 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.\r
1569 @param This Pointer to local data for the interface.\r
1570 @param Address The physical address of the access.\r
1571 @param Data The data to write.\r
1572\r
1573**/\r
1574VOID\r
1575EFIAPI\r
1576PeiDefaultMemWrite8 (\r
1577 IN CONST EFI_PEI_SERVICES **PeiServices,\r
1578 IN CONST EFI_PEI_CPU_IO_PPI *This,\r
1579 IN UINT64 Address,\r
1580 IN UINT8 Data\r
1581 );\r
1582 \r
1583/**\r
1584 16-bit memory write operations.\r
1585\r
1586 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.\r
1587 @param This Pointer to local data for the interface.\r
1588 @param Address The physical address of the access.\r
1589 @param Data The data to write.\r
1590\r
1591**/\r
1592VOID\r
1593EFIAPI\r
1594PeiDefaultMemWrite16 (\r
1595 IN CONST EFI_PEI_SERVICES **PeiServices,\r
1596 IN CONST EFI_PEI_CPU_IO_PPI *This,\r
1597 IN UINT64 Address,\r
1598 IN UINT16 Data\r
1599 );\r
1600\r
1601/**\r
1602 32-bit memory write operations.\r
1603\r
1604 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.\r
1605 @param This Pointer to local data for the interface.\r
1606 @param Address The physical address of the access.\r
1607 @param Data The data to write.\r
1608\r
1609**/\r
1610VOID\r
1611EFIAPI\r
1612PeiDefaultMemWrite32 (\r
1613 IN CONST EFI_PEI_SERVICES **PeiServices,\r
1614 IN CONST EFI_PEI_CPU_IO_PPI *This,\r
1615 IN UINT64 Address,\r
1616 IN UINT32 Data\r
1617 );\r
1618 \r
1619/**\r
1620 64-bit memory write operations.\r
1621\r
1622 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.\r
1623 @param This Pointer to local data for the interface.\r
1624 @param Address The physical address of the access.\r
1625 @param Data The data to write.\r
1626\r
1627**/\r
1628VOID\r
1629EFIAPI\r
1630PeiDefaultMemWrite64 (\r
1631 IN CONST EFI_PEI_SERVICES **PeiServices,\r
1632 IN CONST EFI_PEI_CPU_IO_PPI *This,\r
1633 IN UINT64 Address,\r
1634 IN UINT64 Data\r
1635 );\r
1636 \r
1637extern EFI_PEI_CPU_IO_PPI gPeiDefaultCpuIoPpi; \r
1638\r
1639//\r
1640// Default EFI_PEI_PCI_CFG2_PPI support for EFI_PEI_SERVICES table when PeiCore initialization.\r
1641// \r
1642\r
1643/**\r
1644 Reads from a given location in the PCI configuration space.\r
1645\r
1646 If the EFI_PEI_PCI_CFG2_PPI is not installed by platform/chipset PEIM, then \r
1647 return EFI_NOT_YET_AVAILABLE. \r
1648 \r
1649 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.\r
1650 @param This Pointer to local data for the interface.\r
1651 @param Width The width of the access. Enumerated in bytes.\r
1652 See EFI_PEI_PCI_CFG_PPI_WIDTH above.\r
1653 @param Address The physical address of the access. The format of\r
1654 the address is described by EFI_PEI_PCI_CFG_PPI_PCI_ADDRESS.\r
1655 @param Buffer A pointer to the buffer of data.\r
1656\r
1657 @retval EFI_SUCCESS The function completed successfully.\r
1658 @retval EFI_INVALID_PARAMETER The invalid access width.\r
1659 @retval EFI_NOT_YET_AVAILABLE If the EFI_PEI_PCI_CFG2_PPI is not installed by platform/chipset PEIM.\r
1660 \r
1661**/\r
1662EFI_STATUS\r
1663EFIAPI\r
1664PeiDefaultPciCfg2Read (\r
1665 IN CONST EFI_PEI_SERVICES **PeiServices,\r
1666 IN CONST EFI_PEI_PCI_CFG2_PPI *This,\r
1667 IN EFI_PEI_PCI_CFG_PPI_WIDTH Width,\r
1668 IN UINT64 Address,\r
1669 IN OUT VOID *Buffer\r
1670 );\r
1671 \r
1672/**\r
1673 Write to a given location in the PCI configuration space.\r
1674\r
1675 If the EFI_PEI_PCI_CFG2_PPI is not installed by platform/chipset PEIM, then \r
1676 return EFI_NOT_YET_AVAILABLE. \r
1677 \r
1678 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.\r
1679 @param This Pointer to local data for the interface.\r
1680 @param Width The width of the access. Enumerated in bytes.\r
1681 See EFI_PEI_PCI_CFG_PPI_WIDTH above.\r
1682 @param Address The physical address of the access. The format of\r
1683 the address is described by EFI_PEI_PCI_CFG_PPI_PCI_ADDRESS.\r
1684 @param Buffer A pointer to the buffer of data.\r
1685\r
1686 @retval EFI_SUCCESS The function completed successfully.\r
1687 @retval EFI_INVALID_PARAMETER The invalid access width.\r
1688 @retval EFI_NOT_YET_AVAILABLE If the EFI_PEI_PCI_CFG2_PPI is not installed by platform/chipset PEIM.\r
1689**/\r
1690EFI_STATUS\r
1691EFIAPI\r
1692PeiDefaultPciCfg2Write (\r
1693 IN CONST EFI_PEI_SERVICES **PeiServices,\r
1694 IN CONST EFI_PEI_PCI_CFG2_PPI *This,\r
1695 IN EFI_PEI_PCI_CFG_PPI_WIDTH Width,\r
1696 IN UINT64 Address,\r
1697 IN OUT VOID *Buffer\r
1698 );\r
1699 \r
1700/**\r
1701 This function performs a read-modify-write operation on the contents from a given\r
1702 location in the PCI configuration space.\r
1703\r
1704 @param PeiServices An indirect pointer to the PEI Services Table\r
1705 published by the PEI Foundation.\r
1706 @param This Pointer to local data for the interface.\r
1707 @param Width The width of the access. Enumerated in bytes. Type\r
1708 EFI_PEI_PCI_CFG_PPI_WIDTH is defined in Read().\r
1709 @param Address The physical address of the access.\r
1710 @param SetBits Points to value to bitwise-OR with the read configuration value.\r
1711 The size of the value is determined by Width.\r
1712 @param ClearBits Points to the value to negate and bitwise-AND with the read configuration value.\r
1713 The size of the value is determined by Width.\r
1714\r
1715 @retval EFI_SUCCESS The function completed successfully.\r
1716 @retval EFI_INVALID_PARAMETER The invalid access width.\r
1717 @retval EFI_NOT_YET_AVAILABLE If the EFI_PEI_PCI_CFG2_PPI is not installed by platform/chipset PEIM.\r
1718**/\r
1719EFI_STATUS\r
1720EFIAPI\r
1721PeiDefaultPciCfg2Modify (\r
1722 IN CONST EFI_PEI_SERVICES **PeiServices,\r
1723 IN CONST EFI_PEI_PCI_CFG2_PPI *This,\r
1724 IN EFI_PEI_PCI_CFG_PPI_WIDTH Width,\r
1725 IN UINT64 Address,\r
1726 IN VOID *SetBits,\r
1727 IN VOID *ClearBits\r
1728 ); \r
1729 \r
1730extern EFI_PEI_PCI_CFG2_PPI gPeiDefaultPciCfg2Ppi;\r
1731\r
1732/**\r
1733 After PeiCore image is shadowed into permanent memory, all build-in FvPpi should\r
1734 be re-installed with the instance in permanent memory and all cached FvPpi pointers in \r
1735 PrivateData->Fv[] array should be fixed up to be pointed to the one in permanent\r
1736 memory.\r
1737 \r
1738 @param PrivateData Pointer to PEI_CORE_INSTANCE.\r
1739**/ \r
1740VOID\r
1741PeiReinitializeFv (\r
1742 IN PEI_CORE_INSTANCE *PrivateData\r
1743 );\r
1744 \r
1745#endif\r