]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/Conf/Migration/R8Lib.c
Update Device Path Module to use PCD Feature Flags to determine of the Device Path...
[mirror_edk2.git] / Tools / Conf / Migration / R8Lib.c
index b1494d45202ce2e05225543814a5a108e032690b..def15902d6b154d486548ce079bd1f7d4b3de030 100644 (file)
@@ -1105,3 +1105,46 @@ Returns:
 }\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