[edk2-devel] [PATCH] BaseTools: Add EDKII_DSC_PLATFORM_GUID MACRO

fengyunhua posted 1 patch 1 week ago
Failed in applying to current master (apply log)
BaseTools/Source/Python/AutoGen/GenC.py | 3 +++
1 file changed, 3 insertions(+)

[edk2-devel] [PATCH] BaseTools: Add EDKII_DSC_PLATFORM_GUID MACRO

Posted by fengyunhua 1 week ago
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2969

Add EDKII_DSC_PLATFORM_GUID MACRO

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Signed-off-by: Yunhua Feng <fengyunhua@byosoft.com.cn>
---
 BaseTools/Source/Python/AutoGen/GenC.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/BaseTools/Source/Python/AutoGen/GenC.py b/BaseTools/Source/Python/AutoGen/GenC.py
index 5e0d11e165..5b63d278be 100755
--- a/BaseTools/Source/Python/AutoGen/GenC.py
+++ b/BaseTools/Source/Python/AutoGen/GenC.py
@@ -1980,12 +1980,14 @@ def CreateHeaderCode(Info, AutoGenC, AutoGenH):
         AutoGenH.Append("#include <Library/PcdLib.h>\n")
 
     AutoGenH.Append('\nextern GUID  gEfiCallerIdGuid;')
+    AutoGenH.Append('\nextern GUID  gEdkiiDscPlatformGuid;')
     AutoGenH.Append('\nextern CHAR8 *gEfiCallerBaseName;\n\n')
 
     if Info.IsLibrary:
         return
 
     AutoGenH.Append("#define EFI_CALLER_ID_GUID \\\n  %s\n" % GuidStringToGuidStructureString(Info.Guid))
+    AutoGenH.Append("#define EDKII_DSC_PLATFORM_GUID \\\n %s\n" % GuidStringToGuidStructureString(Info.PlatformInfo.Guid))
 
     if Info.IsLibrary:
         return
@@ -2002,6 +2004,7 @@ def CreateHeaderCode(Info, AutoGenC, AutoGenH):
     # Publish the CallerId Guid
     #
     AutoGenC.Append('\nGLOBAL_REMOVE_IF_UNREFERENCED GUID gEfiCallerIdGuid = %s;\n' % GuidStringToGuidStructureString(Info.Guid))
+    AutoGenC.Append('\nGLOBAL_REMOVE_IF_UNREFERENCED GUID gEdkiiDscPlatformGuid = %s;\n' % GuidStringToGuidStructureString(Info.PlatformInfo.Guid))
     AutoGenC.Append('\nGLOBAL_REMOVE_IF_UNREFERENCED CHAR8 *gEfiCallerBaseName = "%s";\n' % Info.Name)
 
 ## Create common code for header file
-- 
2.27.0.windows.1





-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#66095): https://edk2.groups.io/g/devel/message/66095
Mute This Topic: https://groups.io/mt/77417952/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [edk2-devel] [PATCH] BaseTools: Add EDKII_DSC_PLATFORM_GUID MACRO

Posted by Michael Kubacki 1 week ago
Tested-by: Michael Kubacki <michael.kubacki@microsoft.com>

It looks like you're only putting one space of indentation before the 
GUID is printed on the new line after EDKII_DSC_PLATFORM_GUID and there 
should be two.

#define EDKII_DSC_PLATFORM_GUID \\\n %s

Should be:

#define EDKII_DSC_PLATFORM_GUID \\\n  %s

Two spaces before GUID:
#define EFI_CALLER_ID_GUID \
   {0x1652B3C2, 0xA7A1, 0x46AC, {0xAF, 0x93, 0xDD, 0x6D, 0xEE, 0x44, 
0x66, 0x69}}

One space before GUID:
#define EDKII_DSC_PLATFORM_GUID \
  {0xC29BB610, 0x84F9, 0x448D, {0xA7, 0xDD, 0x5A, 0x04, 0xC5, 0xA5, 
0x4F, 0x52}}

On 10/9/2020 8:07 PM, fengyunhua wrote:
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2969
> 
> Add EDKII_DSC_PLATFORM_GUID MACRO
> 
> Cc: Bob Feng <bob.c.feng@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Signed-off-by: Yunhua Feng <fengyunhua@byosoft.com.cn>
> ---
>   BaseTools/Source/Python/AutoGen/GenC.py | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/BaseTools/Source/Python/AutoGen/GenC.py b/BaseTools/Source/Python/AutoGen/GenC.py
> index 5e0d11e165..5b63d278be 100755
> --- a/BaseTools/Source/Python/AutoGen/GenC.py
> +++ b/BaseTools/Source/Python/AutoGen/GenC.py
> @@ -1980,12 +1980,14 @@ def CreateHeaderCode(Info, AutoGenC, AutoGenH):
>           AutoGenH.Append("#include <Library/PcdLib.h>\n")
>   
>       AutoGenH.Append('\nextern GUID  gEfiCallerIdGuid;')
> +    AutoGenH.Append('\nextern GUID  gEdkiiDscPlatformGuid;')
>       AutoGenH.Append('\nextern CHAR8 *gEfiCallerBaseName;\n\n')
>   
>       if Info.IsLibrary:
>           return
>   
>       AutoGenH.Append("#define EFI_CALLER_ID_GUID \\\n  %s\n" % GuidStringToGuidStructureString(Info.Guid))
> +    AutoGenH.Append("#define EDKII_DSC_PLATFORM_GUID \\\n %s\n" % GuidStringToGuidStructureString(Info.PlatformInfo.Guid))
>   
>       if Info.IsLibrary:
>           return
> @@ -2002,6 +2004,7 @@ def CreateHeaderCode(Info, AutoGenC, AutoGenH):
>       # Publish the CallerId Guid
>       #
>       AutoGenC.Append('\nGLOBAL_REMOVE_IF_UNREFERENCED GUID gEfiCallerIdGuid = %s;\n' % GuidStringToGuidStructureString(Info.Guid))
> +    AutoGenC.Append('\nGLOBAL_REMOVE_IF_UNREFERENCED GUID gEdkiiDscPlatformGuid = %s;\n' % GuidStringToGuidStructureString(Info.PlatformInfo.Guid))
>       AutoGenC.Append('\nGLOBAL_REMOVE_IF_UNREFERENCED CHAR8 *gEfiCallerBaseName = "%s";\n' % Info.Name)
>   
>   ## Create common code for header file
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#66109): https://edk2.groups.io/g/devel/message/66109
Mute This Topic: https://groups.io/mt/77417952/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-


回复: [edk2-devel] [PATCH] BaseTools: Add EDKII_DSC_PLATFORM_GUID MACRO

Posted by fengyunhua 1 week ago
I will update it.

Thanks
Yunhua

-----邮件原件-----
发件人: bounce+27952+66109+5049190+8953120@groups.io <bounce+27952+66109+5049190+8953120@groups.io> 代表 Michael Kubacki
发送时间: 2020年10月11日 5:22
收件人: devel@edk2.groups.io; fengyunhua@byosoft.com.cn
抄送: gaoliming@byosoft.com.cn; bob.c.feng@intel.com
主题: Re: [edk2-devel] [PATCH] BaseTools: Add EDKII_DSC_PLATFORM_GUID MACRO

Tested-by: Michael Kubacki <michael.kubacki@microsoft.com>

It looks like you're only putting one space of indentation before the GUID is printed on the new line after EDKII_DSC_PLATFORM_GUID and there should be two.

#define EDKII_DSC_PLATFORM_GUID \\\n %s

Should be:

#define EDKII_DSC_PLATFORM_GUID \\\n  %s

Two spaces before GUID:
#define EFI_CALLER_ID_GUID \
   {0x1652B3C2, 0xA7A1, 0x46AC, {0xAF, 0x93, 0xDD, 0x6D, 0xEE, 0x44, 0x66, 0x69}}

One space before GUID:
#define EDKII_DSC_PLATFORM_GUID \
  {0xC29BB610, 0x84F9, 0x448D, {0xA7, 0xDD, 0x5A, 0x04, 0xC5, 0xA5, 0x4F, 0x52}}

On 10/9/2020 8:07 PM, fengyunhua wrote:
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2969
> 
> Add EDKII_DSC_PLATFORM_GUID MACRO
> 
> Cc: Bob Feng <bob.c.feng@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Signed-off-by: Yunhua Feng <fengyunhua@byosoft.com.cn>
> ---
>   BaseTools/Source/Python/AutoGen/GenC.py | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/BaseTools/Source/Python/AutoGen/GenC.py 
> b/BaseTools/Source/Python/AutoGen/GenC.py
> index 5e0d11e165..5b63d278be 100755
> --- a/BaseTools/Source/Python/AutoGen/GenC.py
> +++ b/BaseTools/Source/Python/AutoGen/GenC.py
> @@ -1980,12 +1980,14 @@ def CreateHeaderCode(Info, AutoGenC, AutoGenH):
>           AutoGenH.Append("#include <Library/PcdLib.h>\n")
>   
>       AutoGenH.Append('\nextern GUID  gEfiCallerIdGuid;')
> +    AutoGenH.Append('\nextern GUID  gEdkiiDscPlatformGuid;')
>       AutoGenH.Append('\nextern CHAR8 *gEfiCallerBaseName;\n\n')
>   
>       if Info.IsLibrary:
>           return
>   
>       AutoGenH.Append("#define EFI_CALLER_ID_GUID \\\n  %s\n" % 
> GuidStringToGuidStructureString(Info.Guid))
> +    AutoGenH.Append("#define EDKII_DSC_PLATFORM_GUID \\\n %s\n" % 
> + GuidStringToGuidStructureString(Info.PlatformInfo.Guid))
>   
>       if Info.IsLibrary:
>           return
> @@ -2002,6 +2004,7 @@ def CreateHeaderCode(Info, AutoGenC, AutoGenH):
>       # Publish the CallerId Guid
>       #
>       AutoGenC.Append('\nGLOBAL_REMOVE_IF_UNREFERENCED GUID 
> gEfiCallerIdGuid = %s;\n' % 
> GuidStringToGuidStructureString(Info.Guid))
> +    AutoGenC.Append('\nGLOBAL_REMOVE_IF_UNREFERENCED GUID 
> + gEdkiiDscPlatformGuid = %s;\n' % 
> + GuidStringToGuidStructureString(Info.PlatformInfo.Guid))
>       AutoGenC.Append('\nGLOBAL_REMOVE_IF_UNREFERENCED CHAR8 
> *gEfiCallerBaseName = "%s";\n' % Info.Name)
>   
>   ## Create common code for header file
> 









-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#66172): https://edk2.groups.io/g/devel/message/66172
Mute This Topic: https://groups.io/mt/77479655/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [edk2-devel] [PATCH] BaseTools: Add EDKII_DSC_PLATFORM_GUID MACRO

Posted by Bob Feng 1 week ago
Yunhua, Please complete the description sentence, for example "Add EDKII_DSC_PLATFORM_GUID MACRO to AutoGen.h and AutoGen.c".

After changing the description, Reviewed-by: Bob Feng <bob.c.feng@intel.com>

-----Original Message-----
From: fengyunhua <fengyunhua@byosoft.com.cn> 
Sent: Saturday, October 10, 2020 11:07 AM
To: devel@edk2.groups.io
Cc: gaoliming@byosoft.com.cn; Feng, Bob C <bob.c.feng@intel.com>
Subject: [PATCH] BaseTools: Add EDKII_DSC_PLATFORM_GUID MACRO

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2969

Add EDKII_DSC_PLATFORM_GUID MACRO

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Signed-off-by: Yunhua Feng <fengyunhua@byosoft.com.cn>
---
 BaseTools/Source/Python/AutoGen/GenC.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/BaseTools/Source/Python/AutoGen/GenC.py b/BaseTools/Source/Python/AutoGen/GenC.py
index 5e0d11e165..5b63d278be 100755
--- a/BaseTools/Source/Python/AutoGen/GenC.py
+++ b/BaseTools/Source/Python/AutoGen/GenC.py
@@ -1980,12 +1980,14 @@ def CreateHeaderCode(Info, AutoGenC, AutoGenH):
         AutoGenH.Append("#include <Library/PcdLib.h>\n")
 
     AutoGenH.Append('\nextern GUID  gEfiCallerIdGuid;')
+    AutoGenH.Append('\nextern GUID  gEdkiiDscPlatformGuid;')
     AutoGenH.Append('\nextern CHAR8 *gEfiCallerBaseName;\n\n')
 
     if Info.IsLibrary:
         return
 
     AutoGenH.Append("#define EFI_CALLER_ID_GUID \\\n  %s\n" % GuidStringToGuidStructureString(Info.Guid))
+    AutoGenH.Append("#define EDKII_DSC_PLATFORM_GUID \\\n %s\n" % GuidStringToGuidStructureString(Info.PlatformInfo.Guid))
 
     if Info.IsLibrary:
         return
@@ -2002,6 +2004,7 @@ def CreateHeaderCode(Info, AutoGenC, AutoGenH):
     # Publish the CallerId Guid
     #
     AutoGenC.Append('\nGLOBAL_REMOVE_IF_UNREFERENCED GUID gEfiCallerIdGuid = %s;\n' % GuidStringToGuidStructureString(Info.Guid))
+    AutoGenC.Append('\nGLOBAL_REMOVE_IF_UNREFERENCED GUID gEdkiiDscPlatformGuid = %s;\n' % GuidStringToGuidStructureString(Info.PlatformInfo.Guid))
     AutoGenC.Append('\nGLOBAL_REMOVE_IF_UNREFERENCED CHAR8 *gEfiCallerBaseName = "%s";\n' % Info.Name)
 
 ## Create common code for header file
-- 
2.27.0.windows.1





-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#66098): https://edk2.groups.io/g/devel/message/66098
Mute This Topic: https://groups.io/mt/77417952/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-