Re: [edk2] [Patch v1 1/1] BaseTools: create and use a standard shared variable for '*'
I will submit a new change with those changed back. -Jaben > -Original Message- > From: edk2-devel [mailto:edk2-devel-boun...@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 > > How about undo those and push the remaining? Since that's a very small > change. > > -Jaben > > > -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 = ['+', '-', '*', '/', '%', '&', '|', '^', '~', '<<', > > > '>>', '!', '=', '>', > > '<', > > > '?', ':'] > > > +NonLetterOpLst = ['+', '-', TAB_STAR, '/', '%', '&', '|', '^', > > > + '~', '<<', '>>', '!', '=', > > > '>', '<', '?', ':'] > > > > > > 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 > >
Re: [edk2] [Patch v1 1/1] BaseTools: create and use a standard shared variable for '*'
How about undo those and push the remaining? Since that's a very small change. -Jaben > -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 = ['+', '-', '*', '/', '%', '&', '|', '^', '~', '<<', > > '>>', '!', '=', '>', > '<', > > '?', ':'] > > +NonLetterOpLst = ['+', '-', TAB_STAR, '/', '%', '&', '|', '^', > > + '~', '<<', '>>', '!', '=', > > '>', '<', '?', ':'] > > > > 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 = Sku.DefaultValue > > if PcdValue == "": > > PcdValue = Pcd.DefaultValue > > -if Sku.VpdOffset != '*': > > +if Sku.VpdOffset != TAB_STAR: > > if PcdValue.startswith("{"): > > Alignment = 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.VpdOffset == > > "*": > > +if not NeedProcessVpdMapFile and > > + Sku.VpdOffset == > > TAB_STAR: > > NeedProcessVpdMapFile = True > > if self.Platform.VpdToolGuid is None or > > self.Platform.VpdToolGuid == '': > > EdkLogger.error("Build", > > FILE_NOT_FOUND, \ @@ -1522,7 > > +1522,7 @@ class PlatformAutoGen(AutoGen): > > PcdValue = Sku.DefaultValue > > if PcdValue == "": > > PcdValue = DscPcdEntry.DefaultValue > > -if Sku.VpdOffset != '*': > > +if Sku.VpdOffse
Re: [edk2] [Patch v1 1/1] BaseTools: create and use a standard shared variable for '*'
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 = ['+', '-', '*', '/', '%', '&', '|', '^', '~', '<<', > '>>', '!', '=', '>', '<', > '?', ':'] > +NonLetterOpLst = ['+', '-', TAB_STAR, '/', '%', '&', '|', '^', > + '~', '<<', '>>', '!', '=', > '>', '<', '?', ':'] > > 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 = Sku.DefaultValue > if PcdValue == "": > PcdValue = Pcd.DefaultValue > -if Sku.VpdOffset != '*': > +if Sku.VpdOffset != TAB_STAR: > if PcdValue.startswith("{"): > Alignment = 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.VpdOffset == > "*": > +if not NeedProcessVpdMapFile and > + Sku.VpdOffset == > TAB_STAR: > NeedProcessVpdMapFile = True > if self.Platform.VpdToolGuid is None or > self.Platform.VpdToolGuid == '': > EdkLogger.error("Build", > FILE_NOT_FOUND, \ @@ -1522,7 > +1522,7 @@ class PlatformAutoGen(AutoGen): > PcdValue = Sku.DefaultValue > if PcdValue == "": > PcdValue = DscPcdEntry.DefaultValue > -if Sku.VpdOffset != '*': > +if Sku.VpdOffset != TAB_STAR: > if PcdValue.startswith("{"): > Alignment = 8 > elif PcdValue.startswith("L"): > @@ -1545,7 +1545,7 @@ class PlatformAutoGen(AutoGen): > SkuValueMap[PcdValue] = [] > VpdFile.Add(DscPcdEntry, SkuName, > Sku.VpdOffset) > SkuValueMap[PcdValue].append(Sku) > -if not NeedProcessVpdMapFile and > Sku.VpdOffset == "*": > +
Re: [edk2] [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 = ['+', '-', '*', '/', '%', '&', '|', '^', '~', '<<', > '>>', '!', '=', '>', '<', > '?', ':'] > +NonLetterOpLst = ['+', '-', TAB_STAR, '/', '%', '&', '|', '^', '~', > '<<', '>>', '!', '=', > '>', '<', '?', ':'] > > 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 = Sku.DefaultValue > if PcdValue == "": > PcdValue = Pcd.DefaultValue > -if Sku.VpdOffset != '*': > +if Sku.VpdOffset != TAB_STAR: > if PcdValue.startswith("{"): > Alignment = 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.VpdOffset == > "*": > +if not NeedProcessVpdMapFile and Sku.VpdOffset == > TAB_STAR: > NeedProcessVpdMapFile = True > if self.Platform.VpdToolGuid is None or > self.Platform.VpdToolGuid == '': > EdkLogger.error("Build", FILE_NOT_FOUND, \ > @@ -1522,7 > +1522,7 @@ class PlatformAutoGen(AutoGen): > PcdValue = Sku.DefaultValue > if PcdValue == "": > PcdValue = DscPcdEntry.DefaultValue > -if Sku.VpdOffset != '*': > +if Sku.VpdOffset != TAB_STAR: > if PcdValue.startswith("{"): > Alignment = 8 > elif PcdValue.startswith("L"): > @@ -1545,7 +1545,7 @@ class PlatformAutoGen(AutoGen): > SkuValueMap[PcdValue] = [] > VpdFile.Add(DscPcdEntry, SkuName, > Sku.VpdOffset) > SkuValueMap[PcdValue].append(Sku) > -if not NeedProcessVpdMapFile and > Sku.VpdOffset == "*": > +if not NeedProcessVpdMapFile and > Sku.VpdOffset == > TAB_STAR: > NeedProcessVpdMapFile = True > if DscPcdEntry.DatumType == TAB_VOID and > PcdValue.startswith("L"): > UnicodePcdArray.a
Re: [edk2] [Patch v1 1/1] BaseTools: create and use a standard shared variable for '*'
Hi Jaben, In this patch, it also changed the mathematics multiplicative '*' (used in expression) to TAB_STAR, is it by on purpose? Eg: -NonLetterOpLst = ['+', '-', '*', '/', '%', '&', '|', '^', '~', '<<', '>>', '!', '=', '>', '<', '?', ':'] +NonLetterOpLst = ['+', '-', TAB_STAR, '/', '%', '&', '|', '^', '~', '<<', '>>', '!', '=', '>', '<', '?', ':'] 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 = Sku.DefaultValue if PcdValue == "": PcdValue = Pcd.DefaultValue -if Sku.VpdOffset != '*': +if Sku.VpdOffset != TAB_STAR: if PcdValue.startswith("{"): Alignment = 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.VpdOffset == "*": +if not NeedProcessVpdMapFile and Sku.VpdOffset == TAB_STAR: NeedProcessVpdMapFile = True if self.Platform.VpdToolGuid is None or self.Platform.VpdToolGuid == '': EdkLogger.error("Build", FILE_NOT_FOUND, \ @@ -1522,7 +1522,7 @@ class PlatformAutoGen(AutoGen): PcdValue = Sku.DefaultValue if PcdValue == "": PcdValue = DscPcdEntry.DefaultValue -if Sku.VpdOffset != '*': +if Sku.VpdOffset != TAB_STAR: if PcdValue.startswith("{"): Alignment = 8 elif PcdValue.startswith("L"): @@ -1545,7 +1545,7 @@ class PlatformAutoGen(AutoGen): SkuValueMap[PcdValue] = [] VpdFile.Add(DscPcdEntry, SkuName, Sku.VpdOffset) SkuValueMap[PcdValue].append(Sku) -if not NeedProcessVpdMapFile and Sku.VpdOffset == "*": +if not NeedProcessVpdMapFile and Sku.VpdOffset == TAB_STAR: NeedProcessVpdMapFile = True if DscPcdEntry.DatumType == 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 = VpdFile.GetVpdInfo(pcd) if vpdinfo is None: @@ -2210,15 +2210,15 @@ class PlatformAutoGen(AutoGen): def CalculatePriorityValue(self, Key): Target, ToolChain, Arch, CommandType, Attr = Key.split('_') Priorit
Re: [edk2] [Patch v1 1/1] BaseTools: create and use a standard shared variable for '*'
Reviewed-by : Bob Feng -Original Message- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Jaben Carsey Sent: Friday, November 16, 2018 11:40 PM To: edk2-devel@lists.01.org Cc: Gao, Liming Subject: [edk2] [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 = Sku.DefaultValue if PcdValue == "": PcdValue = Pcd.DefaultValue -if Sku.VpdOffset != '*': +if Sku.VpdOffset != TAB_STAR: if PcdValue.startswith("{"): Alignment = 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.VpdOffset == "*": +if not NeedProcessVpdMapFile and Sku.VpdOffset == TAB_STAR: NeedProcessVpdMapFile = True if self.Platform.VpdToolGuid is None or self.Platform.VpdToolGuid == '': EdkLogger.error("Build", FILE_NOT_FOUND, \ @@ -1522,7 +1522,7 @@ class PlatformAutoGen(AutoGen): PcdValue = Sku.DefaultValue if PcdValue == "": PcdValue = DscPcdEntry.DefaultValue -if Sku.VpdOffset != '*': +if Sku.VpdOffset != TAB_STAR: if PcdValue.startswith("{"): Alignment = 8 elif PcdValue.startswith("L"): @@ -1545,7 +1545,7 @@ class PlatformAutoGen(AutoGen): SkuValueMap[PcdValue] = [] VpdFile.Add(DscPcdEntry, SkuName, Sku.VpdOffset) SkuValueMap[PcdValue].append(Sku) -if not NeedProcessVpdMapFile and Sku.VpdOffset == "*": +if not NeedProcessVpdMapFile and Sku.VpdOffset == TAB_STAR: NeedProcessVpdMapFile = True if DscPcdEntry.DatumType == 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 = VpdFile.GetVpdInfo(pcd) if vpdinfo is None: @@ -2210,15 +2210,15 @@ class PlatformAutoGen(AutoGen): def CalculatePriorityValue(self, Key): Target, ToolChain, Arch, CommandType, Attr = Key.split('_') PriorityValue = 0x1 -if Target == "*": +if Target == TAB_STAR: PriorityValue &= 0x0 -
Re: [edk2] [Patch v1 1/1] BaseTools: create and use a standard shared variable for '*'
Poke. Any comments on this one? > -Original Message- > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of > Jaben Carsey > Sent: Friday, November 16, 2018 7:40 AM > To: edk2-devel@lists.01.org > Cc: Gao, Liming > Subject: [edk2] [Patch v1 1/1] BaseTools: create and use a standard shared > variable for '*' > Importance: High > > 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 = Sku.DefaultValue > if PcdValue == "": > PcdValue = Pcd.DefaultValue > -if Sku.VpdOffset != '*': > +if Sku.VpdOffset != TAB_STAR: > if PcdValue.startswith("{"): > Alignment = 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.VpdOffset == > "*": > +if not NeedProcessVpdMapFile and Sku.VpdOffset == > TAB_STAR: > NeedProcessVpdMapFile = True > if self.Platform.VpdToolGuid is None or > self.Platform.VpdToolGuid == '': > EdkLogger.error("Build", FILE_NOT_FOUND, \ > @@ -1522,7 +1522,7 @@ class PlatformAutoGen(AutoGen): > PcdValue = Sku.DefaultValue > if PcdValue == "": > PcdValue = DscPcdEntry.DefaultValue > -if Sku.VpdOffset != '*': > +if Sku.VpdOffset != TAB_STAR: > if PcdValue.startswith("{"): > Alignment = 8 > elif PcdValue.startswith("L"): > @@ -1545,7 +1545,7 @@ class PlatformAutoGen(AutoGen): > SkuValueMap[PcdValue] = [] > VpdFile.Add(DscPcdEntry, SkuName, > Sku.VpdOffset) > SkuValueMap[PcdValue].append(Sku) > -if not NeedProcessVpdMapFile and > Sku.VpdOffset == "*": > +if not NeedProcessVpdMapFile and > Sku.VpdOffset == > TAB_STAR: > NeedProcessVpdMapFile = True > if DscPcdEntry.DatumType == 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 off
[edk2] [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 = Sku.DefaultValue if PcdValue == "": PcdValue = Pcd.DefaultValue -if Sku.VpdOffset != '*': +if Sku.VpdOffset != TAB_STAR: if PcdValue.startswith("{"): Alignment = 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.VpdOffset == "*": +if not NeedProcessVpdMapFile and Sku.VpdOffset == TAB_STAR: NeedProcessVpdMapFile = True if self.Platform.VpdToolGuid is None or self.Platform.VpdToolGuid == '': EdkLogger.error("Build", FILE_NOT_FOUND, \ @@ -1522,7 +1522,7 @@ class PlatformAutoGen(AutoGen): PcdValue = Sku.DefaultValue if PcdValue == "": PcdValue = DscPcdEntry.DefaultValue -if Sku.VpdOffset != '*': +if Sku.VpdOffset != TAB_STAR: if PcdValue.startswith("{"): Alignment = 8 elif PcdValue.startswith("L"): @@ -1545,7 +1545,7 @@ class PlatformAutoGen(AutoGen): SkuValueMap[PcdValue] = [] VpdFile.Add(DscPcdEntry, SkuName, Sku.VpdOffset) SkuValueMap[PcdValue].append(Sku) -if not NeedProcessVpdMapFile and Sku.VpdOffset == "*": +if not NeedProcessVpdMapFile and Sku.VpdOffset == TAB_STAR: NeedProcessVpdMapFile = True if DscPcdEntry.DatumType == 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 = VpdFile.GetVpdInfo(pcd) if vpdinfo is None: @@ -2210,15 +2210,15 @@ class PlatformAutoGen(AutoGen): def CalculatePriorityValue(self, Key): Target, ToolChain, Arch, CommandType, Attr = Key.split('_') PriorityValue = 0x1 -if Target == "*": +if Target == TAB_STAR: PriorityValue &= 0x0 -if ToolChain == "*": +if ToolChain == TAB_STAR: PriorityValue &= 0x10111 -if Arch == "*": +if Arch == TAB_STAR: PriorityValue &= 0x11011 -if CommandType == "*": +if CommandType == TAB_STAR: PriorityValue &= 0x11101 -if Attr == "*": +if Attr == TAB_STAR: PriorityValue &= 0x0 return self.PrioList["0x%0.5x" % PriorityValue] @@ -2253,9 +2253,9 @@ class PlatformAutoGen(AutoGen):