public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH v2] BaseTools: Should always define PCD TOKEN value as Zero for static PCD
@ 2020-12-17  1:09 fengyunhua
  2020-12-18  0:56 ` 回复: [edk2-devel] " gaoliming
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: fengyunhua @ 2020-12-17  1:09 UTC (permalink / raw)
  To: devel; +Cc: Bob Feng, Liming Gao, Yuwei Chen

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3120
FixedAtBuild, PatchableInModule and FeatureFlag PCD don't use PCD TOKEN.
Their PCD TOKEN value can always be zero.
AutoGen.h will not be changed when static PCD is added or removed.
Dynamic PCD add or remove will still cause dynamic PCD token value be
changed.

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Signed-off-by: Yunhua Feng <fengyunhua@byosoft.com.cn>
---
 BaseTools/Source/Python/AutoGen/PlatformAutoGen.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py b/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py
index c001828937..7d8e7b3c7c 100644
--- a/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py
@@ -1037,8 +1037,7 @@ class PlatformAutoGen(AutoGen):
                 TokenNumber += 1
 
         for Pcd in self.NonDynamicPcdList:
-            RetVal[Pcd.TokenCName, Pcd.TokenSpaceGuidCName] = TokenNumber
-            TokenNumber += 1
+            RetVal[Pcd.TokenCName, Pcd.TokenSpaceGuidCName] = 0
         return RetVal
 
     @cached_property
-- 
2.27.0.windows.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* 回复: [edk2-devel] [PATCH v2] BaseTools: Should always define PCD TOKEN value as Zero for static PCD
  2020-12-17  1:09 [PATCH v2] BaseTools: Should always define PCD TOKEN value as Zero for static PCD fengyunhua
@ 2020-12-18  0:56 ` gaoliming
  2020-12-21  1:37 ` 回复: " gaoliming
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: gaoliming @ 2020-12-18  0:56 UTC (permalink / raw)
  To: devel, fengyunhua; +Cc: 'Bob Feng', 'Yuwei Chen'

Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>

> -----邮件原件-----
> 发件人: bounce+27952+69075+4905953+8761045@groups.io
> <bounce+27952+69075+4905953+8761045@groups.io> 代表 fengyunhua
> 发送时间: 2020年12月17日 9:10
> 收件人: devel@edk2.groups.io
> 抄送: Bob Feng <bob.c.feng@intel.com>; Liming Gao
> <gaoliming@byosoft.com.cn>; Yuwei Chen <yuwei.chen@intel.com>
> 主题: [edk2-devel] [PATCH v2] BaseTools: Should always define PCD TOKEN
> value as Zero for static PCD
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3120
> FixedAtBuild, PatchableInModule and FeatureFlag PCD don't use PCD TOKEN.
> Their PCD TOKEN value can always be zero.
> AutoGen.h will not be changed when static PCD is added or removed.
> Dynamic PCD add or remove will still cause dynamic PCD token value be
> changed.
> 
> Cc: Bob Feng <bob.c.feng@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Yuwei Chen <yuwei.chen@intel.com>
> Signed-off-by: Yunhua Feng <fengyunhua@byosoft.com.cn>
> ---
>  BaseTools/Source/Python/AutoGen/PlatformAutoGen.py | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py
> b/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py
> index c001828937..7d8e7b3c7c 100644
> --- a/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py
> +++ b/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py
> @@ -1037,8 +1037,7 @@ class PlatformAutoGen(AutoGen):
>                  TokenNumber += 1
> 
>          for Pcd in self.NonDynamicPcdList:
> -            RetVal[Pcd.TokenCName, Pcd.TokenSpaceGuidCName] =
> TokenNumber
> -            TokenNumber += 1
> +            RetVal[Pcd.TokenCName, Pcd.TokenSpaceGuidCName] = 0
>          return RetVal
> 
>      @cached_property
> --
> 2.27.0.windows.1
> 
> 
> 
> 
> 
> 




^ permalink raw reply	[flat|nested] 5+ messages in thread

* 回复: [PATCH v2] BaseTools: Should always define PCD TOKEN value as Zero for static PCD
  2020-12-17  1:09 [PATCH v2] BaseTools: Should always define PCD TOKEN value as Zero for static PCD fengyunhua
  2020-12-18  0:56 ` 回复: [edk2-devel] " gaoliming
@ 2020-12-21  1:37 ` gaoliming
  2020-12-21  1:48 ` Bob Feng
       [not found] ` <16529824D9BE42B5.13568@groups.io>
  3 siblings, 0 replies; 5+ messages in thread
From: gaoliming @ 2020-12-21  1:37 UTC (permalink / raw)
  To: 'Yunhua Feng', devel; +Cc: 'Bob Feng', 'Yuwei Chen'

Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>

> -----邮件原件-----
> 发件人: Yunhua Feng <fengyunhua@byosoft.com.cn>
> 发送时间: 2020年12月17日 9:10
> 收件人: devel@edk2.groups.io
> 抄送: Bob Feng <bob.c.feng@intel.com>; Liming Gao
> <gaoliming@byosoft.com.cn>; Yuwei Chen <yuwei.chen@intel.com>
> 主题: [PATCH v2] BaseTools: Should always define PCD TOKEN value as Zero
> for static PCD
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3120
> FixedAtBuild, PatchableInModule and FeatureFlag PCD don't use PCD TOKEN.
> Their PCD TOKEN value can always be zero.
> AutoGen.h will not be changed when static PCD is added or removed.
> Dynamic PCD add or remove will still cause dynamic PCD token value be
> changed.
> 
> Cc: Bob Feng <bob.c.feng@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Yuwei Chen <yuwei.chen@intel.com>
> Signed-off-by: Yunhua Feng <fengyunhua@byosoft.com.cn>
> ---
>  BaseTools/Source/Python/AutoGen/PlatformAutoGen.py | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py
> b/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py
> index c001828937..7d8e7b3c7c 100644
> --- a/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py
> +++ b/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py
> @@ -1037,8 +1037,7 @@ class PlatformAutoGen(AutoGen):
>                  TokenNumber += 1
> 
>          for Pcd in self.NonDynamicPcdList:
> -            RetVal[Pcd.TokenCName, Pcd.TokenSpaceGuidCName] =
> TokenNumber
> -            TokenNumber += 1
> +            RetVal[Pcd.TokenCName, Pcd.TokenSpaceGuidCName] = 0
>          return RetVal
> 
>      @cached_property
> --
> 2.27.0.windows.1




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] BaseTools: Should always define PCD TOKEN value as Zero for static PCD
  2020-12-17  1:09 [PATCH v2] BaseTools: Should always define PCD TOKEN value as Zero for static PCD fengyunhua
  2020-12-18  0:56 ` 回复: [edk2-devel] " gaoliming
  2020-12-21  1:37 ` 回复: " gaoliming
@ 2020-12-21  1:48 ` Bob Feng
       [not found] ` <16529824D9BE42B5.13568@groups.io>
  3 siblings, 0 replies; 5+ messages in thread
From: Bob Feng @ 2020-12-21  1:48 UTC (permalink / raw)
  To: Yunhua Feng, devel@edk2.groups.io; +Cc: Liming Gao, Chen, Christine

Reviewed-by: Bob Feng <bob.c.feng@intel.com>

-----Original Message-----
From: Yunhua Feng <fengyunhua@byosoft.com.cn> 
Sent: Thursday, December 17, 2020 9:10 AM
To: devel@edk2.groups.io
Cc: Feng, Bob C <bob.c.feng@intel.com>; Liming Gao <gaoliming@byosoft.com.cn>; Chen, Christine <yuwei.chen@intel.com>
Subject: [PATCH v2] BaseTools: Should always define PCD TOKEN value as Zero for static PCD

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3120
FixedAtBuild, PatchableInModule and FeatureFlag PCD don't use PCD TOKEN.
Their PCD TOKEN value can always be zero.
AutoGen.h will not be changed when static PCD is added or removed.
Dynamic PCD add or remove will still cause dynamic PCD token value be changed.

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Signed-off-by: Yunhua Feng <fengyunhua@byosoft.com.cn>
---
 BaseTools/Source/Python/AutoGen/PlatformAutoGen.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py b/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py
index c001828937..7d8e7b3c7c 100644
--- a/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py
@@ -1037,8 +1037,7 @@ class PlatformAutoGen(AutoGen):
                 TokenNumber += 1
 
         for Pcd in self.NonDynamicPcdList:
-            RetVal[Pcd.TokenCName, Pcd.TokenSpaceGuidCName] = TokenNumber
-            TokenNumber += 1
+            RetVal[Pcd.TokenCName, Pcd.TokenSpaceGuidCName] = 0
         return RetVal
 
     @cached_property
--
2.27.0.windows.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [edk2-devel] [PATCH v2] BaseTools: Should always define PCD TOKEN value as Zero for static PCD
       [not found] ` <16529824D9BE42B5.13568@groups.io>
@ 2020-12-23  2:07   ` Bob Feng
  0 siblings, 0 replies; 5+ messages in thread
From: Bob Feng @ 2020-12-23  2:07 UTC (permalink / raw)
  To: devel@edk2.groups.io, Feng, Bob C, Yunhua Feng
  Cc: Liming Gao, Chen, Christine

Created a PR https://github.com/tianocore/edk2/pull/1265

Thanks,
Bob

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Bob Feng
Sent: Monday, December 21, 2020 9:48 AM
To: Yunhua Feng <fengyunhua@byosoft.com.cn>; devel@edk2.groups.io
Cc: Liming Gao <gaoliming@byosoft.com.cn>; Chen, Christine <yuwei.chen@intel.com>
Subject: Re: [edk2-devel] [PATCH v2] BaseTools: Should always define PCD TOKEN value as Zero for static PCD

Reviewed-by: Bob Feng <bob.c.feng@intel.com>

-----Original Message-----
From: Yunhua Feng <fengyunhua@byosoft.com.cn> 
Sent: Thursday, December 17, 2020 9:10 AM
To: devel@edk2.groups.io
Cc: Feng, Bob C <bob.c.feng@intel.com>; Liming Gao <gaoliming@byosoft.com.cn>; Chen, Christine <yuwei.chen@intel.com>
Subject: [PATCH v2] BaseTools: Should always define PCD TOKEN value as Zero for static PCD

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3120
FixedAtBuild, PatchableInModule and FeatureFlag PCD don't use PCD TOKEN.
Their PCD TOKEN value can always be zero.
AutoGen.h will not be changed when static PCD is added or removed.
Dynamic PCD add or remove will still cause dynamic PCD token value be changed.

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Signed-off-by: Yunhua Feng <fengyunhua@byosoft.com.cn>
---
 BaseTools/Source/Python/AutoGen/PlatformAutoGen.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py b/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py
index c001828937..7d8e7b3c7c 100644
--- a/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py
@@ -1037,8 +1037,7 @@ class PlatformAutoGen(AutoGen):
                 TokenNumber += 1
 
         for Pcd in self.NonDynamicPcdList:
-            RetVal[Pcd.TokenCName, Pcd.TokenSpaceGuidCName] = TokenNumber
-            TokenNumber += 1
+            RetVal[Pcd.TokenCName, Pcd.TokenSpaceGuidCName] = 0
         return RetVal
 
     @cached_property
--
2.27.0.windows.1








^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-12-23  2:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-17  1:09 [PATCH v2] BaseTools: Should always define PCD TOKEN value as Zero for static PCD fengyunhua
2020-12-18  0:56 ` 回复: [edk2-devel] " gaoliming
2020-12-21  1:37 ` 回复: " gaoliming
2020-12-21  1:48 ` Bob Feng
     [not found] ` <16529824D9BE42B5.13568@groups.io>
2020-12-23  2:07   ` [edk2-devel] " Bob Feng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox