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=jaben.carsey@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 57F072119358F for ; Thu, 6 Dec 2018 16:53:20 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Dec 2018 16:53:19 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,324,1539673200"; d="scan'208";a="300046313" Received: from orsmsx110.amr.corp.intel.com ([10.22.240.8]) by fmsmga006.fm.intel.com with ESMTP; 06 Dec 2018 16:53:19 -0800 Received: from orsmsx155.amr.corp.intel.com (10.22.240.21) by ORSMSX110.amr.corp.intel.com (10.22.240.8) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 6 Dec 2018 16:53:19 -0800 Received: from orsmsx153.amr.corp.intel.com ([169.254.12.110]) by ORSMSX155.amr.corp.intel.com ([169.254.7.161]) with mapi id 14.03.0415.000; Thu, 6 Dec 2018 16:53:18 -0800 From: "Carsey, Jaben" To: "Carsey, Jaben" , "Zhu, Yonghong" , "edk2-devel@lists.01.org" CC: "Gao, Liming" , "Feng, Bob C" Thread-Topic: [Patch v1 1/1] BaseTools: create and use a standard shared variable for '*' Thread-Index: AQHUirA4+WeiYG7afEOrPU+jyj4qc6VtIV2ggAE3fgCABB9R4IAAAGQg Date: Fri, 7 Dec 2018 00:53:18 +0000 Message-ID: References: <9802d13cdae952a1ef3b344b1cbaa2721689ce99.1542382796.git.jaben.carsey@intel.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiM2FmNjM5MjEtZjZlNS00NWI3LTg3ZWUtNmIyMTVhNGVjZjQ2IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiRmV4MXp3S3NjNTJja0ZMczZyajI3N1FsYWpzWEk5RW9mYUVPMXFteWF2QUtmbDVkb0VqMmQ2UDN2ZEN1clhuciJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.22.254.140] MIME-Version: 1.0 Subject: Re: [Patch v1 1/1] BaseTools: create and use a standard shared variable for '*' X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Dec 2018 00:53:20 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I will submit a new change with those changed back. -Jaben > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > Carsey, Jaben > Sent: Thursday, December 6, 2018 4:50 PM > To: Zhu, Yonghong ; edk2-devel@lists.01.org > Cc: Gao, Liming > Subject: Re: [edk2] [Patch v1 1/1] BaseTools: create and use a standard > shared variable for '*' > Importance: High >=20 > How about undo those and push the remaining? Since that's a very small > change. >=20 > -Jaben >=20 > > -----Original Message----- > > From: Zhu, Yonghong > > Sent: Monday, December 3, 2018 5:53 PM > > To: Carsey, Jaben ; edk2-devel@lists.01.org > > Cc: Gao, Liming ; Zhu, Yonghong > > > > Subject: RE: [Patch v1 1/1] BaseTools: create and use a standard > > shared variable for '*' > > Importance: High > > > > Yes. I prefer not to change it. > > > > Best Regards, > > Zhu Yonghong > > > > > > -----Original Message----- > > From: Carsey, Jaben > > Sent: Monday, December 03, 2018 11:19 PM > > To: Zhu, Yonghong ; edk2-devel@lists.01.org > > Cc: Gao, Liming > > Subject: RE: [Patch v1 1/1] BaseTools: create and use a standard > > shared variable for '*' > > > > I was trying to change all use of *, without regard to the usage of it. > > > > Do you think that mathematical * should not be changed? > > > > -Jaben > > > > > -----Original Message----- > > > From: Zhu, Yonghong > > > Sent: Sunday, December 02, 2018 6:31 PM > > > To: Carsey, Jaben ; edk2-devel@lists.01.org > > > Cc: Gao, Liming ; Zhu, Yonghong > > > > > > Subject: RE: [Patch v1 1/1] BaseTools: create and use a standard > > > shared variable for '*' > > > Importance: High > > > > > > Hi Jaben, > > > > > > In this patch, it also changed the mathematics multiplicative '*' > > > (used in > > > expression) to TAB_STAR, is it by on purpose? > > > Eg: > > > - NonLetterOpLst =3D ['+', '-', '*', '/', '%', '&', '|', '^', '~',= '<<', '>>', '!', '=3D', '>', > > '<', > > > '?', ':'] > > > + NonLetterOpLst =3D ['+', '-', TAB_STAR, '/', '%', '&', '|', '^', > > > + '~', '<<', '>>', '!', '=3D', > > > '>', '<', '?', ':'] > > > > > > Best Regards, > > > Zhu Yonghong > > > > > > -----Original Message----- > > > From: Carsey, Jaben > > > Sent: Friday, November 16, 2018 11:40 PM > > > To: edk2-devel@lists.01.org > > > Cc: Zhu, Yonghong ; Gao, Liming > > > > > > Subject: [Patch v1 1/1] BaseTools: create and use a standard shared > > > variable for '*' > > > > > > add a variable for the string '*' and then use it instead of lots of = '*' > > > > > > Cc: Yonghong Zhu > > > Cc: Liming Gao > > > Contributed-under: TianoCore Contribution Agreement 1.1 > > > Signed-off-by: Jaben Carsey > > > --- > > > BaseTools/Source/Python/AutoGen/AutoGen.py | 54 ++++++++= ++- > -- > > > ------- > > > BaseTools/Source/Python/AutoGen/BuildEngine.py | 10 ++-- > > > BaseTools/Source/Python/BPDG/GenVpd.py | 14 ++--- > > > BaseTools/Source/Python/Common/DataType.py | 1 + > > > BaseTools/Source/Python/Common/Expression.py | 4 +- > > > BaseTools/Source/Python/Common/Misc.py | 2 +- > > > BaseTools/Source/Python/Common/ToolDefClassObject.py | 23 +++++- > --- > > > BaseTools/Source/Python/Common/VpdInfoFile.py | 8 +-- > > > BaseTools/Source/Python/GenFds/FdfParser.py | 5 +- > > > BaseTools/Source/Python/GenFds/GenFds.py | 2 +- > > > BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py | 8 +-- > > > BaseTools/Source/Python/GenFds/Section.py | 2 +- > > > BaseTools/Source/Python/Workspace/DscBuildData.py | 6 +-- > > > 13 files changed, 70 insertions(+), 69 deletions(-) > > > > > > diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py > > > b/BaseTools/Source/Python/AutoGen/AutoGen.py > > > index f3560bfc787d..25417c447061 100644 > > > --- a/BaseTools/Source/Python/AutoGen/AutoGen.py > > > +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py > > > @@ -1438,7 +1438,7 @@ class PlatformAutoGen(AutoGen): > > > PcdValue =3D Sku.DefaultValue > > > if PcdValue =3D=3D "": > > > PcdValue =3D Pcd.DefaultValue > > > - if Sku.VpdOffset !=3D '*': > > > + if Sku.VpdOffset !=3D TAB_STAR: > > > if PcdValue.startswith("{"): > > > Alignment =3D 8 > > > elif PcdValue.startswith("L"): > > > @@ -1462,7 +1462,7 @@ class PlatformAutoGen(AutoGen): > > > VpdFile.Add(Pcd, SkuName, Sku.VpdOffset) > > > SkuValueMap[PcdValue].append(Sku) > > > # if the offset of a VPD is *, then it need > > > to be fixed up by third party tool. > > > - if not NeedProcessVpdMapFile and Sku.VpdOffs= et =3D=3D "*": > > > + if not NeedProcessVpdMapFile and > > > + Sku.VpdOffset =3D=3D > > > TAB_STAR: > > > NeedProcessVpdMapFile =3D True > > > if self.Platform.VpdToolGuid is None or > > > self.Platform.VpdToolGuid =3D=3D '': > > > EdkLogger.error("Build", > > > FILE_NOT_FOUND, \ @@ -1522,7 > > > +1522,7 @@ class PlatformAutoGen(AutoGen): > > > PcdValue =3D Sku.DefaultValue > > > if PcdValue =3D=3D "": > > > PcdValue =3D DscPcdEntry.Defaul= tValue > > > - if Sku.VpdOffset !=3D '*': > > > + if Sku.VpdOffset !=3D TAB_STAR: > > > if PcdValue.startswith("{"): > > > Alignment =3D 8 > > > elif PcdValue.startswith("L"): > > > @@ -1545,7 +1545,7 @@ class PlatformAutoGen(AutoGen): > > > SkuValueMap[PcdValue] =3D [] > > > VpdFile.Add(DscPcdEntry, SkuName= , Sku.VpdOffset) > > > SkuValueMap[PcdValue].append(Sku) > > > - if not NeedProcessVpdMapFile and Sku= .VpdOffset =3D=3D > > "*": > > > + if not NeedProcessVpdMapFile and > > > + Sku.VpdOffset =3D=3D > > > TAB_STAR: > > > NeedProcessVpdMapFile =3D True > > > if DscPcdEntry.DatumType =3D=3D TAB_VOID > > > and > > > PcdValue.startswith("L"): > > > UnicodePcdArray.add(DscPcdEntry) @@ > > > -1573,7 +1573,7 @@ class PlatformAutoGen(AutoGen): > > > if os.path.exists(VpdMapFilePath): > > > VpdFile.Read(VpdMapFilePath) > > > > > > - # Fixup "*" offset > > > + # Fixup TAB_STAR offset > > > for pcd in VpdSkuMap: > > > vpdinfo =3D VpdFile.GetVpdInfo(pcd) > > > if vpdinfo is None: > > > @@ -2210,15 +2210,15 @@ class PlatformAutoGen(AutoGen): > > > def CalculatePriorityValue(self, Key): > > > Target, ToolChain, Arch, CommandType, Attr =3D Key.split('_'= ) > > > PriorityValue =3D 0x11111 > > > - if Target =3D=3D "*": > > > + if Target =3D=3D TAB_STAR: > > > PriorityValue &=3D 0x01111 > > > - if ToolChain =3D=3D "*": > > > + if ToolChain =3D=3D TAB_STAR: > > > PriorityValue &=3D 0x10111 > > > - if Arch =3D=3D "*": > > > + if Arch =3D=3D TAB_STAR: > > > PriorityValue &=3D 0x11011 > > > - if CommandType =3D=3D "*": > > > + if CommandType =3D=3D TAB_STAR: > > > PriorityValue &=3D 0x11101 > > > - if Attr =3D=3D "*": > > > + if Attr =3D=3D TAB_STAR: > > > PriorityValue &=3D 0x11110 > > > > > > return self.PrioList["0x%0.5x" % PriorityValue] @@ -2253,9 > > > +2253,9 @@ class PlatformAutoGen(AutoGen): > > > if (Key[0] =3D=3D self.BuildRuleFamily and > > > (ModuleStyle is None or len(Key) < 3 or (len(Key) > > > > 2 and Key[2] =3D=3D > > > ModuleStyle))): > > > Target, ToolChain, Arch, CommandType, Attr =3D Key[1= ].split('_') > > > - if (Target =3D=3D self.BuildTarget or Target =3D=3D = "*") and\ > > > - (ToolChain =3D=3D self.ToolChain or ToolChain = =3D=3D "*") and\ > > > - (Arch =3D=3D self.Arch or Arch =3D=3D "*") and\ > > > + if (Target =3D=3D self.BuildTarget or Target =3D=3D = TAB_STAR) and\ > > > + (ToolChain =3D=3D self.ToolChain or ToolChain = =3D=3D TAB_STAR) > and\ > > > + (Arch =3D=3D self.Arch or Arch =3D=3D TAB_STAR) = and\ > > > Options[Key].startswith("=3D"): > > > > > > if OverrideList.get(Key[1]) is not None: > > > @@ -2276,11 +2276,11 @@ class PlatformAutoGen(AutoGen): > > > # Compare two Key, if one is included by > > > another, choose the higher priority one > > > # > > > Target2, ToolChain2, Arch2, CommandType2, Attr2 > > > =3D > > > NextKey.split("_") > > > - if (Target1 =3D=3D Target2 or Target1 =3D=3D "*"= or Target2 =3D=3D "*") > and\ > > > - (ToolChain1 =3D=3D ToolChain2 or ToolChain1 = =3D=3D "*" or > > ToolChain2 > > > =3D=3D "*") and\ > > > - (Arch1 =3D=3D Arch2 or Arch1 =3D=3D "*" or A= rch2 =3D=3D "*") and\ > > > - (CommandType1 =3D=3D CommandType2 or Command= Type1 =3D=3D > > "*" > > > or CommandType2 =3D=3D "*") and\ > > > - (Attr1 =3D=3D Attr2 or Attr1 =3D=3D "*" or A= ttr2 =3D=3D "*"): > > > + if (Target1 =3D=3D Target2 or Target1 =3D=3D TAB= _STAR > > > + or > > > + Target2 =3D=3D > > > TAB_STAR) and\ > > > + (ToolChain1 =3D=3D ToolChain2 or ToolChain1 = =3D=3D > > > + TAB_STAR or > > > ToolChain2 =3D=3D TAB_STAR) and\ > > > + (Arch1 =3D=3D Arch2 or Arch1 =3D=3D TAB_STAR= or > > > + Arch2 =3D=3D TAB_STAR) > > > and\ > > > + (CommandType1 =3D=3D CommandType2 or > > > + CommandType1 =3D=3D > > > TAB_STAR or CommandType2 =3D=3D TAB_STAR) and\ > > > + (Attr1 =3D=3D Attr2 or Attr1 =3D=3D TAB_STAR= or Attr2 =3D=3D > TAB_STAR): > > > > > > if self.CalculatePriorityValue(NowKey) > > > > self.CalculatePriorityValue(NextKey): > > > if Options.get((self.BuildRuleFamily, Ne= xtKey)) is not > None: > > > @@ -2309,9 +2309,9 @@ class PlatformAutoGen(AutoGen): > > > continue > > > FamilyMatch =3D True > > > # expand any wildcard > > > - if Target =3D=3D "*" or Target =3D=3D self.BuildTarget: > > > - if Tag =3D=3D "*" or Tag =3D=3D self.ToolChain: > > > - if Arch =3D=3D "*" or Arch =3D=3D self.Arch: > > > + if Target =3D=3D TAB_STAR or Target =3D=3D self.BuildTar= get: > > > + if Tag =3D=3D TAB_STAR or Tag =3D=3D self.ToolChain: > > > + if Arch =3D=3D TAB_STAR or Arch =3D=3D self.Arch= : > > > if Tool not in BuildOptions: > > > BuildOptions[Tool] =3D {} > > > if Attr !=3D "FLAGS" or Attr not in > > > BuildOptions[Tool] or > > > Options[Key].startswith('=3D'): > > > @@ -2344,9 +2344,9 @@ class PlatformAutoGen(AutoGen): > > > continue > > > > > > # expand any wildcard > > > - if Target =3D=3D "*" or Target =3D=3D self.BuildTarget: > > > - if Tag =3D=3D "*" or Tag =3D=3D self.ToolChain: > > > - if Arch =3D=3D "*" or Arch =3D=3D self.Arch: > > > + if Target =3D=3D TAB_STAR or Target =3D=3D self.BuildTar= get: > > > + if Tag =3D=3D TAB_STAR or Tag =3D=3D self.ToolChain: > > > + if Arch =3D=3D TAB_STAR or Arch =3D=3D self.Arch= : > > > if Tool not in BuildOptions: > > > BuildOptions[Tool] =3D {} > > > if Attr !=3D "FLAGS" or Attr not in > > > BuildOptions[Tool] or > > > Options[Key].startswith('=3D'): > > > @@ -2971,8 +2971,8 @@ class ModuleAutoGen(AutoGen): > > > @cached_property > > > def SourceFileList(self): > > > RetVal =3D [] > > > - ToolChainTagSet =3D {"", "*", self.ToolChain} > > > - ToolChainFamilySet =3D {"", "*", self.ToolChainFamily, > > > self.BuildRuleFamily} > > > + ToolChainTagSet =3D {"", TAB_STAR, self.ToolChain} > > > + ToolChainFamilySet =3D {"", TAB_STAR, self.ToolChainFamily, > > > + self.BuildRuleFamily} > > > for F in self.Module.Sources: > > > # match tool chain > > > if F.TagName not in ToolChainTagSet: > > > @@ -3047,7 +3047,7 @@ class ModuleAutoGen(AutoGen): > > > def BinaryFileList(self): > > > RetVal =3D [] > > > for F in self.Module.Binaries: > > > - if F.Target not in [TAB_ARCH_COMMON, '*'] and F.Target != =3D > > > self.BuildTarget: > > > + if F.Target not in [TAB_ARCH_COMMON, TAB_STAR] and > > > + F.Target !=3D > > > self.BuildTarget: > > > continue > > > RetVal.append(F) > > > self._ApplyBuildRule(F, F.Type, BinaryFileList=3DRetVal) > > > diff --git a/BaseTools/Source/Python/AutoGen/BuildEngine.py > > > b/BaseTools/Source/Python/AutoGen/BuildEngine.py > > > index ac7a6687552c..f9e3ac3a1daf 100644 > > > --- a/BaseTools/Source/Python/AutoGen/BuildEngine.py > > > +++ b/BaseTools/Source/Python/AutoGen/BuildEngine.py > > > @@ -110,7 +110,7 @@ class FileBuildRule: > > > self.IncListFileMacro =3D self.INC_LIST_MACRO > > > > > > self.SourceFileType =3D Type > > > - # source files listed not in "*" or "?" pattern format > > > + # source files listed not in TAB_STAR or "?" pattern format > > > if not ExtraDependency: > > > self.ExtraSourceFileList =3D [] > > > else: > > > @@ -150,12 +150,12 @@ class FileBuildRule: > > > self.SourceFileExtList =3D set() > > > for File in Input: > > > Base, Ext =3D os.path.splitext(File) > > > - if Base.find("*") >=3D 0: > > > - # There's "*" in the file name > > > + if Base.find(TAB_STAR) >=3D 0: > > > + # There's TAB_STAR in the file name > > > self.IsMultipleInput =3D True > > > self.GenFileListMacro =3D True > > > elif Base.find("?") < 0: > > > - # There's no "*" and "?" in file name > > > + # There's no TAB_STAR and "?" in file name > > > self.ExtraSourceFileList.append(File) > > > continue > > > self.SourceFileExtList.add(Ext) @@ -553,7 +553,7 @@ > > > class > > BuildRule: > > > # > > > # @param FileExt The extension of a file > > > # @param ToolChainFamily The tool chain family name > > > - # @param BuildVersion The build version number. "*" me= ans > any > > > rule > > > + # @param BuildVersion The build version number. TAB_ST= AR > > means > > > any rule > > > # is applicalbe. > > > # > > > # @retval FileType The file type string > > > diff --git a/BaseTools/Source/Python/BPDG/GenVpd.py > > > b/BaseTools/Source/Python/BPDG/GenVpd.py > > > index d7852d29eed0..e5da47f95e63 100644 > > > --- a/BaseTools/Source/Python/BPDG/GenVpd.py > > > +++ b/BaseTools/Source/Python/BPDG/GenVpd.py > > > @@ -21,7 +21,7 @@ import array > > > import re > > > from Common.LongFilePathSupport import OpenLongFilePath as open > > from > > > struct import * -from Common.DataType import MAX_SIZE_TYPE, > > > MAX_VAL_TYPE > > > +from Common.DataType import MAX_SIZE_TYPE, MAX_VAL_TYPE, > > > TAB_STAR > > > import Common.EdkLogger as EdkLogger import > Common.BuildToolError > > > as BuildToolError > > > > > > @@ -87,7 +87,7 @@ class PcdEntry: > > > # for both hexadecimal and decimal. > > > # > > > def _GenOffsetValue(self): > > > - if self.PcdOffset !=3D "*" : > > > + if self.PcdOffset !=3D TAB_STAR: > > > try: > > > self.PcdBinOffset =3D int (self.PcdOffset) > > > except: > > > @@ -423,7 +423,7 @@ class GenVPD : > > > Alignment =3D 1 > > > > > > PCD.Alignment =3D Alignment > > > - if PCD.PcdOffset !=3D '*': > > > + if PCD.PcdOffset !=3D TAB_STAR: > > > if PCD.PcdOccupySize % Alignment !=3D 0: > > > if PCD.PcdUnpackValue.startswith("{"): > > > EdkLogger.warn("BPDG", "The offset > > > value of PCD %s is not 8- byte aligned!" %(PCD.PcdCName), > > > File=3Dself.InputFileName) @@ -469,7 > > > +469,7 @@ class GenVPD : > > > def FormatFileLine (self) : > > > > > > for eachPcd in self.FileLinesList : > > > - if eachPcd.PcdOffset !=3D '*' : > > > + if eachPcd.PcdOffset !=3D TAB_STAR : > > > # Use pcd's Offset value as key, and pcd's Value as = value > > > self.PcdFixedOffsetSizeList.append(eachPcd) > > > else : > > > @@ -484,7 +484,7 @@ class GenVPD : > > > def FixVpdOffset (self): > > > # At first, the offset should start at 0 > > > # Sort fixed offset list in order to find out where has > > > free spaces for the pcd's offset > > > - # value is "*" to insert into. > > > + # value is TAB_STAR to insert into. > > > > > > self.PcdFixedOffsetSizeList.sort(key=3Dlambda x: > > > x.PcdBinOffset) > > > > > > @@ -502,7 +502,7 @@ class GenVPD : > > > self.PcdUnknownOffsetList[index+i -1 ], > > > self.PcdUnknownOffsetList[index+i] =3D > > > self.PcdUnknownOffsetList[index+i], > > > self.PcdUnknownOffsetList[index+i -1] > > > > > > # > > > - # Process all Offset value are "*" > > > + # Process all Offset value are TAB_STAR > > > # > > > if (len(self.PcdFixedOffsetSizeList) =3D=3D 0) and > > > (len(self.PcdUnknownOffsetList) !=3D 0) : > > > # The offset start from 0 @@ -571,7 +571,7 @@ class > > > GenVPD : > > > eachUnfixedPcd =3D > > > self.PcdUnknownOffsetList[countOfUnfixedList] > > > needFixPcdSize =3D eachUnfixedPcd.PcdOc= cupySize > > > # Not been fixed > > > - if eachUnfixedPcd.PcdOffset =3D=3D '*' : > > > + if eachUnfixedPcd.PcdOffset =3D=3D TAB_STAR = : > > > if LastOffset % eachUnfixedPcd.Alignment= !=3D 0: > > > LastOffset =3D (LastOffset / > > > eachUnfixedPcd.Alignment + 1) * eachUnfixedPcd.Alignment > > > # The offset un-fixed pcd can write > > > into this free space diff -- git > > > a/BaseTools/Source/Python/Common/DataType.py > > > b/BaseTools/Source/Python/Common/DataType.py > > > index 1d1d22faa40b..6b375712b65e 100644 > > > --- a/BaseTools/Source/Python/Common/DataType.py > > > +++ b/BaseTools/Source/Python/Common/DataType.py > > > @@ -31,6 +31,7 @@ TAB_OPTION_START =3D '<' > > > TAB_OPTION_END =3D '>' > > > TAB_SLASH =3D '\\' > > > TAB_BACK_SLASH =3D '/' > > > +TAB_STAR =3D '*' > > > TAB_LINE_BREAK =3D '\n' > > > TAB_PRINTCHAR_VT =3D '\x0b' > > > TAB_PRINTCHAR_BS =3D '\b' > > > diff --git a/BaseTools/Source/Python/Common/Expression.py > > > b/BaseTools/Source/Python/Common/Expression.py > > > index a21ab5daa73e..db1310d534fb 100644 > > > --- a/BaseTools/Source/Python/Common/Expression.py > > > +++ b/BaseTools/Source/Python/Common/Expression.py > > > @@ -244,7 +244,7 @@ class ValueExpression(BaseExpression): > > > 'IN' : 'in' > > > } > > > > > > - NonLetterOpLst =3D ['+', '-', '*', '/', '%', '&', '|', '^', '~',= '<<', '>>', '!', '=3D', '>', > > '<', > > > '?', ':'] > > > + NonLetterOpLst =3D ['+', '-', TAB_STAR, '/', '%', '&', '|', '^', > > > + '~', '<<', '>>', '!', '=3D', '>', '<', '?', ':'] > > > > > > > > > SymbolPattern =3D re.compile("(" > > > @@ -498,7 +498,7 @@ class ValueExpression(BaseExpression): > > > > > > # A [ * B]* > > > def _MulExpr(self): > > > - return self._ExprFuncTemplate(self._UnaryExpr, {"*", "/", "%= "}) > > > + return self._ExprFuncTemplate(self._UnaryExpr, {TAB_STAR, > > > + "/", > > > + "%"}) > > > > > > # [!]*A > > > def _UnaryExpr(self): > > > diff --git a/BaseTools/Source/Python/Common/Misc.py > > > b/BaseTools/Source/Python/Common/Misc.py > > > index 3b8efb2e7179..61ba79241fb6 100644 > > > --- a/BaseTools/Source/Python/Common/Misc.py > > > +++ b/BaseTools/Source/Python/Common/Misc.py > > > @@ -1088,7 +1088,7 @@ class tdict: > > > _ListType =3D type([]) > > > _TupleType =3D type(()) > > > _Wildcard =3D 'COMMON' > > > - _ValidWildcardList =3D ['COMMON', 'DEFAULT', 'ALL', '*', 'PLATFO= RM'] > > > + _ValidWildcardList =3D ['COMMON', 'DEFAULT', 'ALL', TAB_STAR, > > > + 'PLATFORM'] > > > > > > def __init__(self, _Single_=3DFalse, _Level_=3D2): > > > self._Level_ =3D _Level_ > > > diff --git a/BaseTools/Source/Python/Common/ToolDefClassObject.py > > > b/BaseTools/Source/Python/Common/ToolDefClassObject.py > > > index 05a1ddfbcc89..186d279840c1 100644 > > > --- a/BaseTools/Source/Python/Common/ToolDefClassObject.py > > > +++ b/BaseTools/Source/Python/Common/ToolDefClassObject.py > > > @@ -29,7 +29,8 @@ from Common import GlobalData from > > > Common.MultipleWorkspace import MultipleWorkspace as mws from > > > .DataType import TAB_TOD_DEFINES_TARGET, > > > TAB_TOD_DEFINES_TOOL_CHAIN_TAG,\ > > > TAB_TOD_DEFINES_TARGET_ARCH, > > > TAB_TOD_DEFINES_COMMAND_TYPE\ > > > - , TAB_TOD_DEFINES_FAMILY, > > > TAB_TOD_DEFINES_BUILDRULEFAMILY > > > + , TAB_TOD_DEFINES_FAMILY, > > > TAB_TOD_DEFINES_BUILDRULEFAMILY,\ > > > + TAB_STAR, TAB_TAT_DEFINES_TOOL_CHAIN_CONF > > > > > > > > > ## > > > @@ -97,7 +98,7 @@ class ToolDefClassObject(object): > > > # adding/removing items from the original dict. > > > for Key in list(self.ToolsDefTxtDictionary.keys()): > > > List =3D Key.split('_') > > > - if List[Index] =3D=3D '*': > > > + if List[Index] =3D=3D TAB_STAR: > > > for String in self.ToolsDefTxtDatabase[KeyList[I= ndex]]: > > > List[Index] =3D String > > > NewKey =3D '%s_%s_%s_%s_%s' % tuple(List) @@ > > > -202,20 +203,20 @@ class ToolDefClassObject(object): > > > if len(List) !=3D 5: > > > EdkLogger.verbose("Line %d: Not a valid name of > > > definition: %s" % ((Index + 1), Name)) > > > continue > > > - elif List[4] =3D=3D '*': > > > + elif List[4] =3D=3D TAB_STAR: > > > EdkLogger.verbose("Line %d: '*' is not allowed in > > > last field: %s" % ((Index + 1), Name)) > > > continue > > > else: > > > self.ToolsDefTxtDictionary[Name] =3D Value > > > - if List[0] !=3D '*': > > > + if List[0] !=3D TAB_STAR: > > > > > > self.ToolsDefTxtDatabase[TAB_TOD_DEFINES_TARGET] > > > +=3D [List[0]] > > > - if List[1] !=3D '*': > > > + if List[1] !=3D TAB_STAR: > > > > > > self.ToolsDefTxtDatabase[TAB_TOD_DEFINES_TOOL_CHAIN_TAG] > > > +=3D [List[1]] > > > - if List[2] !=3D '*': > > > + if List[2] !=3D TAB_STAR: > > > > > > self.ToolsDefTxtDatabase[TAB_TOD_DEFINES_TARGET_ARCH] +=3D [List[2]] > > > - if List[3] !=3D '*': > > > + if List[3] !=3D TAB_STAR: > > > > > > self.ToolsDefTxtDatabase[TAB_TOD_DEFINES_COMMAND_TYPE] > > > +=3D [List[3]] > > > - if List[4] =3D=3D TAB_TOD_DEFINES_FAMILY and List[2]= =3D=3D '*' and > > List[3] > > > =3D=3D '*': > > > + if List[4] =3D=3D TAB_TOD_DEFINES_FAMILY and List[2]= =3D=3D > > > + TAB_STAR > > > and List[3] =3D=3D TAB_STAR: > > > if TAB_TOD_DEFINES_FAMILY not in > self.ToolsDefTxtDatabase: > > > > > > self.ToolsDefTxtDatabase[TAB_TOD_DEFINES_FAMILY] =3D {} > > > > > > self.ToolsDefTxtDatabase[TAB_TOD_DEFINES_FAMILY][List[1]] =3D Value > @@ > > -226,7 +227,7 @@ class ToolDefClassObject(object): > > > > > > self.ToolsDefTxtDatabase[TAB_TOD_DEFINES_BUILDRULEFAMILY][List[1]] > =3D > > > Value > > > elif > > > self.ToolsDefTxtDatabase[TAB_TOD_DEFINES_FAMILY][List[1]] > > > !=3D Value: > > > EdkLogger.verbose("Line %d: No override > > > allowed for the family of a tool chain: %s" % ((Index + 1), Name)) > > > - if List[4] =3D=3D TAB_TOD_DEFINES_BUILDRULEFAMILY an= d List[2] =3D=3D > > '*' > > > and List[3] =3D=3D '*': > > > + if List[4] =3D=3D TAB_TOD_DEFINES_BUILDRULEFAMILY an= d > > > + List[2] =3D=3D > > > TAB_STAR and List[3] =3D=3D TAB_STAR: > > > if TAB_TOD_DEFINES_BUILDRULEFAMILY not in > > > self.ToolsDefTxtDatabase \ > > > or List[1] not in > > > self.ToolsDefTxtDatabase[TAB_TOD_DEFINES_FAMILY]: > > > EdkLogger.verbose("Line %d: The family is > > > not specified, but BuildRuleFamily is specified for the tool chain: > > > %s" % ((Index + 1), Name)) @@ -270,8 +271,8 @@ class > > ToolDefClassObject(object): > > > def ToolDefDict(ConfDir): > > > Target =3D TargetTxtDict(ConfDir) > > > ToolDef =3D ToolDefClassObject() > > > - if DataType.TAB_TAT_DEFINES_TOOL_CHAIN_CONF in > > > Target.TargetTxtDictionary: > > > - ToolsDefFile =3D > > > > > > Target.TargetTxtDictionary[DataType.TAB_TAT_DEFINES_TOOL_CHAIN_CON > > > F] > > > + if TAB_TAT_DEFINES_TOOL_CHAIN_CONF in > Target.TargetTxtDictionary: > > > + ToolsDefFile =3D > > > + Target.TargetTxtDictionary[TAB_TAT_DEFINES_TOOL_CHAIN_CONF] > > > if ToolsDefFile: > > > ToolDef.LoadToolDefFile(os.path.normpath(ToolsDefFile)) > > > else: > > > diff --git a/BaseTools/Source/Python/Common/VpdInfoFile.py > > > b/BaseTools/Source/Python/Common/VpdInfoFile.py > > > index 2fb8e66fe99c..3be0670e36fb 100644 > > > --- a/BaseTools/Source/Python/Common/VpdInfoFile.py > > > +++ b/BaseTools/Source/Python/Common/VpdInfoFile.py > > > @@ -57,7 +57,7 @@ FILE_COMMENT_TEMPLATE =3D \ > > > # ::=3D "." > > > # ::=3D C Variable Name of the Token Space GUID > > > # ::=3D C Variable Name of the PCD > > > -# ::=3D {"*"} {} > > > +# ::=3D {TAB_STAR} {} > > > # ::=3D "0x" (a-fA-F0-9){1,8} > > > # ::=3D > > > # ::=3D {} {} {} > > > {} > > > @@ -92,7 +92,7 @@ class VpdInfoFile: > > > if (Vpd is None): > > > EdkLogger.error("VpdInfoFile", > > > BuildToolError.ATTRIBUTE_UNKNOWN_ERROR, "Invalid VPD PCD entry.") > > > > > > - if not (Offset >=3D 0 or Offset =3D=3D "*"): > > > + if not (Offset >=3D 0 or Offset =3D=3D TAB_STAR): > > > EdkLogger.error("VpdInfoFile", > > > BuildToolError.PARAMETER_INVALID, "Invalid offset parameter: %s." % > > > Offset) > > > > > > if Vpd.DatumType =3D=3D TAB_VOID: > > > @@ -186,8 +186,8 @@ class VpdInfoFile: > > > VpdObjectTokenCName =3D PcdItem[0] > > > for sku in VpdObject.SkuInfoList: > > > if VpdObject.TokenSpaceGuidCName =3D=3D > > > TokenSpaceName and VpdObjectTokenCName =3D=3D PcdTokenName.strip() > > and sku =3D=3D SkuId: > > > - if self._VpdArray[VpdObject][sku] =3D=3D "*"= : > > > - if Offset =3D=3D "*": > > > + if self._VpdArray[VpdObject][sku] =3D=3D TAB= _STAR: > > > + if Offset =3D=3D TAB_STAR: > > > EdkLogger.error("BPDG", > > > BuildToolError.FORMAT_INVALID, "The offset of %s has not been fixed > > > up by third-party BPDG tool." % > > > PcdName) > > > self._VpdArray[VpdObject][sku] =3D Offse= t > > > Found =3D True diff --git > > > a/BaseTools/Source/Python/GenFds/FdfParser.py > > > b/BaseTools/Source/Python/GenFds/FdfParser.py > > > index 44cc8f63d07b..cedc4ea0c122 100644 > > > --- a/BaseTools/Source/Python/GenFds/FdfParser.py > > > +++ b/BaseTools/Source/Python/GenFds/FdfParser.py > > > @@ -64,7 +64,6 @@ T_CHAR_CR =3D '\r' > > > T_CHAR_TAB =3D '\t' > > > T_CHAR_DOUBLE_QUOTE =3D '\"' > > > T_CHAR_SINGLE_QUOTE =3D '\'' > > > -T_CHAR_STAR =3D '*' > > > T_CHAR_BRACE_R =3D '}' > > > > > > SEPARATORS =3D {TAB_EQUAL_SPLIT, TAB_VALUE_SPLIT, > > TAB_COMMA_SPLIT, '{', > > > T_CHAR_BRACE_R} @@ -533,7 +532,7 @@ class > > > FdfParser: > > > InComment =3D False > > > HashComment =3D False > > > # check for */ comment end > > > - elif InComment and not DoubleSlashComment and not > > HashComment > > > and self._CurrentChar() =3D=3D T_CHAR_STAR and self._NextChar() =3D= =3D > > > TAB_BACK_SLASH: > > > + elif InComment and not DoubleSlashComment and not > > > HashComment and self._CurrentChar() =3D=3D TAB_STAR and > self._NextChar() > > > =3D=3D TAB_BACK_SLASH: > > > self._SetCurrentCharValue(TAB_SPACE_SPLIT) > > > self._GetOneChar() > > > self._SetCurrentCharValue(TAB_SPACE_SPLIT) > > > @@ -552,7 +551,7 @@ class FdfParser: > > > InComment =3D True > > > HashComment =3D True > > > # check for /* comment start > > > - elif self._CurrentChar() =3D=3D TAB_BACK_SLASH and self.= _NextChar() > > =3D=3D > > > T_CHAR_STAR: > > > + elif self._CurrentChar() =3D=3D TAB_BACK_SLASH and > > > + self._NextChar() =3D=3D > > > TAB_STAR: > > > self._SetCurrentCharValue(TAB_SPACE_SPLIT) > > > self._GetOneChar() > > > self._SetCurrentCharValue(TAB_SPACE_SPLIT) > > > diff --git a/BaseTools/Source/Python/GenFds/GenFds.py > > > b/BaseTools/Source/Python/GenFds/GenFds.py > > > index 0c8091b79841..0513f488fca3 100644 > > > --- a/BaseTools/Source/Python/GenFds/GenFds.py > > > +++ b/BaseTools/Source/Python/GenFds/GenFds.py > > > @@ -653,7 +653,7 @@ class GenFds(object): > > > FileGuidList.append(FileStatementGuid) > > > Name =3D [] > > > FfsPath =3D os.path.join(GenFdsGlobalVariabl= e.FvDir, 'Ffs') > > > - FfsPath =3D glob(os.path.join(FfsPath, FileS= tatementGuid) + > '*') > > > + FfsPath =3D glob(os.path.join(FfsPath, > > > + FileStatementGuid) + TAB_STAR) > > > if not FfsPath: > > > continue > > > if not os.path.exists(FfsPath[0]): > > > diff --git a/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py > > > b/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py > > > index ea61f723a73c..0812c56bdae8 100644 > > > --- a/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py > > > +++ b/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py > > > @@ -217,12 +217,12 @@ class GenFdsGlobalVariable: > > > > > > if not Inf.IsBinaryModule: > > > for File in Inf.Sources: > > > - if File.TagName in {"", "*", GenFdsGlobalVariable.To= olChainTag} > > and > > > \ > > > - File.ToolChainFamily in {"", "*", > > > GenFdsGlobalVariable.ToolChainFamily}: > > > + if File.TagName in {"", DataType.TAB_STAR, > > > GenFdsGlobalVariable.ToolChainTag} and \ > > > + File.ToolChainFamily in {"", DataType.TAB_STAR, > > > GenFdsGlobalVariable.ToolChainFamily}: > > > FileList.append((File, > > > DataType.TAB_UNKNOWN_FILE)) > > > > > > for File in Inf.Binaries: > > > - if File.Target in {DataType.TAB_COMMON, '*', > > > GenFdsGlobalVariable.TargetName}: > > > + if File.Target in {DataType.TAB_COMMON, > > > + DataType.TAB_STAR, > > > GenFdsGlobalVariable.TargetName}: > > > FileList.append((File, File.Type)) > > > > > > for File, FileType in FileList: > > > @@ -893,7 +893,7 @@ def FindExtendTool(KeyStringList, > > > CurrentArchList, > > > NameGuid): > > > for Index in range(2, -1, -1): > > > for Key in list(BuildOption.keys()): > > > List =3D Key.split('_') > > > - if List[Index] =3D=3D '*': > > > + if List[Index] =3D=3D DataType.TAB_STAR: > > > for String in ToolDb[ToolList[Index]]: > > > if String in [Arch, > > > GenFdsGlobalVariable.TargetName, > > > GenFdsGlobalVariable.ToolChainTag]: > > > List[Index] =3D String diff --git > > > a/BaseTools/Source/Python/GenFds/Section.py > > > b/BaseTools/Source/Python/GenFds/Section.py > > > index 19a70009dcce..bab74aedf0b9 100644 > > > --- a/BaseTools/Source/Python/GenFds/Section.py > > > +++ b/BaseTools/Source/Python/GenFds/Section.py > > > @@ -131,7 +131,7 @@ class Section (SectionClassObject): > > > if File.Type =3D=3D FileType or > > > (int(FfsInf.PiSpecVersion, 16) >=3D 0x0001000A \ > > > and FileType =3D=3D > > > 'DXE_DPEX' and File.Type =3D=3D > > > BINARY_FILE_TYPE_SMM_DEPEX) \ > > > or (FileType =3D=3D > > > BINARY_FILE_TYPE_TE and File.Type =3D=3D BINARY_FILE_TYPE_PE32): > > > - if '*' in FfsInf.TargetOverrideList or File.= Target =3D=3D '*' or > > > File.Target in FfsInf.TargetOverrideList or FfsInf.TargetOverrideList= =3D=3D []: > > > + if TAB_STAR in FfsInf.TargetOverrideList or > > > + File.Target =3D=3D > > > TAB_STAR or File.Target in FfsInf.TargetOverrideList or > > > FfsInf.TargetOverrideList =3D=3D []: > > > FileList.append(FfsInf.PatchEfiFile(File= .Path, File.Type)) > > > else: > > > GenFdsGlobalVariable.InfLogger > > > ("\nBuild Target \'%s\' of File %s is not in the Scope of %s > > > specified by INF %s in FDF" %(File.Target, File.File, > > > FfsInf.TargetOverrideList, > > > FfsInf.InfFileName)) diff --git > > > a/BaseTools/Source/Python/Workspace/DscBuildData.py > > > b/BaseTools/Source/Python/Workspace/DscBuildData.py > > > index 11aa63fb263c..22cbbb119a5a 100644 > > > --- a/BaseTools/Source/Python/Workspace/DscBuildData.py > > > +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py > > > @@ -2315,11 +2315,11 @@ class > DscBuildData(PlatformBuildClassObject): > > > continue > > > if Attr !=3D "FLAGS": > > > continue > > > - if Target =3D=3D "*" or Target =3D=3D self._Target: > > > - if Tag =3D=3D "*" or Tag =3D=3D self._Toolchain: > > > + if Target =3D=3D TAB_STAR or Target =3D=3D self._Target: > > > + if Tag =3D=3D TAB_STAR or Tag =3D=3D self._Toolchain= : > > > if 'COMMON' not in BuildOptions: > > > BuildOptions['COMMON'] =3D set() > > > - if Arch =3D=3D "*": > > > + if Arch =3D=3D TAB_STAR: > > > BuildOptions['COMMON'].add(self.BuildOptions= [Options]) > > > if Arch in self.SupArchList: > > > if Arch not in BuildOptions: > > > -- > > > 2.16.2.windows.1 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel