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 | |
parent | 04748716cba9208352e1e82361a2a5bacc389fcc (diff) | |
download | edk2-64253026df2cc1538eb05c9dc2a5403e54ae1af2.zip edk2-64253026df2cc1538eb05c9dc2a5403e54ae1af2.tar.gz edk2-64253026df2cc1538eb05c9dc2a5403e54ae1af2.tar.bz2 |
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')
-rw-r--r-- | MdeModulePkg/Core/DxeIplPeim/DxeIpl.h | 1 | ||||
-rw-r--r-- | MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf | 1 | ||||
-rw-r--r-- | MdeModulePkg/Core/DxeIplPeim/DxeLoad.c | 40 |
3 files changed, 7 insertions, 35 deletions
diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.h b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.h index 9df5745..71ca9c3 100644 --- a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.h +++ b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.h @@ -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
diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf index ab2dc6b..3267a8c 100644 --- a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf +++ b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf @@ -77,6 +77,7 @@ DebugLib
S3Lib
RecoveryLib
+ PeiPiLib
[Protocols]
gEfiCustomizedDecompressProtocolGuid # PROTOCOL SOMETIMES_PRODUCED
diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c b/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c index 139174e..a814754 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);
//
|