Re: [edk2] [PATCH 1/2] MdeModulePkg UsbBusDxe: Fix wrong buffer length used to read hub desc

2018-06-25 Thread Ni, Ruiyu
On 6/25/2018 6:38 PM, Star Zeng wrote: REF: https://bugzilla.tianocore.org/show_bug.cgi?id=973 HUB descriptor has variable length. But the code uses stack (HubDesc in UsbHubInit) with fixed length sizeof(EFI_USB_HUB_DESCRIPTOR) to hold HUB descriptor data. It uses hard code length value (32 that

[edk2] [patch] ShellPkg/DP: Add more check for input parameters

2018-06-25 Thread Dandan Bi
New added checkers includes: 1. Too many invalid parameters 2. Too few parameter 3. Invalid number parameter for -n and -t flag 4. Conflict parameter of -A and -R. Cc: Liming Gao Cc: Ruiyu Ni Cc: Jaben Carsey Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dandan Bi ---

Re: [edk2] [PATCH v4 00/20] BaseTools: One step toward python3

2018-06-25 Thread Zhu, Yonghong
Hi Gary, The V4 patches are good to me. I will push this series in recent days if no other comment from community. Reviewed-by: Yonghong Zhu Best Regards, Zhu Yonghong -Original Message- From: Gary Lin [mailto:g...@suse.com] Sent: Monday, June 25, 2018 6:31 PM To: edk2-devel@lists.0

Re: [edk2] [PATCH v2 1/1] BaseTools/tools_def: Add GCC49xASL Toolchain support

2018-06-25 Thread Gao, Liming
Chris: Here is the example usage. You can add below [BuildOptions] in your platform DSC. Then, it will use override ASL path and flag. [BuildOptions] *_*_*_ASL_PATH == C:\Asl\asl.exe *_*_*_ASL_FLAGS== /MsftInternal *_*_*_ASL_OUTFLAGS

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

2018-06-25 Thread Zhu, Yonghong
Reviewed-by: Yonghong Zhu Best Regards, Zhu Yonghong -Original Message- From: Carsey, Jaben Sent: Tuesday, June 26, 2018 7:18 AM To: edk2-devel@lists.01.org Cc: Gao, Liming ; Zhu, Yonghong Subject: [PATCH v1 1/1] BaseTools: AutoGen - Remove unused variables. There are 2 variables th

Re: [edk2] [PATCH v4 00/20] BaseTools: One step toward python3

2018-06-25 Thread Gary Lin
On Mon, Jun 25, 2018 at 06:31:23PM +0800, Gary Lin wrote: > v4 changes: v4 is rebased to 3b03b5e990f8bb347dfdb91926d8ef015d0b607e > - Remove the range() patch since it needs python-future > - Remove the patch to unify long and int since it caused error in > windows. > - Split the absolut

Re: [edk2] [Patch] BaseTools: Fix two drivers include the same file issue

2018-06-25 Thread Zhu, Yonghong
Reviewed-by: Yonghong Zhu Best Regards, Zhu Yonghong -Original Message- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Yonghong Zhu Sent: Monday, June 25, 2018 8:48 AM To: edk2-devel@lists.01.org Cc: Feng, YunhuaX ; Gao, Liming Subject: [edk2] [Patch] BaseTo

Re: [edk2] [PATCH] BaseTools/PackageDocumentTools: Correct INI parse condition check

2018-06-25 Thread Zhu, Yonghong
Reviewed-by: Yonghong Zhu Best Regards, Zhu Yonghong -Original Message- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Yonghong Zhu Sent: Tuesday, June 26, 2018 8:57 AM To: edk2-devel@lists.01.org Cc: Chen, Pai-chingX ; c...@ml01.01.org Subject: [edk2] [PATCH]

[edk2] [PATCH] BaseTools/PackageDocumentTools: Correct INI parse condition check

2018-06-25 Thread Yonghong Zhu
From: "Chen, Pai-Ching" Change-Id: I147ad470d5840c6fee1086f629991f8a9f9d9056 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chen, Pai-Ching --- .../Scripts/PackageDocumentTools/plugins/EdkPlugins/basemodel/ini.py| 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [edk2] [PATCH 1/1] Nt32Pkg/WinNtBusDriverDxe: Fix memory allocation size

2018-06-25 Thread Wu, Hao A
Reviewed-by: Hao Wu Best Regards, Hao Wu > -Original Message- > From: Thomas Palmer [mailto:thomas.pal...@hpe.com] > Sent: Tuesday, June 26, 2018 2:15 AM > To: edk2-devel@lists.01.org > Cc: gar...@hpe.com; joseph.shiffl...@hpe.com; Ni, Ruiyu; Wu, Hao A; Thomas > Palmer > Subject: [PATCH

[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(-) diff

Re: [edk2] [PATCH v2 1/1] BaseTools/tools_def: Add GCC49xASL Toolchain support

2018-06-25 Thread Chris Co
> -Original Message- > From: Leif Lindholm > Sent: Monday, June 25, 2018 12:10 PM > To: Chris Co > Cc: Ard Biesheuvel ; edk2-devel@lists.01.org; > Charles Garcia-Tobin > Subject: Re: [edk2] [PATCH v2 1/1] BaseTools/tools_def: Add GCC49xASL > Toolchain support > > On Mon, Jun 25, 2018 at

Re: [edk2] [PATCH v2 1/1] BaseTools/tools_def: Add GCC49xASL Toolchain support

2018-06-25 Thread Leif Lindholm
On Mon, Jun 25, 2018 at 06:21:27PM +, Chris Co wrote: > > >-Original Message- > > >From: Ard Biesheuvel [mailto:ard.biesheu...@linaro.org] > > >Sent: Monday, June 25, 2018 3:34 PM > > >To: Gao, Liming > > >Cc: Chris Co ; edk2-devel@lists.01.org; > > >Leif Lindholm ; Charles Garcia-Tobi

Re: [edk2] [PATCH v2 1/1] BaseTools/tools_def: Add GCC49xASL Toolchain support

2018-06-25 Thread Chris Co
> -Original Message- > From: Gao, Liming > Sent: Monday, June 25, 2018 1:15 AM > To: Ard Biesheuvel > Cc: Chris Co ; edk2-devel@lists.01.org; Leif > Lindholm ; Charles Garcia-Tobin to...@arm.com> > Subject: RE: [edk2] [PATCH v2 1/1] BaseTools/tools_def: Add GCC49xASL > Toolchain suppo

[edk2] [PATCH 1/1] Nt32Pkg/WinNtBusDriverDxe: Fix memory allocation size

2018-06-25 Thread Thomas Palmer
A single byte was allocate for a CHAR16 NUL terminator when instead two bytes should have been used. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Thomas Palmer --- Nt32Pkg/WinNtBusDriverDxe/WinNtBusDriver.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff -

Re: [edk2] [PATCH 2/2] MdeModulePkg UsbBusPei: Fix wrong buffer length used to read hub desc

2018-06-25 Thread Bret Barkelew
Reviewed-by: Bret Barkelew - Bret From: Star Zeng Sent: Monday, June 25, 2018 3:38:13 AM To: edk2-devel@lists.01.org Cc: Star Zeng; Jiewen Yao; Ruiyu Ni; Bret Barkelew Subject: [PATCH 2/2] MdeModulePkg UsbBusPei: Fix wrong buffer length used to read hub des

Re: [edk2] [PATCH 1/2] MdeModulePkg UsbBusDxe: Fix wrong buffer length used to read hub desc

2018-06-25 Thread Bret Barkelew
Reviewed-by: Bret Barkelew - Bret From: Star Zeng Sent: Monday, June 25, 2018 3:38:12 AM To: edk2-devel@lists.01.org Cc: Star Zeng; Jiewen Yao; Ruiyu Ni; Bret Barkelew Subject: [PATCH 1/2] MdeModulePkg UsbBusDxe: Fix wrong buffer length used to read hub des

Re: [edk2] [PATCH] UefiCpuPkg/MpInitLib: AP uses memory preceding IDT to store CpuMpData

2018-06-25 Thread Laszlo Ersek
On 06/25/18 18:01, Laszlo Ersek wrote: > Hello Ray, > > On 06/25/18 04:54, Ruiyu Ni wrote: >> Today's MpInitLib PEI implementation directly calls >> PeiServices->GetHobList() from AP which may cause racing issue. >> >> This patch fixes this issue by storing the CpuMpData to memory >> preceding IDT

Re: [edk2] [PATCH] UefiCpuPkg/MpInitLib: AP uses memory preceding IDT to store CpuMpData

2018-06-25 Thread Laszlo Ersek
Hello Ray, On 06/25/18 04:54, Ruiyu Ni wrote: > Today's MpInitLib PEI implementation directly calls > PeiServices->GetHobList() from AP which may cause racing issue. > > This patch fixes this issue by storing the CpuMpData to memory > preceding IDT. Pointer to PeiServices pointer is stored there,

Re: [edk2] [RFC] EDK II stable tag releases

2018-06-25 Thread Laszlo Ersek
On 06/25/18 01:07, Kinney, Michael D wrote: > Hello, > > This is a proposal for periodic stable tags on edk2 repositories. > > The goal is to produce a stable tag for edk2 repositories every 3 months > with the initial proposed dates of 8/10/2018 and 11/16/2018. Each release > is preceded by a 2

[edk2] [PATCH 0/2] UsbBus: Fix wrong buffer length used to read hub desc

2018-06-25 Thread Star Zeng
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=973 Cc: Jiewen Yao Cc: Ruiyu Ni Cc: Bret Barkelew Star Zeng (2): MdeModulePkg UsbBusDxe: Fix wrong buffer length used to read hub desc MdeModulePkg UsbBusPei: Fix wrong buffer length used to read hub desc MdeModulePkg/Bus/Usb/UsbBusDxe/

[edk2] [PATCH 2/2] MdeModulePkg UsbBusPei: Fix wrong buffer length used to read hub desc

2018-06-25 Thread Star Zeng
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=973 Bug 973 just mentions UsbBusDxe, but UsbBusPei has similar issue. HUB descriptor has variable length. But the code uses stack (HubDescriptor in PeiDoHubConfig) with fixed length sizeof(EFI_USB_HUB_DESCRIPTOR) to hold HUB descriptor data. It

[edk2] [PATCH 1/2] MdeModulePkg UsbBusDxe: Fix wrong buffer length used to read hub desc

2018-06-25 Thread Star Zeng
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=973 HUB descriptor has variable length. But the code uses stack (HubDesc in UsbHubInit) with fixed length sizeof(EFI_USB_HUB_DESCRIPTOR) to hold HUB descriptor data. It uses hard code length value (32 that is greater than sizeof(EFI_USB_HUB_DESCR

[edk2] [PATCH v4 13/13] BaseTools: Replace StringIO.StringIO with io.BytesIO

2018-06-25 Thread Gary Lin
Replace StringIO.StringIO with io.BytesIO to be compatible with python3. This commit also removes "import StringIO" from those python scripts that don't really use it. Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- BaseTools/

[edk2] [PATCH v4 12/13] BaseTools: Fix old python2 idioms

2018-06-25 Thread Gary Lin
Based on "futurize -f lib2to3.fixes.fix_idioms" * Change some type comparisons to isinstance() calls: type(x) == T -> isinstance(x, T) type(x) is T -> isinstance(x, T) type(x) != T -> not isinstance(x, T) type(x) is not T -> not isinstance(x, T) * Change "while 1:" into "while Tru

[edk2] [PATCH v4 08/13] BaseTools: Remove types.TypeType

2018-06-25 Thread Gary Lin
"types.TypeType" is now an alias of the built-in "type" and is not compatible with python 3. Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- BaseTools/Tests/TestTools.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)

[edk2] [PATCH v4 09/13] BaseTools: Refactor python raise statement

2018-06-25 Thread Gary Lin
Make "raise" to be compatible with python3. Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- BaseTools/gcc/mingw-gcc-build.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BaseTools/gcc/mingw-gcc-build

[edk2] [PATCH v4 11/13] BaseTools: Migrate to the new octal literal

2018-06-25 Thread Gary Lin
Change the octal literals according to PEP3127 https://www.python.org/dev/peps/pep-3127/ Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- BaseTools/Source/Python/Common/LongFilePathOs.py | 2 +- BaseTools/Source/Python/UPT/Core

[edk2] [PATCH v4 00/20] BaseTools: One step toward python3

2018-06-25 Thread Gary Lin
v4 changes: - Remove the range() patch since it needs python-future - Remove the patch to unify long and int since it caused error in windows. - Split the absolute import patches and will introduce them later v3 changes: - Rebase to the current git HEAD (2e1083038d9aa74fcaa2db8158fdee7

[edk2] [PATCH v4 02/13] BaseTools: Refactor python except statements

2018-06-25 Thread Gary Lin
Convert "except ... ," to "except ... as" to be compatible with python3. Based on "futurize -f lib2to3.fixes.fix_except" Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- BaseTools/Scripts/PackageDocumentTools/plugins/EdkPlugins

[edk2] [PATCH v4 06/13] BaseTools: Remove the deprecated hash_key()

2018-06-25 Thread Gary Lin
Replace "has_key()" with "in" to be compatible with python3. Based on "futurize -f lib2to3.fixes.fix_has_key" Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- BaseTools/Scripts/PackageDocumentTools/plugins/EdkPlugins/basemodel/

[edk2] [PATCH v4 04/13] BaseTools: Remove the old python "not-equal"

2018-06-25 Thread Gary Lin
Replace "<>" with "!=" to be compatible with python3. Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- BaseTools/Source/Python/AutoGen/AutoGen.py | 2 +- BaseTools/Source/Python/AutoGen/BuildEngine.

[edk2] [PATCH v4 05/13] BaseTools: Remove tuple parameter in python scripts

2018-06-25 Thread Gary Lin
According to PEP3113, tuple parameter is removed in python 3. (PEP3113: https://www.python.org/dev/peps/pep-3113/) Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- BaseTools/Source/Python/Common/VpdInfoFile.py | 3 ++- 1 file c

[edk2] [PATCH v4 01/13] BaseTools: Fix a typo in ini.py

2018-06-25 Thread Gary Lin
"if mis not None:" => "if m is not None:" Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Jaben Carsey Cc: Yonghong Zhu Cc: Liming Gao Reviewed-by: Jaben Carsey Signed-off-by: Gary Lin --- BaseTools/Scripts/PackageDocumentTools/plugins/EdkPlugins/basemodel/ini.py | 2 +- 1 file

[edk2] [PATCH v4 07/13] BaseTools: Replace StandardError with Expression

2018-06-25 Thread Gary Lin
StandardError has been removed from python 3. Replace it with Exception. Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- BaseTools/Source/Python/UPT/UPT.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Ba

[edk2] [PATCH v4 03/13] BaseTools: Refactor python print statements

2018-06-25 Thread Gary Lin
Refactor print statements to be compatible with python 3. Based on "futurize -f libfuturize.fixes.fix_print_with_import" Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin --- BaseTools/Bin/CYGWIN_NT-5.1-i686/armcc_wrapper.py

[edk2] [Patch] BaseTools: Enable structure pcd in FDF file

2018-06-25 Thread BobCF
Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Bob Feng Cc: Liming Gao --- BaseTools/Source/Python/AutoGen/AutoGen.py | 3 +- BaseTools/Source/Python/AutoGen/GenC.py| 4 + BaseTools/Source/Python/GenFds/FdfParser.py| 81 -- .../Sou

[edk2] [Patch] BaseTools: Structure pcd value assignment

2018-06-25 Thread BobCF
Enable Structure pcd value assigned by FixedPcd Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Bob Feng Cc: Liming Gao --- .../Source/Python/Workspace/MetaFileParser.py | 23 +++--- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/BaseT

Re: [edk2] [PATCH v2 1/1] BaseTools/tools_def: Add GCC49xASL Toolchain support

2018-06-25 Thread Gao, Liming
Ard: The commit log message says that the Microsoft ASL compiler is necessary to expose Windows-specific Pin Function Config Descriptors on Windows IoT devices. Besides, there is no ways to configure tool chain with the parameter in build command. But, tool chain ASL path and flag can be ove

Re: [edk2] [patch V2 0/9] Add new Perf macros

2018-06-25 Thread Gao, Liming
Reviewed-by: Liming Gao >-Original Message- >From: Bi, Dandan >Sent: Friday, June 22, 2018 4:56 PM >To: edk2-devel@lists.01.org >Cc: Gao, Liming ; Zeng, Star ; >Kinney, Michael D >Subject: [patch V2 0/9] Add new Perf macros > >Add a group of new Perf macros in performance library for per

[edk2] [PATCH 0/2] Fix bugs in BmpSupportLib

2018-06-25 Thread Ruiyu Ni
Ruiyu Ni (2): MdeModulePkg/BmpSupportLib: Correct debug message MdeModulePkg/BmpSupportLib: Check PixelHeight/PixelWidth against 0 MdeModulePkg/Library/BaseBmpSupportLib/BmpSupportLib.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) -- 2.16.1.windows.1 ___

[edk2] [PATCH 1/2] MdeModulePkg/BmpSupportLib: Correct debug message

2018-06-25 Thread Ruiyu Ni
Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni Cc: Michael D Kinney Cc: Star Zeng --- MdeModulePkg/Library/BaseBmpSupportLib/BmpSupportLib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MdeModulePkg/Library/BaseBmpSupportLib/BmpSupport

[edk2] [PATCH 2/2] MdeModulePkg/BmpSupportLib: Check PixelHeight/PixelWidth against 0

2018-06-25 Thread Ruiyu Ni
The patch adds check logic to make sure that for a input BMP file, the width or height is not 0; for a input GOP blt buffer, the width or height is not 0. Otherwise, UNSUPPORTED status is returned. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni Cc: Star Zeng Cc:

Re: [edk2] [PATCH v2 1/1] BaseTools/tools_def: Add GCC49xASL Toolchain support

2018-06-25 Thread Ard Biesheuvel
(+ Charles) On 25 June 2018 at 03:38, Gao, Liming wrote: > Chris: >GCC 4.9 targeting arm-none-eabi. This GCC4.9 should run in Windows OS. So, > could you give some info where windows GCC49 is from. > OK, so first of all, could you elaborate on why we need a different ASL compiler? We have s