/* If there is no additional space for HOB creation, then ASSERT(). If the FvImage buffer is not at its required alignment, then ASSERT(). */
VOID EFIAPI BuildFv2Hob(IN EFI_PHYSICAL_ADDRESS BaseAddress, IN UINT64 Length, IN CONST EFI_GUID *FvName, IN CONST EFI_GUID *FileName)
/* If there is no additional space for HOB creation, then ASSERT(). If the FvImage buffer is not at its required alignment, then ASSERT(). */
VOID EFIAPI BuildFv2Hob(IN EFI_PHYSICAL_ADDRESS BaseAddress, IN UINT64 Length, IN CONST EFI_GUID *FvName, IN CONST EFI_GUID *FileName)
{
  EFI_HOB_FIRMWARE_VOLUME2  *Hob;
  if (!InternalCheckFvAlignment (BaseAddress, Length)) {
    ASSERT (FALSE);
    return;
  }
  Hob = InternalPeiCreateHob (EFI_HOB_TYPE_FV2, (UINT16)sizeof (EFI_HOB_FIRMWARE_VOLUME2));
  if (Hob == NULL) {
    return;
  }
  Hob->BaseAddress = BaseAddress;
  Hob->Length      = Length;
  CopyGuid (&Hob->FvName, FvName);
  CopyGuid (&Hob->FileName, FileName);
}