[edk2] [PATCH] [ShellPkg] fix operator

2016-01-20 Thread jaben carsey
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: jaben carsey <jaben.car...@intel.com> --- ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ShellPkg/Library/UefiShellBcfgComm

[edk2] [Patch v2] report line number for command errors in a script.

2016-05-10 Thread Jaben Carsey
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- ShellPkg/Application/Shell/Shell.c | 6 +- ShellPkg/Application/Shell/Shell.uni | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ShellPkg/Application

[edk2] [PATCH] report line number for command errors in a script.

2016-05-10 Thread Jaben Carsey
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- ShellPkg/Application/Shell/Shell.c | 6 +- ShellPkg/Application/Shell/Shell.uni | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ShellPkg/Application

[edk2] [Patch] Use a local variable to cache the pointer.

2016-05-12 Thread Jaben Carsey
CC: Qiu Shumin <shumin@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- ShellPkg/Application/Shell/Shell.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ShellPkg/Application/Shel

[edk2] [Patch] AppPkg: Update email and URL V2.

2016-10-25 Thread Jaben Carsey
Cc: Daryl McDaniel <edk2-li...@mc2research.org> CC: Zhu, Yonghong <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- AppPkg/Applications/Python/Ia32/pyconfig.h | 6 +++--- A

[edk2] [Patch] AppPkg: Update email and URL.

2016-10-24 Thread Jaben Carsey
CC: Daryl McDaniel <edk2-li...@mc2research.org> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- AppPkg/Applications/Python/Ia32/pyconfig.h | 4 ++-- AppPkg/Applications/Python/Ipf/pyconfig.h

[edk2] [PATCH v2 1/1] BaseTools: Ecc - add dict for config file to internal translation

2018-05-04 Thread Jaben Carsey
ng Zhu <yonghong@intel.com> Cc: Laszlo Ersek <ler...@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/Ecc/Configuration.py | 101 +++- 1 file changed, 98 in

[edk2] [PATCH v1 1/1] BaseTools: Ecc - add dict for config file to internal translation

2018-05-04 Thread Jaben Carsey
Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Cc: Laszlo Ersek <ler...@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/Ecc/Configuration

[edk2] [PATCH v3 1/1] BaseTools: Ecc - add dict for config file to internal translation

2018-05-04 Thread Jaben Carsey
. Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Cc: Laszlo Ersek <ler...@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/Ec

[edk2] [PATCH v1 00/11] BaseTools refactoring

2018-05-14 Thread Jaben Carsey
performing operation since strings are immutable and must be completely reallocated and moved for each concatenation. Jaben Carsey (11): BaseTools: decorate base classes to prevent instantiation BaseTools: Workspace - create a base class BaseTools: remove unused code BaseTools: remove repeated

[edk2] [PATCH v1 04/11] BaseTools: remove repeated calls to startswith/endswith

2018-05-14 Thread Jaben Carsey
As both can take a tuple, use that instead of calling repeatedly. Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Sou

[edk2] [PATCH v1 02/11] BaseTools: Workspace - create a base class

2018-05-14 Thread Jaben Carsey
refactor 3 classes and create a new base class for their shared functions. Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseT

[edk2] [PATCH v1 03/11] BaseTools: remove unused code

2018-05-14 Thread Jaben Carsey
1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/AutoGen/GenMake.py | 17 ++-- BaseTools/Source/Python/CommonDataClass/DataClass.py | 47 +-- BaseTools/Source/Python/Ecc/Database.py| 76 + BaseTools/Sour

[edk2] [PATCH v1 06/11] BaseTools: refactor section generation

2018-05-14 Thread Jaben Carsey
use with for opening files remove unneeded variables dont seek to 0 for just opened file Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com&

[edk2] [PATCH v1 08/11] BaseTools: refactor to change object types

2018-05-14 Thread Jaben Carsey
change to object types that are closer to use case. for example: when using a list as a double ended queue, use the built in object. Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by:

[edk2] [PATCH v1 01/11] BaseTools: decorate base classes to prevent instantiation

2018-05-14 Thread Jaben Carsey
1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/AutoGen/AutoGen.py | 4 BaseTools/Source/Python/AutoGen/GenMake.py | 4 BaseTools/Source/Python/AutoGen/ValidCheckingInfoObject.py | 4 BaseTools/So

[edk2] [PATCH v1 05/11] BaseTools: use set presence instead of series of equality

2018-05-14 Thread Jaben Carsey
Instead of testing each equality individually, just make a set and test once. Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseT

[edk2] [PATCH v1 11/11] BaseTools: remove extra assignment

2018-05-14 Thread Jaben Carsey
there is no use to assign back to a variable. just return the result. Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/So

[edk2] [PATCH v1 09/11] BaseTools: refactor to stop re-allocating strings

2018-05-14 Thread Jaben Carsey
strings are immutable. allocate minimal duplication. Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/

[edk2] [PATCH v1 07/11] BaseTools: refactor file opening/writing

2018-05-14 Thread Jaben Carsey
change mode minimal needed permissions change to use with statement Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Sou

[edk2] [PATCH v2 11/27] BaseTools: Workspace/MetaFileParser - refactor dicts

2018-04-27 Thread Jaben Carsey
Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/Workspace/MetaFileParser.py | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/BaseTools/Source/Python/Workspace/Me

[edk2] [PATCH v3 16/27] BaseTools: Replace EDK Component strings with predefined constant

2018-04-27 Thread Jaben Carsey
;yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/Common/DataType.py| 28 ++-- BaseTools/Source/Python/GenFds/FdfParser.py | 6 ++--- BaseTools/Sourc

[edk2] [PATCH v1 25/42] BaseTools: AutoGen - move function to clean file namespace

2018-04-27 Thread Jaben Carsey
the function is only used in one other function. just move it there. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/AutoGen/GenPcdDb.py | 52 ++-- 1 file changed, 26 insertions(

[edk2] [PATCH v1 34/42] BaseTools: standardize GUID and pack size

2018-04-27 Thread Jaben Carsey
on Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/AutoGen/GenPcdDb.py| 45 ++--- BaseTools/Source/Python/AutoGen/GenVar.py | 25 +- BaseTools/Source/Python/AutoGen/ValidChecking

[edk2] [PATCH v1 33/42] BaseTools: AutoGen - add Opcode constants

2018-04-27 Thread Jaben Carsey
add constants for dependency expression opcode strings use these new opcode string constants Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com&

[edk2] [PATCH v1 23/42] BaseTools: refactor __init__ functions to not compute temporary variable

2018-04-27 Thread Jaben Carsey
just assign correct value to member variable in __init__ or call parent __init__ Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> ---

[edk2] [PATCH v1 29/42] BaseTools: AutoGen - refactor more functions only called in __init__

2018-04-27 Thread Jaben Carsey
Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/AutoGen/IdfClassObject.py | 89 +---

[edk2] [PATCH v1 39/42] BaseTools: refactor Depex optomization

2018-04-27 Thread Jaben Carsey
No need to make a list from the set. just pop the item off. Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Sou

[edk2] [PATCH v1 28/42] BaseTools: AutoGen - refactor function to remove extra variables

2018-04-27 Thread Jaben Carsey
we dont need to keep data we already have in different formats... Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Sou

[edk2] [PATCH v1 38/42] BaseTools: Remove lists form set construction

2018-04-27 Thread Jaben Carsey
There is no need to make a list to make a set. remove lists that are only used in constructing sets. Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.c

[edk2] [PATCH v1 37/42] BaseTools: missed a copyright update

2018-04-27 Thread Jaben Carsey
Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/GenPatchPcdTable/GenPatchPcdTable.py | 2 +- 1 file changed,

[edk2] [PATCH v1 30/42] BaseTools: remove unused member variable

2018-04-27 Thread Jaben Carsey
Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/AutoGen/IdfClassObject.py | 1 - 1 file changed, 1 delet

[edk2] [PATCH v1 36/42] BaseTools: GenFds - use existing shared string

2018-04-27 Thread Jaben Carsey
Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/GenFds/Fv.py | 34 ++-- 1 file changed, 17

[edk2] [PATCH v1 31/42] BaseTools: remove redundant content in InfSectionParser

2018-04-27 Thread Jaben Carsey
Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/AutoGen/InfSectionParser.py | 9 - 1 file changed,

[edk2] [PATCH v1 35/42] BaseTools: remove unused variable

2018-04-27 Thread Jaben Carsey
Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/Common/DataType.py | 1 - 1 file changed, 1 deletion(-) diff

[edk2] [PATCH v1 26/42] BaseTools: AutoGen - remove another function no one calls

2018-04-27 Thread Jaben Carsey
Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/AutoGen/GenVar.py | 5 - 1 file changed, 5 deleti

[edk2] [PATCH v1 22/42] BaseTools: AutoGen - no need to recompute

2018-04-27 Thread Jaben Carsey
looping over a list and recomputing the same value has no impact on final value Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseT

[edk2] [PATCH v1 15/42] BaseTools: eliminate {} from dictionary contructor call

2018-04-27 Thread Jaben Carsey
no need to construct 2 dictionaries. Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/Workspace/BuildC

[edk2] [PATCH v1 08/42] BaseTools: AutoGen - share StripComments API

2018-04-27 Thread Jaben Carsey
add the API root in one class file. delete the static API out of both classes. share it in the single location. Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carse

[edk2] [PATCH v1 11/42] BaseTools: Eot - refactor global data

2018-04-27 Thread Jaben Carsey
remove unused lists, dicts, and duplicate variables Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/Eot/Eot

[edk2] [PATCH v1 05/42] BaseTools: AutoGen - refactor assemble_variable

2018-04-27 Thread Jaben Carsey
make this function @staticmethod since self parameter is not used. change valuelist to valuedict since it is a dictionary. Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carse

[edk2] [PATCH v1 01/42] BaseTools: FdfParser - update to remove duplicate constant value

2018-04-27 Thread Jaben Carsey
PCD size by type is shared so this change both removes duplication and makes the function work for all numeric PCD types. Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carse

[edk2] [PATCH v1 12/42] BaseTools: AutoGen - remove global line

2018-04-27 Thread Jaben Carsey
this serves no purpose since we dont change the global or assign to it. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/AutoGen/UniClassObject.py | 2 -- 1 file changed, 2 deletions(-) diff

[edk2] [PATCH v1 10/42] BaseTools: Eot - remove unused lists

2018-04-27 Thread Jaben Carsey
Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/Eot/EotGlobalData.py | 29 1 file cha

[edk2] [PATCH v1 14/42] BaseTools: refactor to use list not dict

2018-04-27 Thread Jaben Carsey
since we never access the values in the copied dict, just use a list instead. Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseT

[edk2] [PATCH v1 17/42] BaseTools: Workspace - refactor a dict

2018-04-27 Thread Jaben Carsey
change a dict to a set since we never examine the contents, just the keys. Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseT

[edk2] [PATCH v1 21/42] BaseTools: AutoGen - refactor out a useless class

2018-04-27 Thread Jaben Carsey
this class was never instantiated. the static function was called. save the function, remove the rest. Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.c

[edk2] [PATCH v1 16/42] BaseTools: remove Compound statements

2018-04-27 Thread Jaben Carsey
split them into 2 seperate lines. Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/Workspace/BuildC

[edk2] [PATCH v1 13/42] BaseTools: AutoGen - UniClassObject refactor static methods

2018-04-27 Thread Jaben Carsey
change methods which do not use self to @staticmethod change their calls to use class name instead of instance Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carse

[edk2] [PATCH v1 18/42] BaseTools: move PCD size calculation functions to PcdClassObject

2018-04-27 Thread Jaben Carsey
move both GetPcdMaxSize and GetPcdSize to the PcdClassObject. fix MAX_SIZE_TYPE to have int values Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.c

[edk2] [PATCH v1 06/42] BaseTools: AutoGen - refactor dictionary access

2018-04-27 Thread Jaben Carsey
dont use dict.get() inside loops of dictionary contents. its not needed. Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseT

[edk2] [PATCH v1 09/42] BaseTools: AutoGen - refactor class factory

2018-04-27 Thread Jaben Carsey
since instances are not added to cache, the factory does nothing. Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Sou

[edk2] [PATCH v1 04/42] BaseTools: this function has no purpose.

2018-04-27 Thread Jaben Carsey
it looks like a old POC of the concepts then used to make the classes in the file. Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> ---

[edk2] [PATCH v1 19/42] BaseTools: AutoGen - refactor out functions only called in __init__

2018-04-27 Thread Jaben Carsey
Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/AutoGen/ValidCheckingInfoObject.py | 16 +---

[edk2] [PATCH v1 24/42] BaseTools: AutoGen - remove function no one calls

2018-04-27 Thread Jaben Carsey
Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/AutoGen/GenPcdDb.py | 11 --- 1 file changed, 11

[edk2] [PATCH v1 20/42] BaseTools: AutoGen - refactor out a list

2018-04-27 Thread Jaben Carsey
the lists were used in __init__ then converted to sets instead just use the sets from the begining Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.c

[edk2] [PATCH v1 27/42] BaseTools: Refactor to share GUID packing function

2018-04-27 Thread Jaben Carsey
Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/AutoGen/GenPcdDb.py | 17 ++--- 1 file changed, 2

[edk2] [PATCH v1 02/42] BaseTools: AutoGen - update to remove duplicate constant value

2018-04-27 Thread Jaben Carsey
PCD size by type is shared. just use it. Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/AutoGen/ValidChe

[edk2] [PATCH v1 03/42] BaseTools: check before accessing members in __eq__

2018-04-27 Thread Jaben Carsey
minimize risk for exceptions. Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/AutoGen/ValidCheckin

[edk2] [PATCH v1 40/42] BaseTools: dont make iterator into list if not needed

2018-04-27 Thread Jaben Carsey
functions (like join) can use the iterator just as easily. Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/

[edk2] [PATCH v1 41/42] BaseTools: create base expression class

2018-04-27 Thread Jaben Carsey
this class has a fucntion to share between Exception and RangeExpression change both classes to call this function init in their init Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by:

[edk2] [PATCH v1 42/42] BaseTools: use set instead of list

2018-04-27 Thread Jaben Carsey
as we only do membership (in) testing for this, set is better Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/So

[edk2] [PATCH v1 07/42] BaseTools: AutoGen - GenVar refactor static methods

2018-04-27 Thread Jaben Carsey
change methods which do not use self to @staticmethod change their calls to use class name instead of instance Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carse

[edk2] [PATCH v1 00/42] BaseTools: refactoring patches

2018-04-27 Thread Jaben Carsey
removes lots of trailing whitepsace, without making any other changes. Jaben Carsey (42): BaseTools: FdfParser - update to remove duplicate constant value BaseTools: AutoGen - update to remove duplicate constant value BaseTools: check before accessing members in __eq__ BaseTools: this function

[edk2] [PATCH v2 1/1] BaseTools: loop to retry remove when it fails.

2018-05-10 Thread Jaben Carsey
oCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/Common/LongFilePathOs.py | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/BaseTools/Source/Python/Common/LongFilePathOs.py b/BaseTo

[edk2] [PATCH v1 1/1] BaseTools: loop to retry remove when it fails.

2018-05-09 Thread Jaben Carsey
There is a common race condition when the OS fails to release a file fast enough. this adds a retry loop. Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.c

[edk2] [PATCH v1 1/1] BaseTools: incorrect calculation for 16M

2018-05-08 Thread Jaben Carsey
the "0x" was missing. Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/GenFds/FvImageSection.py

[edk2] [PATCH v1 1/1] BaseTools: Add missing content to EOT tool.

2018-05-24 Thread Jaben Carsey
Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/Eot/Eot.py | 1444 +++- BaseTools

[edk2] [PATCH v1 0/2] BaseTools: cleanup for speed

2018-05-17 Thread Jaben Carsey
the first patch merges 2 almost identical functions by moving optional output to the WorkspaceCommon version and then calls it from AutoGen. the second patch is lots of small cleanups. Jaben Carsey (2): BaseTools: refactor to remove functions BaseTools: Cleanup unneeded code BaseTools

[edk2] [PATCH v1 2/2] BaseTools: Cleanup unneeded code

2018-05-17 Thread Jaben Carsey
Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/AutoGen/AutoGen.py | 335 +---

[edk2] [PATCH v1 1/2] BaseTools: refactor to remove functions

2018-05-17 Thread Jaben Carsey
refactoring almost identical functions to delete and use the other. Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Sou

[edk2] [PATCH v1 1/1] BaseTools: Refactoring to save time

2018-06-04 Thread Jaben Carsey
d sdict class Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/AutoGen/AutoGen.py | 38 +- BaseTools/Source/Python/AutoGen/GenC.py | 454 ++-- BaseTools/Source/Python/AutoG

[edk2] [PATCH v1 1/1] BaseTools: AutoGen - move constructor out of loop

2018-06-27 Thread Jaben Carsey
Create the 2 comparison objects once outside the loop. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/AutoGen/AutoGen.py | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git

[edk2] [PATCH v1 1/1] BaseTools: AutoGen - clean up access

2018-06-27 Thread Jaben Carsey
1) add a property so others can access needed data 2) change GenMake to use property 3) add local variable in GenMake to speed up access Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/AutoGen

[edk2] [PATCH v1 1/1] BaseTools: AutoGen - Remove unused variables.

2018-06-25 Thread Jaben Carsey
There are 2 variables that we populate, but never use. remove them entirely. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/AutoGen/AutoGen.py | 10 -- 1 file changed, 10 deletions

[edk2] [PATCH v1 08/11] BaseTools: refactor to change object types

2018-06-20 Thread Jaben Carsey
change to object types that are closer to use case. for example: when using a list as a double ended queue, use the built in object. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/AutoGen

[edk2] [PATCH v1 07/11] BaseTools: refactor file opening/writing

2018-06-20 Thread Jaben Carsey
change mode minimal needed permissions change to use with statement Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/AutoGen/AutoGen.py | 57 - BaseTools/Source/Python

[edk2] [PATCH v1 09/11] BaseTools: refactor to stop re-allocating strings

2018-06-20 Thread Jaben Carsey
strings are immutable. allocate minimal duplication. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/AutoGen/AutoGen.py | 30 BaseTools/Source/Python/AutoGen/GenC.py

[edk2] [PATCH v1 11/11] BaseTools: remove extra assignment

2018-06-20 Thread Jaben Carsey
there is no use to assign back to a variable. just return the result. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/Common/Expression.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions

[edk2] [PATCH v1 04/11] BaseTools: remove repeated calls to startswith/endswith

2018-06-20 Thread Jaben Carsey
As both can take a tuple, use that instead of calling repeatedly. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/AutoGen/GenMake.py | 2 +- BaseTools/Source/Python/AutoGen

[edk2] [PATCH v1 05/11] BaseTools: use set presence instead of series of equality

2018-06-20 Thread Jaben Carsey
Instead of testing each equality individually, just make a set and test once. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/Ecc/Configuration.py | 10 +- 1 file changed, 1 insertion(+), 9

[edk2] [PATCH v1 06/11] BaseTools: refactor section generation

2018-06-20 Thread Jaben Carsey
use with for opening files remove unneeded variables dont seek to 0 for just opened file Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/Common/DataType.py | 1 + BaseTools/Source

[edk2] [PATCH v1 02/11] BaseTools: Workspace - create a base class

2018-06-20 Thread Jaben Carsey
refactor 3 classes and create a new base class for their shared functions. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/Workspace/BuildClassObject.py | 140 +++- 1 file changed

[edk2] [PATCH v1 03/11] BaseTools: remove unused code

2018-06-20 Thread Jaben Carsey
delete commented out code delete never used class/variable/function/import refactor to remove Ffs class dont construct class just for class attribute Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python

[edk2] [PATCH v2 00/11] BaseTools Refactoring

2018-06-20 Thread Jaben Carsey
performing operation since strings are immutable and must be completely reallocated and moved for each concatenation. v2: Update for concerns sent by Yonghong. Jaben Carsey (11): BaseTools: decorate base classes to prevent instantiation BaseTools: Workspace - create a base class BaseTools

[edk2] [PATCH v1 01/11] BaseTools: decorate base classes to prevent instantiation

2018-06-20 Thread Jaben Carsey
use python's ABC (abstract base class) to raise type errors if we instantiate classes we designed to be used only as base classes for other classes. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python

[edk2] [PATCH v1 1/1] BaseTools: Move variable out of Global

2018-06-26 Thread Jaben Carsey
Move single use list from GlobalData (gTempInfs) into the file that uses it as _TempInfs Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/Common/GlobalData.py | 7 --- BaseTools/Source/Python

[edk2] [PATCH v2 16/27] BaseTools: Replace EDK Component strings with predefined constant

2018-04-26 Thread Jaben Carsey
intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/Common/DataType.py| 28 ++-- BaseTools/Source/Python/GenFds/FdfParser.py | 6 ++--- BaseTools/Source/Py

[edk2] [PATCH v2 13/27] BaseTools: replace string constants used for module types

2018-04-26 Thread Jaben Carsey
was 'MM_STANDALONE' SUP_MODULE_MM_CORE_STANDALONE was 'MM_CORE_STANDALONE' v2 - fix Yonghong's comments. Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.c

[edk2] [PATCH v2 19/27] BaseTools: Replace Binary File type strings with predefined constant

2018-04-26 Thread Jaben Carsey
- split apart FV and GUID types with different meanings. Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/

[edk2] [PATCH v2 21/27] BaseTools: replace string with predefined constant

2018-04-26 Thread Jaben Carsey
v2 - add missing namespace. Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/Ecc/Check.py | 2 +- 1 file ch

[edk2] [PATCH v2 18/27] BaseTools: Replace PCD type strings with predefined constant

2018-04-26 Thread Jaben Carsey
v2 - fix YongHong's comment. Cc: Liming Gao <liming@intel.com> Cc: Yonghong Zhu <yonghong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.car...@intel.com> --- BaseTools/Source/Python/AutoGen/AutoGen.py |

[edk2] [PATCH v1 1/1] PatchCheck - add error message for invalid parameter

2018-08-02 Thread Jaben Carsey
Currently if an invalid parameter is passed, it gives a stack trace. This changes it to an error message. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Scripts/PatchCheck.py | 9 ++--- 1 file changed, 6

[edk2] [PATCH v1 2/5] BaseTools: AutoGen - tag a function as cachable

2018-08-03 Thread Jaben Carsey
MakeFile generation is once per module, so mark it as such. also move the time stamp creation function inside as it's only called from one place. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python

[edk2] [PATCH v1 1/5] BaseTools: AutoGen refactor ModuleAutoGen caching

2018-08-03 Thread Jaben Carsey
: Bob Feng Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/AutoGen/AutoGen.py | 1147 +--- BaseTools/Source/Python/AutoGen/GenC.py|2 +- BaseTools/Source/Python/AutoGen/GenMake.py | 12 +- BaseTools/Source/Pyt

[edk2] [PATCH v1 3/5] BaseTools: AutoGen refactor to iterate less

2018-08-03 Thread Jaben Carsey
-by: Jaben Carsey --- BaseTools/Source/Python/AutoGen/AutoGen.py | 138 ++-- 1 file changed, 66 insertions(+), 72 deletions(-) diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py index 55c84fe4fbc2..7c67f40bff00 100644 --- a/BaseTools

[edk2] [PATCH v1 0/5] Refactor AutoGen - class ModuleAutoGen

2018-08-03 Thread Jaben Carsey
. Jaben Carsey (5): BaseTools: AutoGen refactor ModuleAutoGen caching BaseTools: AutoGen - tag a function as cachable BaseTools: AutoGen refactor to iterate less BaseTools/Source/Python/AutoGen/AutoGen.py | 1852 +--- BaseTools/Source/Python/AutoGen/BuildEngine.py | 36

[edk2] [PATCH v1 1/1] BaseTools: Eot - fix variable names

2018-08-07 Thread Jaben Carsey
1) currently a couple classes use m instead of self (including some mixed functions that should have previously failed). 2) deleted some blank lines. Cc: Yonghong Zhu Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python

[edk2] [PATCH v1 1/1] BaseTools: remove unused code

2018-08-16 Thread Jaben Carsey
the if statment just has pass statement. invert if condition and just use do the else work. Cc: Yonghong Zhu Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/Workspace/InfBuildData.py | 6 +- 1 file changed, 1

[edk2] [PATCH v1 1/1] BaseTools: remove unused setter functions

2018-08-17 Thread Jaben Carsey
Cc: Yonghong Zhu Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/Workspace/DecBuildData.py | 17 +-- BaseTools/Source/Python/Workspace/DscBuildData.py | 17 +-- BaseTools/Source/Python/Workspace

  1   2   3   4   >