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 045a3cf..f1b30c9 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,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
 PeiLib,PeiBuildHobGuidData,BuildGuidDataHob#%,HobLib,MdePkg\r
 PeiLib,PeiBuildHobFv,BuildFvHob#%,HobLib,MdePkg\r
 PeiLib,PeiBuildHobCpu,BuildCpuHob#%,HobLib,MdePkg\r
index b1494d4..def1590 100644 (file)
@@ -1105,3 +1105,46 @@ Returns:
 }\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
index 2f2579e..678dbcb 100644 (file)
@@ -35,6 +35,7 @@ public final class SourceFileReplacer implements Common.ForDoAll {
         "BuildResourceDescriptorHob",\r
         "BuildFvHob",\r
         "BuildCpuHob",\r
         "BuildResourceDescriptorHob",\r
         "BuildFvHob",\r
         "BuildCpuHob",\r
+        "BuildGuidDataHob",\r
         "BuildStackHob",\r
         "BuildBspStoreHob",\r
         "BuildMemoryAllocationHob"\r
         "BuildStackHob",\r
         "BuildBspStoreHob",\r
         "BuildMemoryAllocationHob"\r