public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Bob Feng" <bob.c.feng@intel.com>
To: Yunhua Feng <fengyunhua@byosoft.com.cn>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: Liming Gao <gaoliming@byosoft.com.cn>,
	"Chen, Christine" <yuwei.chen@intel.com>
Subject: Re: [PATCH v2] BaseTools: Should always define PCD TOKEN value as Zero for static PCD
Date: Mon, 21 Dec 2020 01:48:11 +0000	[thread overview]
Message-ID: <DM6PR11MB4073F0E6B26FB4F311F11C53C9C00@DM6PR11MB4073.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20201217010951.2098-1-fengyunhua@byosoft.com.cn>

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



  parent reply	other threads:[~2020-12-21  1:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
     [not found] ` <16529824D9BE42B5.13568@groups.io>
2020-12-23  2:07   ` [edk2-devel] " Bob Feng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DM6PR11MB4073F0E6B26FB4F311F11C53C9C00@DM6PR11MB4073.namprd11.prod.outlook.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox