2 Implementation for PEI Services Library.
4 Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php.
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
18 #include <Ppi/FirmwareVolumeInfo.h>
19 #include <Ppi/FirmwareVolumeInfo2.h>
20 #include <Guid/FirmwareFileSystem2.h>
22 #include <Library/PeiServicesLib.h>
23 #include <Library/PeiServicesTablePointerLib.h>
24 #include <Library/DebugLib.h>
25 #include <Library/MemoryAllocationLib.h>
26 #include <Library/BaseMemoryLib.h>
29 This service enables a given PEIM to register an interface into the PEI Foundation.
31 @param PpiList A pointer to the list of interfaces that the caller shall install.
33 @retval EFI_SUCCESS The interface was successfully installed.
34 @retval EFI_INVALID_PARAMETER The PpiList pointer is NULL.
35 @retval EFI_INVALID_PARAMETER Any of the PEI PPI descriptors in the list do not have the
36 EFI_PEI_PPI_DESCRIPTOR_PPI bit set in the Flags field.
37 @retval EFI_OUT_OF_RESOURCES There is no additional space in the PPI database.
42 PeiServicesInstallPpi (
43 IN CONST EFI_PEI_PPI_DESCRIPTOR
*PpiList
46 CONST EFI_PEI_SERVICES
**PeiServices
;
48 PeiServices
= GetPeiServicesTablePointer ();
49 return (*PeiServices
)->InstallPpi (PeiServices
, PpiList
);
53 This service enables PEIMs to replace an entry in the PPI database with an alternate entry.
55 @param OldPpi The pointer to the old PEI PPI Descriptors.
56 @param NewPpi The pointer to the new PEI PPI Descriptors.
58 @retval EFI_SUCCESS The interface was successfully installed.
59 @retval EFI_INVALID_PARAMETER The OldPpi or NewPpi is NULL.
60 @retval EFI_INVALID_PARAMETER Any of the PEI PPI descriptors in the list do not have the
61 EFI_PEI_PPI_DESCRIPTOR_PPI bit set in the Flags field.
62 @retval EFI_OUT_OF_RESOURCES There is no additional space in the PPI database.
63 @retval EFI_NOT_FOUND The PPI for which the reinstallation was requested has not been
69 PeiServicesReInstallPpi (
70 IN CONST EFI_PEI_PPI_DESCRIPTOR
*OldPpi
,
71 IN CONST EFI_PEI_PPI_DESCRIPTOR
*NewPpi
74 CONST EFI_PEI_SERVICES
**PeiServices
;
76 PeiServices
= GetPeiServicesTablePointer ();
77 return (*PeiServices
)->ReInstallPpi (PeiServices
, OldPpi
, NewPpi
);
81 This service enables PEIMs to discover a given instance of an interface.
83 @param Guid A pointer to the GUID whose corresponding interface needs to be
85 @param Instance The N-th instance of the interface that is required.
86 @param PpiDescriptor A pointer to instance of the EFI_PEI_PPI_DESCRIPTOR.
87 @param Ppi A pointer to the instance of the interface.
89 @retval EFI_SUCCESS The interface was successfully returned.
90 @retval EFI_NOT_FOUND The PPI descriptor is not found in the database.
95 PeiServicesLocatePpi (
96 IN CONST EFI_GUID
*Guid
,
98 IN OUT EFI_PEI_PPI_DESCRIPTOR
**PpiDescriptor
,
102 CONST EFI_PEI_SERVICES
**PeiServices
;
104 PeiServices
= GetPeiServicesTablePointer ();
105 return (*PeiServices
)->LocatePpi (PeiServices
, Guid
, Instance
, PpiDescriptor
, Ppi
);
109 This service enables PEIMs to register a given service to be invoked when another service is
110 installed or reinstalled.
112 @param NotifyList A pointer to the list of notification interfaces
113 that the caller shall install.
115 @retval EFI_SUCCESS The interface was successfully installed.
116 @retval EFI_INVALID_PARAMETER The NotifyList pointer is NULL.
117 @retval EFI_INVALID_PARAMETER Any of the PEI notify descriptors in the list do
118 not have the EFI_PEI_PPI_DESCRIPTOR_NOTIFY_TYPES
119 bit set in the Flags field.
120 @retval EFI_OUT_OF_RESOURCES There is no additional space in the PPI database.
125 PeiServicesNotifyPpi (
126 IN CONST EFI_PEI_NOTIFY_DESCRIPTOR
*NotifyList
129 CONST EFI_PEI_SERVICES
**PeiServices
;
131 PeiServices
= GetPeiServicesTablePointer ();
132 return (*PeiServices
)->NotifyPpi (PeiServices
, NotifyList
);
136 This service enables PEIMs to ascertain the present value of the boot mode.
138 @param BootMode A pointer to contain the value of the boot mode.
140 @retval EFI_SUCCESS The boot mode was returned successfully.
141 @retval EFI_INVALID_PARAMETER BootMode is NULL.
146 PeiServicesGetBootMode (
147 OUT EFI_BOOT_MODE
*BootMode
150 CONST EFI_PEI_SERVICES
**PeiServices
;
152 PeiServices
= GetPeiServicesTablePointer ();
153 return (*PeiServices
)->GetBootMode (PeiServices
, BootMode
);
157 This service enables PEIMs to update the boot mode variable.
159 @param BootMode The value of the boot mode to set.
161 @retval EFI_SUCCESS The value was successfully updated
166 PeiServicesSetBootMode (
167 IN EFI_BOOT_MODE BootMode
170 CONST EFI_PEI_SERVICES
**PeiServices
;
172 PeiServices
= GetPeiServicesTablePointer ();
173 return (*PeiServices
)->SetBootMode (PeiServices
, BootMode
);
177 This service enables a PEIM to ascertain the address of the list of HOBs in memory.
179 @param HobList A pointer to the list of HOBs that the PEI Foundation
182 @retval EFI_SUCCESS The list was successfully returned.
183 @retval EFI_NOT_AVAILABLE_YET The HOB list is not yet published.
188 PeiServicesGetHobList (
192 CONST EFI_PEI_SERVICES
**PeiServices
;
194 PeiServices
= GetPeiServicesTablePointer ();
195 return (*PeiServices
)->GetHobList (PeiServices
, HobList
);
199 This service enables PEIMs to create various types of HOBs.
201 @param Type The type of HOB to be installed.
202 @param Length The length of the HOB to be added.
203 @param Hob The address of a pointer that will contain the
206 @retval EFI_SUCCESS The HOB was successfully created.
207 @retval EFI_OUT_OF_RESOURCES There is no additional space for HOB creation.
212 PeiServicesCreateHob (
218 CONST EFI_PEI_SERVICES
**PeiServices
;
220 PeiServices
= GetPeiServicesTablePointer ();
221 return (*PeiServices
)->CreateHob (PeiServices
, Type
, Length
, Hob
);
225 This service enables PEIMs to discover additional firmware volumes.
227 @param Instance This instance of the firmware volume to find. The
228 value 0 is the Boot Firmware Volume (BFV).
229 @param VolumeHandle Handle of the firmware volume header of the volume
232 @retval EFI_SUCCESS The volume was found.
233 @retval EFI_NOT_FOUND The volume was not found.
234 @retval EFI_INVALID_PARAMETER FwVolHeader is NULL.
239 PeiServicesFfsFindNextVolume (
241 IN OUT EFI_PEI_FV_HANDLE
*VolumeHandle
244 CONST EFI_PEI_SERVICES
**PeiServices
;
246 PeiServices
= GetPeiServicesTablePointer ();
247 return (*PeiServices
)->FfsFindNextVolume (PeiServices
, Instance
, VolumeHandle
);
251 This service enables PEIMs to discover additional firmware files.
253 @param SearchType A filter to find files only of this type.
254 @param VolumeHandle The pointer to the firmware volume header of the
255 volume to search. This parameter must point to a
257 @param FileHandle Handle of the current file from which to begin searching.
259 @retval EFI_SUCCESS The file was found.
260 @retval EFI_NOT_FOUND The file was not found.
261 @retval EFI_NOT_FOUND The header checksum was not zero.
266 PeiServicesFfsFindNextFile (
267 IN EFI_FV_FILETYPE SearchType
,
268 IN EFI_PEI_FV_HANDLE VolumeHandle
,
269 IN OUT EFI_PEI_FILE_HANDLE
*FileHandle
272 CONST EFI_PEI_SERVICES
**PeiServices
;
274 PeiServices
= GetPeiServicesTablePointer ();
275 return (*PeiServices
)->FfsFindNextFile (PeiServices
, SearchType
, VolumeHandle
, FileHandle
);
279 This service enables PEIMs to discover sections of a given type within a valid FFS file.
281 @param SectionType The value of the section type to find.
282 @param FileHandle A pointer to the file header that contains the set
283 of sections to be searched.
284 @param SectionData A pointer to the discovered section, if successful.
286 @retval EFI_SUCCESS The section was found.
287 @retval EFI_NOT_FOUND The section was not found.
292 PeiServicesFfsFindSectionData (
293 IN EFI_SECTION_TYPE SectionType
,
294 IN EFI_PEI_FILE_HANDLE FileHandle
,
295 OUT VOID
**SectionData
298 CONST EFI_PEI_SERVICES
**PeiServices
;
300 PeiServices
= GetPeiServicesTablePointer ();
301 return (*PeiServices
)->FfsFindSectionData (PeiServices
, SectionType
, FileHandle
, SectionData
);
305 This service enables PEIMs to discover sections of a given instance and type within a valid FFS file.
307 @param SectionType The value of the section type to find.
308 @param SectionInstance Section instance to find.
309 @param FileHandle A pointer to the file header that contains the set
310 of sections to be searched.
311 @param SectionData A pointer to the discovered section, if successful.
312 @param AuthenticationStatus A pointer to the authentication status for this section.
314 @retval EFI_SUCCESS The section was found.
315 @retval EFI_NOT_FOUND The section was not found.
320 PeiServicesFfsFindSectionData3 (
321 IN EFI_SECTION_TYPE SectionType
,
322 IN UINTN SectionInstance
,
323 IN EFI_PEI_FILE_HANDLE FileHandle
,
324 OUT VOID
**SectionData
,
325 OUT UINT32
*AuthenticationStatus
328 CONST EFI_PEI_SERVICES
**PeiServices
;
330 PeiServices
= GetPeiServicesTablePointer ();
331 return (*PeiServices
)->FindSectionData3 (PeiServices
, SectionType
, SectionInstance
, FileHandle
, SectionData
, AuthenticationStatus
);
335 This service enables PEIMs to register the permanent memory configuration
336 that has been initialized with the PEI Foundation.
338 @param MemoryBegin The value of a region of installed memory.
339 @param MemoryLength The corresponding length of a region of installed memory.
341 @retval EFI_SUCCESS The region was successfully installed in a HOB.
342 @retval EFI_INVALID_PARAMETER MemoryBegin and MemoryLength are illegal for this system.
343 @retval EFI_OUT_OF_RESOURCES There is no additional space for HOB creation.
348 PeiServicesInstallPeiMemory (
349 IN EFI_PHYSICAL_ADDRESS MemoryBegin
,
350 IN UINT64 MemoryLength
353 CONST EFI_PEI_SERVICES
**PeiServices
;
355 PeiServices
= GetPeiServicesTablePointer ();
356 return (*PeiServices
)->InstallPeiMemory (PeiServices
, MemoryBegin
, MemoryLength
);
360 This service enables PEIMs to allocate memory after the permanent memory has been
363 @param MemoryType Type of memory to allocate.
364 @param Pages The number of pages to allocate.
365 @param Memory Pointer of memory allocated.
367 @retval EFI_SUCCESS The memory range was successfully allocated.
368 @retval EFI_INVALID_PARAMETER Type is not equal to AllocateAnyPages.
369 @retval EFI_NOT_AVAILABLE_YET Called with permanent memory not available.
370 @retval EFI_OUT_OF_RESOURCES The pages could not be allocated.
375 PeiServicesAllocatePages (
376 IN EFI_MEMORY_TYPE MemoryType
,
378 OUT EFI_PHYSICAL_ADDRESS
*Memory
381 CONST EFI_PEI_SERVICES
**PeiServices
;
383 PeiServices
= GetPeiServicesTablePointer ();
384 return (*PeiServices
)->AllocatePages (PeiServices
, MemoryType
, Pages
, Memory
);
388 This service allocates memory from the Hand-Off Block (HOB) heap.
390 @param Size The number of bytes to allocate from the pool.
391 @param Buffer If the call succeeds, a pointer to a pointer to
392 the allocate buffer; otherwise, undefined.
394 @retval EFI_SUCCESS The allocation was successful
395 @retval EFI_OUT_OF_RESOURCES There is not enough heap to allocate the requested size.
400 PeiServicesAllocatePool (
405 CONST EFI_PEI_SERVICES
**PeiServices
;
407 PeiServices
= GetPeiServicesTablePointer ();
408 return (*PeiServices
)->AllocatePool (PeiServices
, Size
, Buffer
);
412 Resets the entire platform.
414 @retval EFI_SUCCESS The function completed successfully.
415 @retval EFI_NOT_AVAILABLE_YET The service has not been installed yet.
420 PeiServicesResetSystem (
424 CONST EFI_PEI_SERVICES
**PeiServices
;
426 PeiServices
= GetPeiServicesTablePointer ();
427 return (*PeiServices
)->ResetSystem (PeiServices
);
431 This service is a wrapper for the PEI Service RegisterForShadow(), except the
432 pointer to the PEI Services Table has been removed. See the Platform
433 Initialization Pre-EFI Initialization Core Interface Specification for details.
435 @param FileHandle PEIM's file handle. Must be the currently
438 @retval EFI_SUCCESS The PEIM was successfully registered for
441 @retval EFI_ALREADY_STARTED The PEIM was previously
442 registered for shadowing.
444 @retval EFI_NOT_FOUND The FileHandle does not refer to a
449 PeiServicesRegisterForShadow (
450 IN EFI_PEI_FILE_HANDLE FileHandle
453 return (*GetPeiServicesTablePointer())->RegisterForShadow (FileHandle
);
457 This service is a wrapper for the PEI Service FfsGetFileInfo(), except the pointer to the PEI Services
458 Table has been removed. See the Platform Initialization Pre-EFI Initialization Core Interface
459 Specification for details.
461 @param FileHandle The handle of the file.
463 @param FileInfo Upon exit, points to the file's
466 @retval EFI_SUCCESS File information returned.
468 @retval EFI_INVALID_PARAMETER If FileHandle does not
469 represent a valid file.
471 @retval EFI_INVALID_PARAMETER FileInfo is NULL.
476 PeiServicesFfsGetFileInfo (
477 IN CONST EFI_PEI_FILE_HANDLE FileHandle
,
478 OUT EFI_FV_FILE_INFO
*FileInfo
481 return (*GetPeiServicesTablePointer())->FfsGetFileInfo (FileHandle
, FileInfo
);
485 This service is a wrapper for the PEI Service FfsGetFileInfo2(), except the pointer to the PEI Services
486 Table has been removed. See the Platform Initialization Pre-EFI Initialization Core Interface
487 Specification for details.
489 @param FileHandle The handle of the file.
490 @param FileInfo Upon exit, points to the file's
493 @retval EFI_SUCCESS File information returned.
494 @retval EFI_INVALID_PARAMETER If FileHandle does not
495 represent a valid file.
496 @retval EFI_INVALID_PARAMETER FileInfo is NULL.
501 PeiServicesFfsGetFileInfo2 (
502 IN CONST EFI_PEI_FILE_HANDLE FileHandle
,
503 OUT EFI_FV_FILE_INFO2
*FileInfo
506 return (*GetPeiServicesTablePointer())->FfsGetFileInfo2 (FileHandle
, FileInfo
);
510 This service is a wrapper for the PEI Service FfsFindByName(), except the pointer to the PEI Services
511 Table has been removed. See the Platform Initialization Pre-EFI Initialization Core Interface
512 Specification for details.
514 @param FileName A pointer to the name of the file to
515 find within the firmware volume.
517 @param VolumeHandle The firmware volume to search FileHandle
518 Upon exit, points to the found file's
519 handle or NULL if it could not be found.
520 @param FileHandle The pointer to found file handle
522 @retval EFI_SUCCESS File was found.
524 @retval EFI_NOT_FOUND File was not found.
526 @retval EFI_INVALID_PARAMETER VolumeHandle or FileHandle or
532 PeiServicesFfsFindFileByName (
533 IN CONST EFI_GUID
*FileName
,
534 IN CONST EFI_PEI_FV_HANDLE VolumeHandle
,
535 OUT EFI_PEI_FILE_HANDLE
*FileHandle
538 return (*GetPeiServicesTablePointer())->FfsFindFileByName (FileName
, VolumeHandle
, FileHandle
);
543 This service is a wrapper for the PEI Service FfsGetVolumeInfo(), except the pointer to the PEI Services
544 Table has been removed. See the Platform Initialization Pre-EFI Initialization Core Interface
545 Specification for details.
547 @param VolumeHandle Handle of the volume.
549 @param VolumeInfo Upon exit, points to the volume's
552 @retval EFI_SUCCESS File information returned.
554 @retval EFI_INVALID_PARAMETER If FileHandle does not
555 represent a valid file.
557 @retval EFI_INVALID_PARAMETER If FileInfo is NULL.
562 PeiServicesFfsGetVolumeInfo (
563 IN EFI_PEI_FV_HANDLE VolumeHandle
,
564 OUT EFI_FV_INFO
*VolumeInfo
567 return (*GetPeiServicesTablePointer())->FfsGetVolumeInfo (VolumeHandle
, VolumeInfo
);
571 Install a EFI_PEI_FIRMWARE_VOLUME_INFO(2)_PPI instance so the PEI Core will be notified about a new firmware volume.
573 This function allocates, initializes, and installs a new EFI_PEI_FIRMWARE_VOLUME_INFO(2)_PPI using
574 the parameters passed in to initialize the fields of the EFI_PEI_FIRMWARE_VOLUME_INFO(2)_PPI instance.
575 If the resources can not be allocated for EFI_PEI_FIRMWARE_VOLUME_INFO(2)_PPI, then ASSERT().
576 If the EFI_PEI_FIRMWARE_VOLUME_INFO(2)_PPI can not be installed, then ASSERT().
578 @param InstallFvInfoPpi Install FvInfo Ppi if it is TRUE. Otherwise, install FvInfo2 Ppi.
579 @param FvFormat Unique identifier of the format of the memory-mapped
580 firmware volume. This parameter is optional and
581 may be NULL. If NULL is specified, the
582 EFI_FIRMWARE_FILE_SYSTEM2_GUID format is assumed.
583 @param FvInfo Points to a buffer which allows the
584 EFI_PEI_FIRMWARE_VOLUME_PPI to process the volume.
585 The format of this buffer is specific to the FvFormat.
586 For memory-mapped firmware volumes, this typically
587 points to the first byte of the firmware volume.
588 @param FvInfoSize The size, in bytes, of FvInfo. For memory-mapped
589 firmware volumes, this is typically the size of
591 @param ParentFvName If the new firmware volume originated from a file
592 in a different firmware volume, then this parameter
593 specifies the GUID name of the originating firmware
594 volume. Otherwise, this parameter must be NULL.
595 @param ParentFileName If the new firmware volume originated from a file
596 in a different firmware volume, then this parameter
597 specifies the GUID file name of the originating
598 firmware file. Otherwise, this parameter must be NULL.
599 @param AuthenticationStatus Authentication Status, it will be ignored if InstallFvInfoPpi is TRUE.
603 InternalPeiServicesInstallFvInfoPpi (
604 IN BOOLEAN InstallFvInfoPpi
,
605 IN CONST EFI_GUID
*FvFormat
, OPTIONAL
606 IN CONST VOID
*FvInfo
,
607 IN UINT32 FvInfoSize
,
608 IN CONST EFI_GUID
*ParentFvName
, OPTIONAL
609 IN CONST EFI_GUID
*ParentFileName
, OPTIONAL
610 IN UINT32 AuthenticationStatus
614 EFI_PEI_FIRMWARE_VOLUME_INFO_PPI
*FvInfoPpi
;
615 EFI_PEI_PPI_DESCRIPTOR
*FvInfoPpiDescriptor
;
616 EFI_GUID
*ParentFvNameValue
;
617 EFI_GUID
*ParentFileNameValue
;
620 ParentFvNameValue
= NULL
;
621 ParentFileNameValue
= NULL
;
622 if (InstallFvInfoPpi
) {
624 // To install FvInfo Ppi.
626 FvInfoPpi
= AllocateZeroPool (sizeof (EFI_PEI_FIRMWARE_VOLUME_INFO_PPI
));
627 ASSERT (FvInfoPpi
!= NULL
);
628 PpiGuid
= &gEfiPeiFirmwareVolumeInfoPpiGuid
;
631 // To install FvInfo2 Ppi.
633 FvInfoPpi
= AllocateZeroPool (sizeof (EFI_PEI_FIRMWARE_VOLUME_INFO2_PPI
));
634 ASSERT (FvInfoPpi
!= NULL
);
635 ((EFI_PEI_FIRMWARE_VOLUME_INFO2_PPI
*) FvInfoPpi
)->AuthenticationStatus
= AuthenticationStatus
;
636 PpiGuid
= &gEfiPeiFirmwareVolumeInfo2PpiGuid
;
639 if (FvFormat
!= NULL
) {
640 CopyGuid (&FvInfoPpi
->FvFormat
, FvFormat
);
642 CopyGuid (&FvInfoPpi
->FvFormat
, &gEfiFirmwareFileSystem2Guid
);
644 FvInfoPpi
->FvInfo
= (VOID
*) FvInfo
;
645 FvInfoPpi
->FvInfoSize
= FvInfoSize
;
646 if (ParentFvName
!= NULL
) {
647 ParentFvNameValue
= AllocateCopyPool (sizeof (EFI_GUID
), ParentFvName
);
648 ASSERT (ParentFvNameValue
!= NULL
);
649 FvInfoPpi
->ParentFvName
= ParentFvNameValue
;
651 if (ParentFileName
!= NULL
) {
652 ParentFileNameValue
= AllocateCopyPool (sizeof (EFI_GUID
), ParentFileName
);
653 ASSERT (ParentFileNameValue
!= NULL
);
654 FvInfoPpi
->ParentFileName
= ParentFileNameValue
;
657 FvInfoPpiDescriptor
= AllocatePool (sizeof (EFI_PEI_PPI_DESCRIPTOR
));
658 ASSERT (FvInfoPpiDescriptor
!= NULL
);
660 FvInfoPpiDescriptor
->Guid
= PpiGuid
;
661 FvInfoPpiDescriptor
->Flags
= EFI_PEI_PPI_DESCRIPTOR_PPI
| EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST
;
662 FvInfoPpiDescriptor
->Ppi
= (VOID
*) FvInfoPpi
;
663 Status
= PeiServicesInstallPpi (FvInfoPpiDescriptor
);
664 ASSERT_EFI_ERROR (Status
);
669 Install a EFI_PEI_FIRMWARE_VOLUME_INFO_PPI instance so the PEI Core will be notified about a new firmware volume.
671 This function allocates, initializes, and installs a new EFI_PEI_FIRMWARE_VOLUME_INFO_PPI using
672 the parameters passed in to initialize the fields of the EFI_PEI_FIRMWARE_VOLUME_INFO_PPI instance.
673 If the resources can not be allocated for EFI_PEI_FIRMWARE_VOLUME_INFO_PPI, then ASSERT().
674 If the EFI_PEI_FIRMWARE_VOLUME_INFO_PPI can not be installed, then ASSERT().
676 @param FvFormat Unique identifier of the format of the memory-mapped
677 firmware volume. This parameter is optional and
678 may be NULL. If NULL is specified, the
679 EFI_FIRMWARE_FILE_SYSTEM2_GUID format is assumed.
680 @param FvInfo Points to a buffer which allows the
681 EFI_PEI_FIRMWARE_VOLUME_PPI to process the volume.
682 The format of this buffer is specific to the FvFormat.
683 For memory-mapped firmware volumes, this typically
684 points to the first byte of the firmware volume.
685 @param FvInfoSize The size, in bytes, of FvInfo. For memory-mapped
686 firmware volumes, this is typically the size of
688 @param ParentFvName If the new firmware volume originated from a file
689 in a different firmware volume, then this parameter
690 specifies the GUID name of the originating firmware
691 volume. Otherwise, this parameter must be NULL.
692 @param ParentFileName If the new firmware volume originated from a file
693 in a different firmware volume, then this parameter
694 specifies the GUID file name of the originating
695 firmware file. Otherwise, this parameter must be NULL.
699 PeiServicesInstallFvInfoPpi (
700 IN CONST EFI_GUID
*FvFormat
, OPTIONAL
701 IN CONST VOID
*FvInfo
,
702 IN UINT32 FvInfoSize
,
703 IN CONST EFI_GUID
*ParentFvName
, OPTIONAL
704 IN CONST EFI_GUID
*ParentFileName OPTIONAL
707 InternalPeiServicesInstallFvInfoPpi (TRUE
, FvFormat
, FvInfo
, FvInfoSize
, ParentFvName
, ParentFileName
, 0);
711 Install a EFI_PEI_FIRMWARE_VOLUME_INFO2_PPI instance so the PEI Core will be notified about a new firmware volume.
713 This function allocates, initializes, and installs a new EFI_PEI_FIRMWARE_VOLUME_INFO2_PPI using
714 the parameters passed in to initialize the fields of the EFI_PEI_FIRMWARE_VOLUME_INFO2_PPI instance.
715 If the resources can not be allocated for EFI_PEI_FIRMWARE_VOLUME_INFO2_PPI, then ASSERT().
716 If the EFI_PEI_FIRMWARE_VOLUME_INFO2_PPI can not be installed, then ASSERT().
718 @param FvFormat Unique identifier of the format of the memory-mapped
719 firmware volume. This parameter is optional and
720 may be NULL. If NULL is specified, the
721 EFI_FIRMWARE_FILE_SYSTEM2_GUID format is assumed.
722 @param FvInfo Points to a buffer which allows the
723 EFI_PEI_FIRMWARE_VOLUME_PPI to process the volume.
724 The format of this buffer is specific to the FvFormat.
725 For memory-mapped firmware volumes, this typically
726 points to the first byte of the firmware volume.
727 @param FvInfoSize The size, in bytes, of FvInfo. For memory-mapped
728 firmware volumes, this is typically the size of
730 @param ParentFvName If the new firmware volume originated from a file
731 in a different firmware volume, then this parameter
732 specifies the GUID name of the originating firmware
733 volume. Otherwise, this parameter must be NULL.
734 @param ParentFileName If the new firmware volume originated from a file
735 in a different firmware volume, then this parameter
736 specifies the GUID file name of the originating
737 firmware file. Otherwise, this parameter must be NULL.
738 @param AuthenticationStatus Authentication Status
742 PeiServicesInstallFvInfo2Ppi (
743 IN CONST EFI_GUID
*FvFormat
, OPTIONAL
744 IN CONST VOID
*FvInfo
,
745 IN UINT32 FvInfoSize
,
746 IN CONST EFI_GUID
*ParentFvName
, OPTIONAL
747 IN CONST EFI_GUID
*ParentFileName
, OPTIONAL
748 IN UINT32 AuthenticationStatus
751 InternalPeiServicesInstallFvInfoPpi (FALSE
, FvFormat
, FvInfo
, FvInfoSize
, ParentFvName
, ParentFileName
, AuthenticationStatus
);