From: qhuang8 Date: Mon, 11 Sep 2006 13:49:03 +0000 (+0000) Subject: Add migration rule for Build Guid Hob. X-Git-Tag: edk2-stable201903~24361 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=733d48fec311a0ce1c6b8ba1b53506a84d9e276a Add migration rule for Build Guid Hob. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1513 6f19259b-4bc3-4df7-8a09-765794883524 --- diff --git a/Tools/Conf/Migration/Library.csv b/Tools/Conf/Migration/Library.csv index 045a3cfad0..f1b30c9574 100644 --- a/Tools/Conf/Migration/Library.csv +++ b/Tools/Conf/Migration/Library.csv @@ -159,7 +159,7 @@ PeiLib,LShiftU64,LShiftU64,BaseLib,MdePkg PeiLib,MultU64x32,MultU64x32,BaseLib,MdePkg PeiLib,PeiBuildHobModule,BuildModuleHob#%,HobLib,MdePkg PeiLib,PeiBuildHobResourceDescriptor,BuildResourceDescriptorHob#%,HobLib,MdePkg -PeiLib,PeiBuildHobGuid,BuildGuidHob#%,HobLib,MdePkg +PeiLib,PeiBuildHobGuid,R8_PeiBuildHobGuid#%,%,MdePkg PeiLib,PeiBuildHobGuidData,BuildGuidDataHob#%,HobLib,MdePkg PeiLib,PeiBuildHobFv,BuildFvHob#%,HobLib,MdePkg PeiLib,PeiBuildHobCpu,BuildCpuHob#%,HobLib,MdePkg diff --git a/Tools/Conf/Migration/R8Lib.c b/Tools/Conf/Migration/R8Lib.c index b1494d4520..def15902d6 100644 --- a/Tools/Conf/Migration/R8Lib.c +++ b/Tools/Conf/Migration/R8Lib.c @@ -1105,3 +1105,46 @@ Returns: } ////~ +////#HobLib +EFI_STATUS +R8_PeiBuildHobGuid ( + IN EFI_GUID *Guid, + IN UINTN DataLength, + OUT VOID **Hob + ) +/*++ + +Routine Description: + + Builds a custom HOB that is tagged with a GUID for identification + +Arguments: + + Guid - The GUID of the custome HOB type + DataLength - The size of the data payload for the GUIDed HOB + Hob - Pointer to pointer to the created Hob + +Returns: + + EFI_SUCCESS - Hob is successfully built. + Others - Errors occur while creating new Hob + +--*/ +{ + // + // Porting Guide: Apply the new interface of BuildGuidHob in R9 HobLib. + // Pay attention that the return value has been changed to the start address of + // GUID HOB data so that caller can fill the customized data. + // For BuildGuidHob (), the HOB Header and Name field is already stripped.. + // + VOID *HobData; + + HobData = BuildGuidHob (Guid, DataLength); + // + // This step is necessary to be compatible with R8 interface! + // + *Hob = (VOID *) ((UINT8 *) HobData - sizeof (EFI_HOB_GUID_TYPE)); + + return EFI_SUCCESS; +} +////~ diff --git a/Tools/Source/MigrationTools/org/tianocore/migration/SourceFileReplacer.java b/Tools/Source/MigrationTools/org/tianocore/migration/SourceFileReplacer.java index 2f2579e64e..678dbcb275 100644 --- a/Tools/Source/MigrationTools/org/tianocore/migration/SourceFileReplacer.java +++ b/Tools/Source/MigrationTools/org/tianocore/migration/SourceFileReplacer.java @@ -35,6 +35,7 @@ public final class SourceFileReplacer implements Common.ForDoAll { "BuildResourceDescriptorHob", "BuildFvHob", "BuildCpuHob", + "BuildGuidDataHob", "BuildStackHob", "BuildBspStoreHob", "BuildMemoryAllocationHob"