/* If Guid is NULL, then ASSERT(). If there is no additional space for HOB creation, then ASSERT(). If DataLength > (0xFFF8 - sizeof (EFI_HOB_GUID_TYPE)), then ASSERT(). HobLength is UINT16 and multiples of 8 bytes, so the max HobLength is 0xFFF8. */
VOID* EFIAPI BuildGuidHob(IN CONST EFI_GUID *Guid, IN UINTN DataLength)
/* If Guid is NULL, then ASSERT(). If there is no additional space for HOB creation, then ASSERT(). If DataLength > (0xFFF8 - sizeof (EFI_HOB_GUID_TYPE)), then ASSERT(). HobLength is UINT16 and multiples of 8 bytes, so the max HobLength is 0xFFF8. */
VOID* EFIAPI BuildGuidHob(IN CONST EFI_GUID *Guid, IN UINTN DataLength)
{
  EFI_HOB_GUID_TYPE  *Hob;
  ASSERT (Guid != NULL);
  ASSERT (DataLength <= (0xFFF8 - sizeof (EFI_HOB_GUID_TYPE)));
  Hob = InternalPeiCreateHob (EFI_HOB_TYPE_GUID_EXTENSION, (UINT16)(sizeof (EFI_HOB_GUID_TYPE) + DataLength));
  if (Hob == NULL) {
    return Hob;
  }
  CopyGuid (&Hob->Name, Guid);
  return Hob + 1;
}