]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Add migration rule for Build Guid Hob.
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 11 Sep 2006 13:49:03 +0000 (13:49 +0000)
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 11 Sep 2006 13:49:03 +0000 (13:49 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1513 6f19259b-4bc3-4df7-8a09-765794883524

Tools/Conf/Migration/Library.csv
Tools/Conf/Migration/R8Lib.c
Tools/Source/MigrationTools/org/tianocore/migration/SourceFileReplacer.java

index 045a3cfad000033fbad76b5fbd5b70c940f9b5c4..f1b30c9574a2223c03d2c9b352f390dde4cbd39d 100644 (file)
@@ -159,7 +159,7 @@ PeiLib,LShiftU64,LShiftU64,BaseLib,MdePkg
 PeiLib,MultU64x32,MultU64x32,BaseLib,MdePkg\r
 PeiLib,PeiBuildHobModule,BuildModuleHob#%,HobLib,MdePkg\r
 PeiLib,PeiBuildHobResourceDescriptor,BuildResourceDescriptorHob#%,HobLib,MdePkg\r
-PeiLib,PeiBuildHobGuid,BuildGuidHob#%,HobLib,MdePkg\r
+PeiLib,PeiBuildHobGuid,R8_PeiBuildHobGuid#%,%,MdePkg\r
 PeiLib,PeiBuildHobGuidData,BuildGuidDataHob#%,HobLib,MdePkg\r
 PeiLib,PeiBuildHobFv,BuildFvHob#%,HobLib,MdePkg\r
 PeiLib,PeiBuildHobCpu,BuildCpuHob#%,HobLib,MdePkg\r
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
index 2f2579e64e096b9a790ff3adae12c8eaafe5471b..678dbcb275d8acf5888052faa735679e4e1b8777 100644 (file)
@@ -35,6 +35,7 @@ public final class SourceFileReplacer implements Common.ForDoAll {
         "BuildResourceDescriptorHob",\r
         "BuildFvHob",\r
         "BuildCpuHob",\r
+        "BuildGuidDataHob",\r
         "BuildStackHob",\r
         "BuildBspStoreHob",\r
         "BuildMemoryAllocationHob"\r