/* Check if a FV Image type file (EFI_FV_FILETYPE_FIRMWARE_VOLUME_IMAGE) is described by a EFI_HOB_FIRMWARE_VOLUME2 Hob. */
BOOLEAN FvFoundInHobFv2(IN CONST EFI_GUID *FvNameGuid, IN CONST EFI_GUID *DriverName)
/* Check if a FV Image type file (EFI_FV_FILETYPE_FIRMWARE_VOLUME_IMAGE) is described by a EFI_HOB_FIRMWARE_VOLUME2 Hob. */
BOOLEAN FvFoundInHobFv2(IN CONST EFI_GUID *FvNameGuid, IN CONST EFI_GUID *DriverName)
{
  EFI_PEI_HOB_POINTERS  HobFv2;
  HobFv2.Raw = GetHobList ();
  while ((HobFv2.Raw = GetNextHob (EFI_HOB_TYPE_FV2, HobFv2.Raw)) != NULL) {
    if (CompareGuid (DriverName, &HobFv2.FirmwareVolume2->FileName) &&
        CompareGuid (FvNameGuid, &HobFv2.FirmwareVolume2->FvName))
    {
      return TRUE;
    }
    HobFv2.Raw = GET_NEXT_HOB (HobFv2);
  }
  return FALSE;
}