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.33259.1608514637328135392 for ; Sun, 20 Dec 2020 17:37:17 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=none, err=permanent DNS error (domain: byosoft.com.cn, ip: 58.240.74.242, mailfrom: gaoliming@byosoft.com.cn) Received: from DESKTOPS6D0PVI ([58.246.60.130]) (envelope-sender ) by 192.168.6.13 with ESMTP for ; Mon, 21 Dec 2020 09:37:14 +0800 X-WM-Sender: gaoliming@byosoft.com.cn X-WM-AuthFlag: YES X-WM-AuthUser: gaoliming@byosoft.com.cn From: "gaoliming" To: "'Yunhua Feng'" , Cc: "'Bob Feng'" , "'Yuwei Chen'" References: <20201217010951.2098-1-fengyunhua@byosoft.com.cn> In-Reply-To: <20201217010951.2098-1-fengyunhua@byosoft.com.cn> Subject: =?UTF-8?B?5Zue5aSNOiBbUEFUQ0ggdjJdIEJhc2VUb29sczogU2hvdWxkIGFsd2F5cyBkZWZpbmUgUENEIFRPS0VOIHZhbHVlIGFzIFplcm8gZm9yIHN0YXRpYyBQQ0Q=?= Date: Mon, 21 Dec 2020 09:37:14 +0800 Message-ID: <012e01d6d739$cf7976c0$6e6c6440$@byosoft.com.cn> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQF0CNT6S1LsPo1oniPh1pBCc4QBSKrGYepw Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable Content-Language: zh-cn Reviewed-by: Liming Gao > -----=D3=CA=BC=FE=D4=AD=BC=FE----- > =B7=A2=BC=FE=C8=CB: Yunhua Feng > =B7=A2=CB=CD=CA=B1=BC=E4: 2020=C4=EA12=D4=C217=C8=D5 9:10 > =CA=D5=BC=FE=C8=CB: devel@edk2.groups.io > =B3=AD=CB=CD: Bob Feng ; Liming Gao > ; Yuwei Chen > =D6=F7=CC=E2: [PATCH v2] BaseTools: Should always define PCD TOKEN = value as Zero > for static PCD >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3120 > 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. >=20 > 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(-) >=20 > 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 +=3D 1 >=20 > for Pcd in self.NonDynamicPcdList: > - RetVal[Pcd.TokenCName, Pcd.TokenSpaceGuidCName] =3D > TokenNumber > - TokenNumber +=3D 1 > + RetVal[Pcd.TokenCName, Pcd.TokenSpaceGuidCName] =3D 0 > return RetVal >=20 > @cached_property > -- > 2.27.0.windows.1