[edk2-devel] [PATCH] UefiPayloadPkg: Fix the warning when building UefiPayloadPkg with IA32+X64

duntan posted 1 patch 2 years, 6 months ago
Failed in applying to current master (apply log)
UefiPayloadPkg/UefiPayloadPkg.dsc | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
[edk2-devel] [PATCH] UefiPayloadPkg: Fix the warning when building UefiPayloadPkg with IA32+X64
Posted by duntan 2 years, 6 months ago
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3603

Move the unspecified PCDs from .common section. to .X64 section in .dsc file.
The corresponding PCDs are not used in IA32.

Cc: Guo Dong <guo.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Maurice Ma <maurice.ma@intel.com>
Cc: Benjamin You <benjamin.you@intel.com>

Signed-off-by: Dun Tan <dun.tan@intel.com>
---
 UefiPayloadPkg/UefiPayloadPkg.dsc | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b/UefiPayloadPkg/UefiPayloadPkg.dsc
index 9912f2a20f..9d7f311343 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.dsc
+++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
@@ -327,6 +327,11 @@
   gEfiSourceLevelDebugPkgTokenSpaceGuid.PcdDebugLoadImageMethod|0x2
 !endif
 
+[PcdsPatchableInModule.X64]
+  gPcAtChipsetPkgTokenSpaceGuid.PcdRtcIndexRegister|$(RTC_INDEX_REGISTER)
+  gPcAtChipsetPkgTokenSpaceGuid.PcdRtcTargetRegister|$(RTC_TARGET_REGISTER)
+  gEfiNetworkPkgTokenSpaceGuid.PcdAllowHttpConnections|TRUE
+
 [PcdsPatchableInModule.common]
   gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile|{ 0x21, 0xaa, 0x2c, 0x46, 0x14, 0x76, 0x03, 0x45, 0x83, 0x6e, 0x8a, 0xb6, 0xf4, 0x66, 0x23, 0x31 }
   gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x7
@@ -337,8 +342,6 @@
   gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x2F
 !endif
   gEfiMdeModulePkgTokenSpaceGuid.PcdMaxSizeNonPopulateCapsule|$(MAX_SIZE_NON_POPULATE_CAPSULE)
-  gPcAtChipsetPkgTokenSpaceGuid.PcdRtcIndexRegister|$(RTC_INDEX_REGISTER)
-  gPcAtChipsetPkgTokenSpaceGuid.PcdRtcTargetRegister|$(RTC_TARGET_REGISTER)
   #
   # The following parameters are set by Library/PlatformHookLib
   #
@@ -361,7 +364,6 @@
 
   gUefiCpuPkgTokenSpaceGuid.PcdCpuMaxLogicalProcessorNumber|$(MAX_LOGICAL_PROCESSORS)
   gUefiCpuPkgTokenSpaceGuid.PcdCpuNumberOfReservedVariableMtrrs|0
-  gEfiNetworkPkgTokenSpaceGuid.PcdAllowHttpConnections|TRUE
 
 ################################################################################
 #
-- 
2.31.1.windows.1



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


Re: [edk2-devel] [PATCH] UefiPayloadPkg: Fix the warning when building UefiPayloadPkg with IA32+X64
Posted by Ni, Ray 2 years, 6 months ago
Dun,
I am curious, why ' gEfiMdeModulePkgTokenSpaceGuid.PcdAriSupport' doesn't cause build warning?
It is referenced by "MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf" under "[Components.X64]".

Thanks,
Ray

> -----Original Message-----
> From: Tan, Dun <dun.tan@intel.com>
> Sent: Tuesday, September 14, 2021 3:39 PM
> To: devel@edk2.groups.io
> Cc: Dong, Guo <guo.dong@intel.com>; Ni, Ray <ray.ni@intel.com>; Ma, Maurice <maurice.ma@intel.com>; You, Benjamin
> <benjamin.you@intel.com>
> Subject: [PATCH] UefiPayloadPkg: Fix the warning when building UefiPayloadPkg with IA32+X64
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3603
> 
> Move the unspecified PCDs from .common section. to .X64 section in .dsc file.
> The corresponding PCDs are not used in IA32.
> 
> Cc: Guo Dong <guo.dong@intel.com>
> Cc: Ray Ni <ray.ni@intel.com>
> Cc: Maurice Ma <maurice.ma@intel.com>
> Cc: Benjamin You <benjamin.you@intel.com>
> 
> Signed-off-by: Dun Tan <dun.tan@intel.com>
> ---
>  UefiPayloadPkg/UefiPayloadPkg.dsc | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b/UefiPayloadPkg/UefiPayloadPkg.dsc
> index 9912f2a20f..9d7f311343 100644
> --- a/UefiPayloadPkg/UefiPayloadPkg.dsc
> +++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
> @@ -327,6 +327,11 @@
>    gEfiSourceLevelDebugPkgTokenSpaceGuid.PcdDebugLoadImageMethod|0x2
>  !endif
> 
> +[PcdsPatchableInModule.X64]
> +  gPcAtChipsetPkgTokenSpaceGuid.PcdRtcIndexRegister|$(RTC_INDEX_REGISTER)
> +  gPcAtChipsetPkgTokenSpaceGuid.PcdRtcTargetRegister|$(RTC_TARGET_REGISTER)
> +  gEfiNetworkPkgTokenSpaceGuid.PcdAllowHttpConnections|TRUE
> +
>  [PcdsPatchableInModule.common]
>    gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile|{ 0x21, 0xaa, 0x2c, 0x46, 0x14, 0x76, 0x03, 0x45, 0x83, 0x6e,
> 0x8a, 0xb6, 0xf4, 0x66, 0x23, 0x31 }
>    gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x7
> @@ -337,8 +342,6 @@
>    gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x2F
>  !endif
>    gEfiMdeModulePkgTokenSpaceGuid.PcdMaxSizeNonPopulateCapsule|$(MAX_SIZE_NON_POPULATE_CAPSULE)
> -  gPcAtChipsetPkgTokenSpaceGuid.PcdRtcIndexRegister|$(RTC_INDEX_REGISTER)
> -  gPcAtChipsetPkgTokenSpaceGuid.PcdRtcTargetRegister|$(RTC_TARGET_REGISTER)
>    #
>    # The following parameters are set by Library/PlatformHookLib
>    #
> @@ -361,7 +364,6 @@
> 
>    gUefiCpuPkgTokenSpaceGuid.PcdCpuMaxLogicalProcessorNumber|$(MAX_LOGICAL_PROCESSORS)
>    gUefiCpuPkgTokenSpaceGuid.PcdCpuNumberOfReservedVariableMtrrs|0
> -  gEfiNetworkPkgTokenSpaceGuid.PcdAllowHttpConnections|TRUE
> 
>  ################################################################################
>  #
> --
> 2.31.1.windows.1



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


Re: [edk2-devel] [PATCH] UefiPayloadPkg: Fix the warning when building UefiPayloadPkg with IA32+X64
Posted by duntan 2 years, 6 months ago
Hi Ray,

There are only "UniversalPayloadEntry.inf" and "UefiPayloadEntry.inf" under [Components.IA32] in UefiPayloadPkg.dsc. The [Packages] sections in these two .inf file only contain MdePkg, MdeModulePkg, UefiCpuPkg and UefiPayloadPkg. So the PCDs in .dec files of these four pkgs used in UefiPayloadPkg.dsc will not be treated as unspecified PCDs when building with IA32. In order to avoid warnings when building under IA32, the PCDs in the dec files other than these four pkgs needs to be placed in the PCD section with the 'X64' suffix in UefiPayloadPkg.dsc.

The ' gEfiMdeModulePkgTokenSpaceGuid.PcdAriSupport' is in 'MdeModulePkg.dec '. So it won't be regarded as an unspecified PCD.

Thanks,
Dun
-----Original Message-----
From: Ni, Ray <ray.ni@intel.com> 
Sent: Tuesday, September 14, 2021 3:54 PM
To: Tan, Dun <dun.tan@intel.com>; devel@edk2.groups.io
Cc: Dong, Guo <guo.dong@intel.com>; Ma, Maurice <maurice.ma@intel.com>; You, Benjamin <benjamin.you@intel.com>
Subject: RE: [PATCH] UefiPayloadPkg: Fix the warning when building UefiPayloadPkg with IA32+X64

Dun,
I am curious, why ' gEfiMdeModulePkgTokenSpaceGuid.PcdAriSupport' doesn't cause build warning?
It is referenced by "MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf" under "[Components.X64]".

Thanks,
Ray

> -----Original Message-----
> From: Tan, Dun <dun.tan@intel.com>
> Sent: Tuesday, September 14, 2021 3:39 PM
> To: devel@edk2.groups.io
> Cc: Dong, Guo <guo.dong@intel.com>; Ni, Ray <ray.ni@intel.com>; Ma, 
> Maurice <maurice.ma@intel.com>; You, Benjamin <benjamin.you@intel.com>
> Subject: [PATCH] UefiPayloadPkg: Fix the warning when building 
> UefiPayloadPkg with IA32+X64
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3603
> 
> Move the unspecified PCDs from .common section. to .X64 section in .dsc file.
> The corresponding PCDs are not used in IA32.
> 
> Cc: Guo Dong <guo.dong@intel.com>
> Cc: Ray Ni <ray.ni@intel.com>
> Cc: Maurice Ma <maurice.ma@intel.com>
> Cc: Benjamin You <benjamin.you@intel.com>
> 
> Signed-off-by: Dun Tan <dun.tan@intel.com>
> ---
>  UefiPayloadPkg/UefiPayloadPkg.dsc | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc 
> b/UefiPayloadPkg/UefiPayloadPkg.dsc
> index 9912f2a20f..9d7f311343 100644
> --- a/UefiPayloadPkg/UefiPayloadPkg.dsc
> +++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
> @@ -327,6 +327,11 @@
>    gEfiSourceLevelDebugPkgTokenSpaceGuid.PcdDebugLoadImageMethod|0x2
>  !endif
> 
> +[PcdsPatchableInModule.X64]
> +  
> +gPcAtChipsetPkgTokenSpaceGuid.PcdRtcIndexRegister|$(RTC_INDEX_REGISTE
> +R)
> +  
> +gPcAtChipsetPkgTokenSpaceGuid.PcdRtcTargetRegister|$(RTC_TARGET_REGIS
> +TER)
> +  gEfiNetworkPkgTokenSpaceGuid.PcdAllowHttpConnections|TRUE
> +
>  [PcdsPatchableInModule.common]
>    gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile|{ 0x21, 0xaa, 
> 0x2c, 0x46, 0x14, 0x76, 0x03, 0x45, 0x83, 0x6e, 0x8a, 0xb6, 0xf4, 0x66, 0x23, 0x31 }
>    gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x7
> @@ -337,8 +342,6 @@
>    gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x2F
>  !endif
>    
> gEfiMdeModulePkgTokenSpaceGuid.PcdMaxSizeNonPopulateCapsule|$(MAX_SIZE
> _NON_POPULATE_CAPSULE)
> -  
> gPcAtChipsetPkgTokenSpaceGuid.PcdRtcIndexRegister|$(RTC_INDEX_REGISTER
> )
> -  gPcAtChipsetPkgTokenSpaceGuid.PcdRtcTargetRegister|$(RTC_TARGET_REGISTER)
>    #
>    # The following parameters are set by Library/PlatformHookLib
>    #
> @@ -361,7 +364,6 @@
> 
>    gUefiCpuPkgTokenSpaceGuid.PcdCpuMaxLogicalProcessorNumber|$(MAX_LOGICAL_PROCESSORS)
>    gUefiCpuPkgTokenSpaceGuid.PcdCpuNumberOfReservedVariableMtrrs|0
> -  gEfiNetworkPkgTokenSpaceGuid.PcdAllowHttpConnections|TRUE
> 
>  
> ######################################################################
> ##########
>  #
> --
> 2.31.1.windows.1



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


Re: [edk2-devel] [PATCH] UefiPayloadPkg: Fix the warning when building UefiPayloadPkg with IA32+X64
Posted by Ni, Ray 2 years, 6 months ago
Reviewed-by: Ray Ni <ray.ni@intel.com>

-----Original Message-----
From: Tan, Dun <dun.tan@intel.com> 
Sent: Wednesday, September 15, 2021 4:55 PM
To: Ni, Ray <ray.ni@intel.com>; devel@edk2.groups.io
Cc: Dong, Guo <guo.dong@intel.com>; Ma, Maurice <maurice.ma@intel.com>; You, Benjamin <benjamin.you@intel.com>
Subject: RE: [PATCH] UefiPayloadPkg: Fix the warning when building UefiPayloadPkg with IA32+X64

Hi Ray,

There are only "UniversalPayloadEntry.inf" and "UefiPayloadEntry.inf" under [Components.IA32] in UefiPayloadPkg.dsc. The [Packages] sections in these two .inf file only contain MdePkg, MdeModulePkg, UefiCpuPkg and UefiPayloadPkg. So the PCDs in .dec files of these four pkgs used in UefiPayloadPkg.dsc will not be treated as unspecified PCDs when building with IA32. In order to avoid warnings when building under IA32, the PCDs in the dec files other than these four pkgs needs to be placed in the PCD section with the 'X64' suffix in UefiPayloadPkg.dsc.

The ' gEfiMdeModulePkgTokenSpaceGuid.PcdAriSupport' is in 'MdeModulePkg.dec '. So it won't be regarded as an unspecified PCD.

Thanks,
Dun
-----Original Message-----
From: Ni, Ray <ray.ni@intel.com>
Sent: Tuesday, September 14, 2021 3:54 PM
To: Tan, Dun <dun.tan@intel.com>; devel@edk2.groups.io
Cc: Dong, Guo <guo.dong@intel.com>; Ma, Maurice <maurice.ma@intel.com>; You, Benjamin <benjamin.you@intel.com>
Subject: RE: [PATCH] UefiPayloadPkg: Fix the warning when building UefiPayloadPkg with IA32+X64

Dun,
I am curious, why ' gEfiMdeModulePkgTokenSpaceGuid.PcdAriSupport' doesn't cause build warning?
It is referenced by "MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf" under "[Components.X64]".

Thanks,
Ray

> -----Original Message-----
> From: Tan, Dun <dun.tan@intel.com>
> Sent: Tuesday, September 14, 2021 3:39 PM
> To: devel@edk2.groups.io
> Cc: Dong, Guo <guo.dong@intel.com>; Ni, Ray <ray.ni@intel.com>; Ma, 
> Maurice <maurice.ma@intel.com>; You, Benjamin <benjamin.you@intel.com>
> Subject: [PATCH] UefiPayloadPkg: Fix the warning when building 
> UefiPayloadPkg with IA32+X64
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3603
> 
> Move the unspecified PCDs from .common section. to .X64 section in .dsc file.
> The corresponding PCDs are not used in IA32.
> 
> Cc: Guo Dong <guo.dong@intel.com>
> Cc: Ray Ni <ray.ni@intel.com>
> Cc: Maurice Ma <maurice.ma@intel.com>
> Cc: Benjamin You <benjamin.you@intel.com>
> 
> Signed-off-by: Dun Tan <dun.tan@intel.com>
> ---
>  UefiPayloadPkg/UefiPayloadPkg.dsc | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc
> b/UefiPayloadPkg/UefiPayloadPkg.dsc
> index 9912f2a20f..9d7f311343 100644
> --- a/UefiPayloadPkg/UefiPayloadPkg.dsc
> +++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
> @@ -327,6 +327,11 @@
>    gEfiSourceLevelDebugPkgTokenSpaceGuid.PcdDebugLoadImageMethod|0x2
>  !endif
> 
> +[PcdsPatchableInModule.X64]
> +  
> +gPcAtChipsetPkgTokenSpaceGuid.PcdRtcIndexRegister|$(RTC_INDEX_REGISTE
> +R)
> +  
> +gPcAtChipsetPkgTokenSpaceGuid.PcdRtcTargetRegister|$(RTC_TARGET_REGIS
> +TER)
> +  gEfiNetworkPkgTokenSpaceGuid.PcdAllowHttpConnections|TRUE
> +
>  [PcdsPatchableInModule.common]
>    gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile|{ 0x21, 0xaa, 
> 0x2c, 0x46, 0x14, 0x76, 0x03, 0x45, 0x83, 0x6e, 0x8a, 0xb6, 0xf4, 0x66, 0x23, 0x31 }
>    gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x7
> @@ -337,8 +342,6 @@
>    gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x2F
>  !endif
>    
> gEfiMdeModulePkgTokenSpaceGuid.PcdMaxSizeNonPopulateCapsule|$(MAX_SIZE
> _NON_POPULATE_CAPSULE)
> -
> gPcAtChipsetPkgTokenSpaceGuid.PcdRtcIndexRegister|$(RTC_INDEX_REGISTER
> )
> -  gPcAtChipsetPkgTokenSpaceGuid.PcdRtcTargetRegister|$(RTC_TARGET_REGISTER)
>    #
>    # The following parameters are set by Library/PlatformHookLib
>    #
> @@ -361,7 +364,6 @@
> 
>    gUefiCpuPkgTokenSpaceGuid.PcdCpuMaxLogicalProcessorNumber|$(MAX_LOGICAL_PROCESSORS)
>    gUefiCpuPkgTokenSpaceGuid.PcdCpuNumberOfReservedVariableMtrrs|0
> -  gEfiNetworkPkgTokenSpaceGuid.PcdAllowHttpConnections|TRUE
> 
>  
> ######################################################################
> ##########
>  #
> --
> 2.31.1.windows.1



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