EFI_STATUS Status;\r
VOID *HobList;\r
\r
- Status = PeiCoreGetHobList (&HobList);\r
+ Status = PeiServicesGetHobList (&HobList);\r
ASSERT_EFI_ERROR (Status);\r
ASSERT (HobList != NULL);\r
\r
EFI_STATUS Status;\r
VOID *Hob;\r
\r
- Status = PeiCoreCreateHob (Type, Length, &Hob);\r
+ Status = PeiServicesCreateHob (Type, Length, &Hob);\r
//\r
// Assume the process of HOB building is always successful.\r
//\r
for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.\r
If Guid is NULL, then ASSERT().\r
If there is no additional space for HOB creation, then ASSERT().\r
- If DataLength > (0x10000 - sizeof (EFI_HOB_TYPE_GUID)), then ASSERT().\r
+ If DataLength >= (0x10000 - sizeof (EFI_HOB_GUID_TYPE)), then ASSERT().\r
\r
@param Guid The GUID to tag the customized HOB.\r
@param DataLength The size of the data payload for the GUID HOB.\r
If Guid is NULL, then ASSERT().\r
If Data is NULL and DataLength > 0, then ASSERT().\r
If there is no additional space for HOB creation, then ASSERT().\r
- If DataLength > (0x10000 - sizeof (EFI_HOB_TYPE_GUID)), then ASSERT().\r
+ If DataLength >= (0x10000 - sizeof (EFI_HOB_GUID_TYPE)), then ASSERT().\r
\r
@param Guid The GUID to tag the customized HOB.\r
@param Data The data to be copied into the data field of the GUID HOB.\r
{\r
VOID *HobData;\r
\r
+ ASSERT (Data != NULL || DataLength == 0);\r
+\r
HobData = BuildGuidHob (Guid, DataLength);\r
\r
return CopyMem (HobData, Data, DataLength);\r