From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.byosoft.com.cn (mail.byosoft.com.cn [58.240.74.242]) by mx.groups.io with SMTP id smtpd.web08.1295.1608167429917414935 for ; Wed, 16 Dec 2020 17:10:30 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=none, err=permanent DNS error (domain: byosoft.com.cn, ip: 58.240.74.242, mailfrom: fengyunhua@byosoft.com.cn) Received: from localhost.localdomain ([58.246.60.130]) (envelope-sender ) by 192.168.6.13 with ESMTP for ; Thu, 17 Dec 2020 09:10:24 +0800 X-WM-Sender: fengyunhua@byosoft.com.cn From: "fengyunhua" To: devel@edk2.groups.io Cc: Bob Feng , Liming Gao , Yuwei Chen Subject: [PATCH v2] BaseTools: Should always define PCD TOKEN value as Zero for static PCD Date: Thu, 17 Dec 2020 09:09:51 +0800 Message-Id: <20201217010951.2098-1-fengyunhua@byosoft.com.cn> X-Mailer: git-send-email 2.27.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Cc: Liming Gao Cc: Yuwei Chen Signed-off-by: Yunhua Feng --- 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