diff options
author | klu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-09-28 08:08:32 +0000 |
---|---|---|
committer | klu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-09-28 08:08:32 +0000 |
commit | 64253026df2cc1538eb05c9dc2a5403e54ae1af2 (patch) | |
tree | 1d3e4182b02334649424686f7351319a0a257ffa /MdeModulePkg/Core/DxeIplPeim/DxeLoad.c | |
parent | 04748716cba9208352e1e82361a2a5bacc389fcc (diff) | |
download | edk2-platforms-64253026df2cc1538eb05c9dc2a5403e54ae1af2.tar.xz |
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
Diffstat (limited to 'MdeModulePkg/Core/DxeIplPeim/DxeLoad.c')
-rw-r--r-- | MdeModulePkg/Core/DxeIplPeim/DxeLoad.c | 40 |
1 files changed, 5 insertions, 35 deletions
diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c b/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c index 139174e649..a81475484f 100644 --- a/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c +++ b/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c @@ -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)
+ &(((EFI_FFS_FILE_HEADER*)FileHandle)->Name)
);
- CopyMem (
- &FvInfoPpi->ParentFileName,
- &(((EFI_FFS_FILE_HEADER*)FileHandle)->Name),
- sizeof (EFI_GUID)
- );
-
- 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);
//
|