From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.65; helo=mga03.intel.com; envelope-from=yonghong.zhu@intel.com; receiver=edk2-devel@lists.01.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 40D912041B276 for ; Tue, 24 Apr 2018 23:00:20 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Apr 2018 23:00:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,325,1520924400"; d="scan'208";a="50608373" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga001.jf.intel.com with ESMTP; 24 Apr 2018 23:00:19 -0700 Received: from fmsmsx126.amr.corp.intel.com (10.18.125.43) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 24 Apr 2018 23:00:18 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX126.amr.corp.intel.com (10.18.125.43) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 24 Apr 2018 23:00:18 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.210]) by shsmsx102.ccr.corp.intel.com ([169.254.2.79]) with mapi id 14.03.0319.002; Wed, 25 Apr 2018 14:00:16 +0800 From: "Zhu, Yonghong" To: "Carsey, Jaben" , "edk2-devel@lists.01.org" CC: "Gao, Liming" , "Zhu, Yonghong" Thread-Topic: [PATCH v1 18/27] BaseTools: Replace PCD type strings with predefined constant Thread-Index: AQHT2L+Hm3CPNycON0mFTGh3etYNuqQRAw8Q Date: Wed, 25 Apr 2018 06:00:15 +0000 Message-ID: References: <17a73267bf707542e2b0a24193b6e8e0482dac05.1524239028.git.jaben.carsey@intel.com> In-Reply-To: <17a73267bf707542e2b0a24193b6e8e0482dac05.1524239028.git.jaben.carsey@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH v1 18/27] BaseTools: Replace PCD type strings with predefined constant X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Apr 2018 06:00:20 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable GenFdsGlobalVariable.py: should use DataType.TAB_PCDS_FIXED_AT_BUILD format= , because it use import Common.DataType as DataType in file header. Best Regards, Zhu Yonghong -----Original Message----- From: Carsey, Jaben=20 Sent: Friday, April 20, 2018 11:52 PM To: edk2-devel@lists.01.org Cc: Gao, Liming ; Zhu, Yonghong Subject: [PATCH v1 18/27] BaseTools: Replace PCD type strings with predefin= ed constant Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/AutoGen/AutoGen.py | 4 +-- BaseTools/Source/Python/AutoGen/GenC.py | 4 +-- BaseTools/Source/Python/AutoGen/GenPcdDb.py | 2 +- BaseTools/Source/Python/Common/DataType.py | 3 ++ BaseTools/Source/Python/Common/MigrationUtilities.py | 2 +- BaseTools/Source/Python/GenFds/FfsInfStatement.py | 2 +- BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py | 4 +-- BaseTools/Source/Python/Workspace/DecBuildData.py | 22 +++++++------- BaseTools/Source/Python/Workspace/DscBuildData.py | 22 +++++++------- BaseTools/Source/Python/Workspace/InfBuildData.py | 26 ++++++++------= --- BaseTools/Source/Python/build/BuildReport.py | 30 ++++++++++----= ------ 11 files changed, 62 insertions(+), 59 deletions(-) diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/= Python/AutoGen/AutoGen.py index 2f60c17439c0..9b2164ed8216 100644 --- a/BaseTools/Source/Python/AutoGen/AutoGen.py +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py @@ -870,8 +870,8 @@ class WorkspaceAutoGen(AutoGen): def _CheckPcdDefineAndType(self): PcdTypeList =3D [ TAB_PCDS_FIXED_AT_BUILD, TAB_PCDS_PATCHABLE_IN_MODULE, TAB_PCD= S_FEATURE_FLAG, - TAB_PCDS_DYNAMIC, #"DynamicHii", "DynamicVpd", - TAB_PCDS_DYNAMIC_EX, # "DynamicExHii", "DynamicExVpd" + TAB_PCDS_DYNAMIC, #TAB_PCDS_DYNAMIC_HII, TAB_PCDS_DYNAMIC_VPD, + TAB_PCDS_DYNAMIC_EX, # TAB_PCDS_DYNAMIC_EX_HII,=20 + TAB_PCDS_DYNAMIC_EX_VPD ] =20 # This dict store PCDs which are not used by any modules with spec= ified arches diff --git a/BaseTools/Source/Python/AutoGen/GenC.py b/BaseToo= ls/Source/Python/AutoGen/GenC.py index 86b21de31eee..6b2ee87b2211 100644 --- a/BaseTools/Source/Python/AutoGen/GenC.py +++ b/BaseTools/Source/Python/AutoGen/GenC.py @@ -28,8 +28,8 @@ from IdfClassObject import * =20 ## PCD type string gItemTypeStringDatabase =3D { - TAB_PCDS_FEATURE_FLAG : 'FixedAtBuild', - TAB_PCDS_FIXED_AT_BUILD : 'FixedAtBuild', + TAB_PCDS_FEATURE_FLAG : TAB_PCDS_FIXED_AT_BUILD, + TAB_PCDS_FIXED_AT_BUILD : TAB_PCDS_FIXED_AT_BUILD, TAB_PCDS_PATCHABLE_IN_MODULE: 'BinaryPatch', TAB_PCDS_DYNAMIC : '', TAB_PCDS_DYNAMIC_DEFAULT : '', diff --git a/BaseTools/Source/Python/AutoGen/GenPcdDb.py b/BaseTools/Source= /Python/AutoGen/GenPcdDb.py index afd690bc5b1b..9374ca4820ef 100644 --- a/BaseTools/Source/Python/AutoGen/GenPcdDb.py +++ b/BaseTools/Source/Python/AutoGen/GenPcdDb.py @@ -1217,7 +1217,7 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, = DynamicPcdList, Phase): Pcd.InitString =3D 'UNINIT' =20 if Pcd.DatumType =3D=3D 'VOID*': - if Pcd.Type not in ["DynamicVpd", "DynamicExVpd"]: + if Pcd.Type not in [TAB_PCDS_DYNAMIC_VPD, TAB_PCDS_DYNAMIC_EX_= VPD]: Pcd.TokenTypeList =3D ['PCD_TYPE_STRING'] else: Pcd.TokenTypeList =3D [] diff --git a/BaseTools/Source/Python/Common/DataType.py b/BaseTools/Source/= Python/Common/DataType.py index 13e9c96dd51b..40a162adf33c 100644 --- a/BaseTools/Source/Python/Common/DataType.py +++ b/BaseTools/Source/Python/Common/DataType.py @@ -218,6 +218,9 @@ TAB_PCDS_DYNAMIC_HII =3D 'DynamicHii' PCD_DYNAMIC_TYPE_SET =3D {TAB_PCDS_DYNAMIC, TAB_PCDS_DYNAMIC_DEFAULT, TAB_= PCDS_DYNAMIC_VPD, TAB_PCDS_DYNAMIC_HII} PCD_DYNAMIC_EX_TYPE_SET =3D {TAB_P= CDS_DYNAMIC_EX, TAB_PCDS_DYNAMIC_EX_DEFAULT, TAB_PCDS_DYNAMIC_EX_VPD, TAB_P= CDS_DYNAMIC_EX_HII} =20 +# leave as a list for order +PCD_TYPE_LIST =3D [TAB_PCDS_FIXED_AT_BUILD, TAB_PCDS_PATCHABLE_IN_MODULE,= =20 +TAB_PCDS_FEATURE_FLAG, TAB_PCDS_DYNAMIC, TAB_PCDS_DYNAMIC_EX] + TAB_PCDS_FIXED_AT_BUILD_NULL =3D TAB_PCDS + TAB_PCDS_FIXED_AT_BUILD TAB_P= CDS_FIXED_AT_BUILD_COMMON =3D TAB_PCDS + TAB_PCDS_FIXED_AT_BUILD + TAB_SPLI= T + TAB_ARCH_COMMON TAB_PCDS_FIXED_AT_BUILD_IA32 =3D TAB_PCDS + TAB_PCDS_FIXED_AT_BUILD + TAB_= SPLIT + TAB_ARCH_IA32 diff --git a/BaseTools/Source/Python/Common/Migration= Utilities.py b/BaseTools/Source/Python/Common/MigrationUtilities.py index e9f1cabcb794..0c93c72a60f6 100644 --- a/BaseTools/Source/Python/Common/MigrationUtilities.py +++ b/BaseTools/Source/Python/Common/MigrationUtilities.py @@ -34,7 +34,7 @@ def SetCommon(Common, XmlCommon): XmlTag =3D "Usage" Common.Usage =3D XmlAttribute(XmlCommon, XmlTag).split() =20 - XmlTag =3D "FeatureFlag" + XmlTag =3D TAB_PCDS_FEATURE_FLAG Common.FeatureFlag =3D XmlAttribute(XmlCommon, XmlTag) =20 XmlTag =3D "SupArchList" diff --git a/BaseTools/Source/Python/GenFds/FfsInfStatement.py b/BaseTools/= Source/Python/GenFds/FfsInfStatement.py index d31d03d43a18..8893fcbda1fc 100644 --- a/BaseTools/Source/Python/GenFds/FfsInfStatement.py +++ b/BaseTools/Source/Python/GenFds/FfsInfStatement.py @@ -249,7 +249,7 @@ class FfsInfStatement(FfsInfStatementClassObject): Pcd =3D InfPcds[PcdKey] if not hasattr(Pcd, 'Offset'): continue - if Pcd.Type !=3D 'PatchableInModule': + if Pcd.Type !=3D TAB_PCDS_PATCHABLE_IN_MODULE: continue # Override Patchable PCD value by the value from DSC PatchPcd =3D None diff --git a/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py b/BaseT= ools/Source/Python/GenFds/GenFdsGlobalVariable.py index 6a3873940ec0..e692e4e98504 100644 --- a/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py +++ b/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py @@ -809,7 +809,7 @@ class GenFdsGlobalVariable: for Key in PcdDict: PcdObj =3D PcdDict[Key] if (PcdObj.TokenCName =3D=3D TokenCName) and (PcdObj.Token= SpaceGuidCName =3D=3D TokenSpace): - if PcdObj.Type !=3D 'FixedAtBuild': + if PcdObj.Type !=3D TAB_PCDS_FIXED_AT_BUILD: EdkLogger.error("GenFds", GENFDS_ERROR, "%s is not= FixedAtBuild type." % PcdPattern) if PcdObj.DatumType !=3D 'VOID*': EdkLogger.error("GenFds", GENFDS_ERROR, "%s is not= VOID* datum type." % PcdPattern) @@ -825,7 +825,7 @@ class GenFdsGlobalVar= iable: for Key in PcdDict: PcdObj =3D PcdDict[Key] if (PcdObj.TokenCName =3D=3D TokenCName) and (PcdObj.T= okenSpaceGuidCName =3D=3D TokenSpace): - if PcdObj.Type !=3D 'FixedAtBuild': + if PcdObj.Type !=3D TAB_PCDS_FIXED_AT_BUILD: EdkLogger.error("GenFds", GENFDS_ERROR, "%s is= not FixedAtBuild type." % PcdPattern) if PcdObj.DatumType !=3D 'VOID*': EdkLogger.error("GenFds", GENFDS_ERROR, "%s is= not VOID* datum type." % PcdPattern) diff --git a/BaseTools/Source/Python/= Workspace/DecBuildData.py b/BaseTools/Source/Python/Workspace/DecBuildData.= py index 31870e078cec..1fbd095f743c 100644 --- a/BaseTools/Source/Python/Workspace/DecBuildData.py +++ b/BaseTools/Source/Python/Workspace/DecBuildData.py @@ -27,17 +27,17 @@ from Workspace.BuildClassObject import PackageBuildClas= sObject, StructurePcd, Pc class DecBuildData(PackageBuildClassObject): # dict used to convert PCD type in database to string used by build to= ol _PCD_TYPE_STRING_ =3D { - MODEL_PCD_FIXED_AT_BUILD : "FixedAtBuild", - MODEL_PCD_PATCHABLE_IN_MODULE : "PatchableInModule", - MODEL_PCD_FEATURE_FLAG : "FeatureFlag", - MODEL_PCD_DYNAMIC : "Dynamic", - MODEL_PCD_DYNAMIC_DEFAULT : "Dynamic", - MODEL_PCD_DYNAMIC_HII : "DynamicHii", - MODEL_PCD_DYNAMIC_VPD : "DynamicVpd", - MODEL_PCD_DYNAMIC_EX : "DynamicEx", - MODEL_PCD_DYNAMIC_EX_DEFAULT : "DynamicEx", - MODEL_PCD_DYNAMIC_EX_HII : "DynamicExHii", - MODEL_PCD_DYNAMIC_EX_VPD : "DynamicExVpd", + MODEL_PCD_FIXED_AT_BUILD : TAB_PCDS_FIXED_AT_BUILD, + MODEL_PCD_PATCHABLE_IN_MODULE : TAB_PCDS_PATCHABLE_IN_MODULE, + MODEL_PCD_FEATURE_FLAG : TAB_PCDS_FEATURE_FLAG, + MODEL_PCD_DYNAMIC : TAB_PCDS_DYNAMIC, + MODEL_PCD_DYNAMIC_DEFAULT : TAB_PCDS_DYNAMIC, + MODEL_PCD_DYNAMIC_HII : TAB_PCDS_DYNAMIC_HII, + MODEL_PCD_DYNAMIC_VPD : TAB_PCDS_DYNAMIC_VPD, + MODEL_PCD_DYNAMIC_EX : TAB_PCDS_DYNAMIC_EX, + MODEL_PCD_DYNAMIC_EX_DEFAULT : TAB_PCDS_DYNAMIC_EX, + MODEL_PCD_DYNAMIC_EX_HII : TAB_PCDS_DYNAMIC_EX_HII, + MODEL_PCD_DYNAMIC_EX_VPD : TAB_PCDS_DYNAMIC_EX_VPD, } =20 # dict used to convert part of [Defines] to members of DecBuildData di= rectly diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/Bas= eTools/Source/Python/Workspace/DscBuildData.py index eb435cece480..373441521723 100644 --- a/BaseTools/Source/Python/Workspace/DscBuildData.py +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py @@ -164,17 +164,17 @@ def GetDependencyList(FileStack,SearchPathList): class DscBuildData(PlatformBuildClassObject): # dict used to convert PCD type in database to string used by build to= ol _PCD_TYPE_STRING_ =3D { - MODEL_PCD_FIXED_AT_BUILD : "FixedAtBuild", - MODEL_PCD_PATCHABLE_IN_MODULE : "PatchableInModule", - MODEL_PCD_FEATURE_FLAG : "FeatureFlag", - MODEL_PCD_DYNAMIC : "Dynamic", - MODEL_PCD_DYNAMIC_DEFAULT : "Dynamic", - MODEL_PCD_DYNAMIC_HII : "DynamicHii", - MODEL_PCD_DYNAMIC_VPD : "DynamicVpd", - MODEL_PCD_DYNAMIC_EX : "DynamicEx", - MODEL_PCD_DYNAMIC_EX_DEFAULT : "DynamicEx", - MODEL_PCD_DYNAMIC_EX_HII : "DynamicExHii", - MODEL_PCD_DYNAMIC_EX_VPD : "DynamicExVpd", + MODEL_PCD_FIXED_AT_BUILD : TAB_PCDS_FIXED_AT_BUILD, + MODEL_PCD_PATCHABLE_IN_MODULE : TAB_PCDS_PATCHABLE_IN_MODULE, + MODEL_PCD_FEATURE_FLAG : TAB_PCDS_FEATURE_FLAG, + MODEL_PCD_DYNAMIC : TAB_PCDS_DYNAMIC, + MODEL_PCD_DYNAMIC_DEFAULT : TAB_PCDS_DYNAMIC, + MODEL_PCD_DYNAMIC_HII : TAB_PCDS_DYNAMIC_HII, + MODEL_PCD_DYNAMIC_VPD : TAB_PCDS_DYNAMIC_VPD, + MODEL_PCD_DYNAMIC_EX : TAB_PCDS_DYNAMIC_EX, + MODEL_PCD_DYNAMIC_EX_DEFAULT : TAB_PCDS_DYNAMIC_EX, + MODEL_PCD_DYNAMIC_EX_HII : TAB_PCDS_DYNAMIC_EX_HII, + MODEL_PCD_DYNAMIC_EX_VPD : TAB_PCDS_DYNAMIC_EX_VPD, } =20 # dict used to convert part of [Defines] to members of DscBuildData di= rectly diff --git a/BaseTools/Source/Python/Workspace/InfBuildData.py b/Bas= eTools/Source/Python/Workspace/InfBuildData.py index 94f142e8e617..157f7a2d2de8 100644 --- a/BaseTools/Source/Python/Workspace/InfBuildData.py +++ b/BaseTools/Source/Python/Workspace/InfBuildData.py @@ -28,17 +28,17 @@ from Workspace.BuildClassObject import ModuleBuildClass= Object, LibraryClassObjec class InfBuildData(ModuleBuildClassObject): # dict used to convert PCD type in database to string used by build to= ol _PCD_TYPE_STRING_ =3D { - MODEL_PCD_FIXED_AT_BUILD : "FixedAtBuild", - MODEL_PCD_PATCHABLE_IN_MODULE : "PatchableInModule", - MODEL_PCD_FEATURE_FLAG : "FeatureFlag", - MODEL_PCD_DYNAMIC : "Dynamic", - MODEL_PCD_DYNAMIC_DEFAULT : "Dynamic", - MODEL_PCD_DYNAMIC_HII : "DynamicHii", - MODEL_PCD_DYNAMIC_VPD : "DynamicVpd", - MODEL_PCD_DYNAMIC_EX : "DynamicEx", - MODEL_PCD_DYNAMIC_EX_DEFAULT : "DynamicEx", - MODEL_PCD_DYNAMIC_EX_HII : "DynamicExHii", - MODEL_PCD_DYNAMIC_EX_VPD : "DynamicExVpd", + MODEL_PCD_FIXED_AT_BUILD : TAB_PCDS_FIXED_AT_BUILD, + MODEL_PCD_PATCHABLE_IN_MODULE : TAB_PCDS_PATCHABLE_IN_MODULE, + MODEL_PCD_FEATURE_FLAG : TAB_PCDS_FEATURE_FLAG, + MODEL_PCD_DYNAMIC : TAB_PCDS_DYNAMIC, + MODEL_PCD_DYNAMIC_DEFAULT : TAB_PCDS_DYNAMIC, + MODEL_PCD_DYNAMIC_HII : TAB_PCDS_DYNAMIC_HII, + MODEL_PCD_DYNAMIC_VPD : TAB_PCDS_DYNAMIC_VPD, + MODEL_PCD_DYNAMIC_EX : TAB_PCDS_DYNAMIC_EX, + MODEL_PCD_DYNAMIC_EX_DEFAULT : TAB_PCDS_DYNAMIC_EX, + MODEL_PCD_DYNAMIC_EX_HII : TAB_PCDS_DYNAMIC_EX_HII, + MODEL_PCD_DYNAMIC_EX_VPD : TAB_PCDS_DYNAMIC_EX_VPD, } =20 # dict used to convert part of [Defines] to members of InfBuildData di= rectly @@ -1026,13 +1026,13 @@ class InfBuildData(ModuleBuildClassObject): # if platform doesn't give its type, use 'lowest' one in t= he # following order, if any # - # "FixedAtBuild", "PatchableInModule", "FeatureFlag", "D= ynamic", "DynamicEx" + # TAB_PCDS_FIXED_AT_BUILD, TAB_PCDS_PATCHABLE_IN_MODULE,= TAB_PCDS_FEATURE_FLAG, TAB_PCDS_DYNAMIC, TAB_PCDS_DYNAMIC_EX # _GuidDict.update(Package.Guids) PcdType =3D self._PCD_TYPE_STRING_[Type] if Type =3D=3D MODEL_PCD_DYNAMIC: Pcd.Pending =3D True - for T in ["FixedAtBuild", "PatchableInModule", "Featur= eFlag", "Dynamic", "DynamicEx"]: + for T in PCD_TYPE_LIST: if (PcdRealName, TokenSpaceGuid) in GlobalData.Mix= edPcd: for item in GlobalData.MixedPcd[(PcdRealName, = TokenSpaceGuid)]: if str(item[0]).endswith(T) and (item[0], = item[1], T) in Package.Pcds: diff --git a/BaseTools/Source/Python/build/BuildReport.py b/BaseTools/Sourc= e/Python/build/BuildReport.py index 02e01a1fa2ab..c8948b5cfbd9 100644 --- a/BaseTools/Source/Python/build/BuildReport.py +++ b/BaseTools/Source/Python/build/BuildReport.py @@ -94,15 +94,15 @@ gSubSectionSep =3D "-" * gLineMaxLength =20 ## The look up table to map PCD type to pair of report display type and DE= C type gPcdTypeMap =3D { - 'FixedAtBuild' : ('FIXED', 'FixedAtBuild'), - 'PatchableInModule': ('PATCH', 'PatchableInModule'), - 'FeatureFlag' : ('FLAG', 'FeatureFlag'), - 'Dynamic' : ('DYN', 'Dynamic'), - 'DynamicHii' : ('DYNHII', 'Dynamic'), - 'DynamicVpd' : ('DYNVPD', 'Dynamic'), - 'DynamicEx' : ('DEX', 'DynamicEx'), - 'DynamicExHii' : ('DEXHII', 'DynamicEx'), - 'DynamicExVpd' : ('DEXVPD', 'DynamicEx'), + TAB_PCDS_FIXED_AT_BUILD : ('FIXED', TAB_PCDS_FIXED_AT_BUILD), + TAB_PCDS_PATCHABLE_IN_MODULE: ('PATCH', TAB_PCDS_PATCHABLE_IN_MODULE), + TAB_PCDS_FEATURE_FLAG : ('FLAG', TAB_PCDS_FEATURE_FLAG), + TAB_PCDS_DYNAMIC : ('DYN', TAB_PCDS_DYNAMIC), + TAB_PCDS_DYNAMIC_HII : ('DYNHII', TAB_PCDS_DYNAMIC), + TAB_PCDS_DYNAMIC_VPD : ('DYNVPD', TAB_PCDS_DYNAMIC), + TAB_PCDS_DYNAMIC_EX : ('DEX', TAB_PCDS_DYNAMIC_EX), + TAB_PCDS_DYNAMIC_EX_HII : ('DEXHII', TAB_PCDS_DYNAMIC_EX), + TAB_PCDS_DYNAMIC_EX_VPD : ('DEXVPD', TAB_PCDS_DYNAMIC_EX), } =20 ## The look up table to map module type to driver type @@ -784,7 +784,7 @@= class PcdReport(object): Pcd =3D Pa.Platform.Pcds[item] if not Pcd.Type: # check the Pcd in FDF file, whether it is used in mod= ule first - for T in ["FixedAtBuild", "PatchableInModule", "Featur= eFlag", "Dynamic", "DynamicEx"]: + for T in PCD_TYPE_LIST: PcdList =3D self.AllPcds.setdefault(Pcd.TokenSpace= GuidCName, {}).setdefault(T, []) if Pcd in PcdList: Pcd.Type =3D T @@ -792,7 +792,7 @@ class PcdRe= port(object): if not Pcd.Type: PcdTypeFlag =3D False for package in Pa.PackageList: - for T in ["FixedAtBuild", "PatchableInModule", "Fe= atureFlag", "Dynamic", "DynamicEx"]: + for T in PCD_TYPE_LIST: if (Pcd.TokenCName, Pcd.TokenSpaceGuidCName, T= ) in package.Pcds: Pcd.Type =3D T PcdTypeFlag =3D True @@ -804,10 +804,10 @@= class PcdReport(object): if not Pcd.DatumType: PcdType =3D Pcd.Type # Try to remove Hii and Vpd suffix - if PcdType.startswith("DynamicEx"): - PcdType =3D "DynamicEx" - elif PcdType.startswith("Dynamic"): - PcdType =3D "Dynamic" + if PcdType.startswith(TAB_PCDS_DYNAMIC_EX): + PcdType =3D TAB_PCDS_DYNAMIC_EX + elif PcdType.startswith(TAB_PCDS_DYNAMIC): + PcdType =3D TAB_PCDS_DYNAMIC for package in Pa.PackageList: if (Pcd.TokenCName, Pcd.TokenSpaceGuidCName, PcdTy= pe) in package.Pcds: Pcd.DatumType =3D package.Pcds[(Pcd.TokenCName= , Pcd.TokenSpaceGuidCName, PcdType)].DatumType -- 2.16.2.windows.1