}\r
\r
GuidHob.Raw = GetNextGuidHob (Guid, *HobStart);\r
- if (GuidHob == NULL) {\r
+ if (GuidHob.Raw == NULL) {\r
return EFI_NOT_FOUND;\r
}\r
\r
}\r
////~\r
\r
+////#HobLib\r
+EFI_STATUS\r
+R8_PeiBuildHobGuid (\r
+ IN EFI_GUID *Guid,\r
+ IN UINTN DataLength,\r
+ OUT VOID **Hob\r
+ )\r
+/*++\r
+\r
+Routine Description:\r
+\r
+ Builds a custom HOB that is tagged with a GUID for identification\r
+\r
+Arguments:\r
+\r
+ Guid - The GUID of the custome HOB type\r
+ DataLength - The size of the data payload for the GUIDed HOB\r
+ Hob - Pointer to pointer to the created Hob\r
+\r
+Returns:\r
+\r
+ EFI_SUCCESS - Hob is successfully built.\r
+ Others - Errors occur while creating new Hob\r
+\r
+--*/\r
+{\r
+ //\r
+ // Porting Guide: Apply the new interface of BuildGuidHob in R9 HobLib.\r
+ // Pay attention that the return value has been changed to the start address of\r
+ // GUID HOB data so that caller can fill the customized data. \r
+ // For BuildGuidHob (), the HOB Header and Name field is already stripped..\r
+ //\r
+ VOID *HobData; \r
+\r
+ HobData = BuildGuidHob (Guid, DataLength);\r
+ //\r
+ // This step is necessary to be compatible with R8 interface!\r
+ //\r
+ *Hob = (VOID *) ((UINT8 *) HobData - sizeof (EFI_HOB_GUID_TYPE)); \r
+\r
+ return EFI_SUCCESS; \r
+}\r
+////~\r