Fix the bug in PeiServicesInstallFvInfoPpi() implementation that can't set the reliable ParentFvName and ParentFileName when install FvInfo PPI.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9255 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
lgao4 2009-09-10 08:24:05 +00:00
parent ed5ac057bf
commit 3831f3e9a9
1 changed files with 15 additions and 4 deletions

View File

@ -553,9 +553,13 @@ PeiServicesInstallFvInfoPpi (
EFI_STATUS Status;
EFI_PEI_FIRMWARE_VOLUME_INFO_PPI *FvInfoPpi;
EFI_PEI_PPI_DESCRIPTOR *FvInfoPpiDescriptor;
EFI_GUID *ParentFvNameValue;
EFI_GUID *ParentFileNameValue;
ParentFvNameValue = NULL;
ParentFileNameValue = NULL;
FvInfoPpi = AllocateZeroPool (sizeof (EFI_PEI_FIRMWARE_VOLUME_INFO_PPI));
ASSERT( FvInfoPpi != NULL);
ASSERT(FvInfoPpi != NULL);
if (FvFormat != NULL) {
CopyGuid (&FvInfoPpi->FvFormat, FvFormat);
@ -564,9 +568,16 @@ PeiServicesInstallFvInfoPpi (
}
FvInfoPpi->FvInfo = (VOID *) FvInfo;
FvInfoPpi->FvInfoSize = FvInfoSize;
FvInfoPpi->ParentFvName = (EFI_GUID *) ParentFvName;
FvInfoPpi->ParentFileName = (EFI_GUID *) ParentFileName;
if (ParentFvName != NULL) {
ParentFvNameValue = AllocateCopyPool (sizeof (EFI_GUID), ParentFvName);
ASSERT (ParentFvNameValue != NULL);
FvInfoPpi->ParentFvName = ParentFvNameValue;
}
if (ParentFileName != NULL) {
ParentFileNameValue = AllocateCopyPool (sizeof (EFI_GUID), ParentFileName);
ASSERT (ParentFileNameValue != NULL);
FvInfoPpi->ParentFileName = ParentFileNameValue;
}
FvInfoPpiDescriptor = AllocateCopyPool (sizeof(EFI_PEI_PPI_DESCRIPTOR), mPpiListTemplate);
ASSERT (FvInfoPpiDescriptor != NULL);