mirror of https://github.com/acidanthera/audk.git
Use PeiPiLib's PeiPiLibBuildPiFvInfoPpi interface instead of installing EFI_PEI_FIRMWARE_VOLUME_INFO_PPI by self.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3964 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
04748716cb
commit
64253026df
|
@ -52,6 +52,7 @@ Abstract:
|
|||
#include <Library/PeCoffLib.h>
|
||||
#include <Library/S3Lib.h>
|
||||
#include <Library/RecoveryLib.h>
|
||||
#include <Library/PeiPiLib.h>
|
||||
|
||||
#define STACK_SIZE 0x20000
|
||||
#define BSP_STORE_SIZE 0x4000
|
||||
|
|
|
@ -77,6 +77,7 @@
|
|||
DebugLib
|
||||
S3Lib
|
||||
RecoveryLib
|
||||
PeiPiLib
|
||||
|
||||
[Protocols]
|
||||
gEfiCustomizedDecompressProtocolGuid # PROTOCOL SOMETIMES_PRODUCED
|
||||
|
|
|
@ -74,14 +74,6 @@ static EFI_PEI_PPI_DESCRIPTOR mPpiSignal = {
|
|||
NULL
|
||||
};
|
||||
|
||||
STATIC EFI_PEI_FIRMWARE_VOLUME_INFO_PPI mFvInfoPpiTemplate = {
|
||||
EFI_FIRMWARE_FILE_SYSTEM2_GUID,
|
||||
NULL,
|
||||
0, //FvInfoSize
|
||||
NULL, //ParentFvName
|
||||
NULL //ParentFileName;
|
||||
};
|
||||
|
||||
/**
|
||||
Initializes the Dxe Ipl PPI
|
||||
|
||||
|
@ -327,8 +319,6 @@ DxeIplAddEncapsulatedFirmwareVolumes (
|
|||
EFI_FIRMWARE_VOLUME_IMAGE_SECTION *SectionHeader;
|
||||
VOID *DstBuffer;
|
||||
UINT32 FvAlignment;
|
||||
EFI_PEI_FIRMWARE_VOLUME_INFO_PPI *FvInfoPpi;
|
||||
EFI_PEI_PPI_DESCRIPTOR *FvInfoPpiDescriptor;
|
||||
|
||||
Status = EFI_NOT_FOUND;
|
||||
Index = 0;
|
||||
|
@ -378,33 +368,13 @@ DxeIplAddEncapsulatedFirmwareVolumes (
|
|||
//
|
||||
PeiServicesFfsGetVolumeInfo (&VolumeHandle, &VolumeInfo);
|
||||
|
||||
//
|
||||
// Prepare to install FirmwareVolumeInfo PPI to expose new FV to PeiCore.
|
||||
//
|
||||
FvInfoPpi = AllocateCopyPool (sizeof (EFI_PEI_FIRMWARE_VOLUME_INFO_PPI), &mFvInfoPpiTemplate);
|
||||
ASSERT(FvInfoPpi != NULL);
|
||||
|
||||
FvInfoPpi->FvInfo = (VOID*)FvHeader;
|
||||
FvInfoPpi->FvInfoSize = (UINT32)FvHeader->FvLength;
|
||||
CopyMem (
|
||||
&FvInfoPpi->ParentFvName,
|
||||
PeiPiLibBuildPiFvInfoPpi (
|
||||
(EFI_PHYSICAL_ADDRESS) FvHeader,
|
||||
FvHeader->FvLength,
|
||||
&(VolumeInfo.FvName),
|
||||
sizeof (EFI_GUID)
|
||||
);
|
||||
CopyMem (
|
||||
&FvInfoPpi->ParentFileName,
|
||||
&(((EFI_FFS_FILE_HEADER*)FileHandle)->Name),
|
||||
sizeof (EFI_GUID)
|
||||
&(((EFI_FFS_FILE_HEADER*)FileHandle)->Name)
|
||||
);
|
||||
|
||||
FvInfoPpiDescriptor = AllocatePool (sizeof(EFI_PEI_PPI_DESCRIPTOR));
|
||||
ASSERT (FvInfoPpiDescriptor != NULL);
|
||||
|
||||
FvInfoPpiDescriptor->Flags = EFI_PEI_PPI_DESCRIPTOR_PPI|EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST;
|
||||
FvInfoPpiDescriptor->Guid = &gEfiPeiFirmwareVolumeInfoPpiGuid;
|
||||
FvInfoPpiDescriptor->Ppi = (VOID *) FvInfoPpi;
|
||||
|
||||
Status = PeiServicesInstallPpi (FvInfoPpiDescriptor);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue