mirror of https://github.com/acidanthera/audk.git
Allow DXE dispatcher to ignore EFI_FV_FILETYPE_FIRMWARE_VOLUME_IMAGE type FFS file found in EFI_HOB_FIRMWARE_VOLUME2 HOB.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3694 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
07ad9b81e3
commit
bbc0f1bb24
|
@ -786,6 +786,59 @@ Returns:
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
STATIC
|
||||||
|
BOOLEAN
|
||||||
|
FvFoundInHobFv2 (
|
||||||
|
IN EFI_HANDLE FvHandle,
|
||||||
|
IN CONST EFI_GUID *DriverName
|
||||||
|
)
|
||||||
|
/*++
|
||||||
|
|
||||||
|
Routine Description:
|
||||||
|
|
||||||
|
Check if a FV Image type file (EFI_FV_FILETYPE_FIRMWARE_VOLUME_IMAGE) is
|
||||||
|
described by a EFI_HOB_FIRMWARE_VOLUME2 Hob.
|
||||||
|
|
||||||
|
Arguments:
|
||||||
|
|
||||||
|
FvHandle - The handle which FVB protocol installed on.
|
||||||
|
DriverName - The driver guid specified.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
TRUE - This file is found in a EFI_HOB_FIRMWARE_VOLUME2 Hob.
|
||||||
|
|
||||||
|
FALSE - Not found.
|
||||||
|
|
||||||
|
|
||||||
|
--*/
|
||||||
|
{
|
||||||
|
EFI_PEI_HOB_POINTERS HobFv2;
|
||||||
|
EFI_STATUS Status;
|
||||||
|
EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *Fvb;
|
||||||
|
EFI_FIRMWARE_VOLUME_HEADER *FvHeader;
|
||||||
|
EFI_PHYSICAL_ADDRESS FvHeaderAddr;
|
||||||
|
|
||||||
|
HobFv2.Raw = GetHobList ();
|
||||||
|
|
||||||
|
while ((HobFv2.Raw = GetNextHob (EFI_HOB_TYPE_FV2, HobFv2.Raw)) != NULL) {
|
||||||
|
if (CompareGuid (DriverName, &HobFv2.FirmwareVolume2->FileName)) {
|
||||||
|
Status = CoreHandleProtocol (FvHandle, &gEfiFirmwareVolumeBlockProtocolGuid, &Fvb);
|
||||||
|
if (!EFI_ERROR (Status)) {
|
||||||
|
Status = Fvb->GetPhysicalAddress (Fvb, &FvHeaderAddr);
|
||||||
|
if (!EFI_ERROR (Status)) {
|
||||||
|
FvHeader = (EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) FvHeaderAddr;
|
||||||
|
if (CompareGuid (&FvHeader->FileSystemGuid, &HobFv2.FirmwareVolume2->FvName)) {
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
HobFv2.Raw = GET_NEXT_HOB (HobFv2);
|
||||||
|
}
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
|
@ -1038,6 +1091,14 @@ Returns:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (Type == EFI_FV_FILETYPE_FIRMWARE_VOLUME_IMAGE) {
|
} else if (Type == EFI_FV_FILETYPE_FIRMWARE_VOLUME_IMAGE) {
|
||||||
|
//
|
||||||
|
// Check if this EFI_FV_FILETYPE_FIRMWARE_VOLUME_IMAGE file has already
|
||||||
|
// been extracted.
|
||||||
|
//
|
||||||
|
if (FvFoundInHobFv2 (FvHandle, &NameGuid)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Found a firmware volume image. Produce a firmware volume block
|
// Found a firmware volume image. Produce a firmware volume block
|
||||||
// protocol for it so it gets dispatched from. This is usually a
|
// protocol for it so it gets dispatched from. This is usually a
|
||||||
|
|
Loading…
Reference in New Issue