Re: [edk2] UEFI shell hash tools?

2017-11-01 Thread Jeff Westfahl
Ah yes, very nice. I got a prebuilt Python 2.7.2 from ChipSec. Thanks for the hint! Jeff Westfahl -Original Message- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Blibbet Sent: Wednesday, November 1, 2017 1:00 PM To: edk2-devel@lists.01.org Subject: Re: [edk2]

Re: [edk2] [patch] BaseTools/VfrCompile: Add check to avoid using NULL pointer

2017-11-01 Thread Gao, Liming
Reviewed-by: Liming Gao > -Original Message- > From: Bi, Dandan > Sent: Wednesday, November 1, 2017 10:25 PM > To: edk2-devel@lists.01.org > Cc: Dong, Eric ; Gao, Liming > Subject: [patch] BaseTools/VfrCompile: Add check

Re: [edk2] [PATCH 2/2] CryptoPkg/BaseCryptLib: Fix mismatched memory allocation/free

2017-11-01 Thread Wang, Jian J
Reviewed-by: Jian J Wang > -Original Message- > From: Long, Qin > Sent: Tuesday, October 31, 2017 4:40 PM > To: edk2-devel@lists.01.org > Cc: Ye, Ting ; ler...@redhat.com; Wang, Jian J > ; Long, Qin >

[edk2] [PATCH v2 0/2] CryptoPkg/BaseCryptLib: Correct CRT realloc Wrapper

2017-11-01 Thread Long Qin
V2 Update: Add NULL check for memory allocation failure. There is one long-standing problem in current CRT realloc wrapper implementation, which will cause the obvious buffer overflow issue when re-allocating memory block. One BZ report: https://bugzilla.tianocore.org/show_bug.cgi?id=605 This

Re: [edk2] [PATCH 1/3] SecurityPkg: Remove Counter Based AuthVariable support

2017-11-01 Thread Long, Qin
Reviewed-by: Long Qin -Original Message- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Zhang, Chao B Sent: Tuesday, October 31, 2017 2:35 PM To: edk2-devel@lists.01.org Cc: Zhang, Chao B ; Zeng, Star

Re: [edk2] [PATCH 3/3] MdeModulePkg: Deprecate EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS

2017-11-01 Thread Long, Qin
Reviewed-by: Long Qin -Original Message- From: Zhang, Chao B Sent: Tuesday, October 31, 2017 2:35 PM To: edk2-devel@lists.01.org Cc: Long, Qin ; Zeng, Star ; Zhang, Chao B Subject: [PATCH 3/3]

Re: [edk2] [PATCH 2/3] MdePkg: Deprecate EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS

2017-11-01 Thread Long, Qin
Reviewed-by: Long Qin -Original Message- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Zhang, Chao B Sent: Tuesday, October 31, 2017 2:35 PM To: edk2-devel@lists.01.org Cc: Zhang, Chao B ; Zeng, Star

[edk2] [PATCH] ShellPkg/hexeditor: Use CpuIo for memory access

2017-11-01 Thread Ruiyu Ni
The original code uses PciRootBridgeIo for memory access. It worked before MdeModulePkg/PciHostBridgeDxe driver was checked in. But MdeModulePkg/PciHostBridgeDxe adds checks to ensure the MMIO access request is in the scope of the current RootBridgeIo instance. It causes "hexeditor -m 0 2" reports

Re: [edk2] [PATCH edk2-platforms v3 12/27] Silicon/SynQuacer: add ACPI support

2017-11-01 Thread graeme . gregory
I see nothing wrong with the ACPI in this patch, but I question the sanity of exposing ACPI on this SoC where it seems to be not suited. Given the comment in the commit message would an alternative OS like windows actually work with this PCIe setup? Graeme On Tue, Oct 31, 2017 at 10:52:03AM

Re: [edk2] [PATCH 1/2] CryptoPkg/BaseCryptLib: Fix buffer overflow issue in realloc wrapper

2017-11-01 Thread Wang, Jian J
Hi Qin, Thanks for fixing this issue. Please find my comments below. Besides that, the patch has been passed the boot validation. Validated-by: Jian J Wang Thanks, Jian > -Original Message- > From: Long, Qin > Sent: Tuesday, October 31, 2017 4:39 PM > To:

[edk2] Official port of Python on EDK2

2017-11-01 Thread Thiebaud Weksteen
Hi, UEFI has become the standard for firmware (BIOS) interface. Intel has provided an open source implementation under the name EDK2 (part of the TianoCore initiative) [1] for some time. This implementation has evolved significantly and now provides the functionalities of a small OS with a

Re: [edk2] [PATCH edk2-platforms v3 24/27] Platform/Socionext: add support for Socionext Developer Box rev 0.1

2017-11-01 Thread Leif Lindholm
On Wed, Nov 01, 2017 at 08:31:14AM +, Ard Biesheuvel wrote: > On 1 November 2017 at 05:18, Leif Lindholm wrote: > > On Tue, Oct 31, 2017 at 10:52:15AM +, Ard Biesheuvel wrote: > >> Contributed-under: TianoCore Contribution Agreement 1.1 > >> Signed-off-by: Ard

Re: [edk2] [PATCH 1/1] EmbeddedPkg: Implement NorFlashLib

2017-11-01 Thread Marcin Wojtas
Hi Pankaj, 2017-11-01 6:57 GMT+01:00 Pankaj Bansal : > Hi Marcin, > > The SPI flash Jedec id is not standardized across flashes. > The JEDEDC group only assigns first byte (Manufacturer ID) to different > vendors. > Rest of the bytes are up to the Manufacturer to decide. >

[edk2] [PATCH 2/2] MdePkg/NvdimmLabel.h: Add NVDIMM_LABEL protocol definition

2017-11-01 Thread Ruiyu Ni
NVDIMM_LABEL protocol is defined in UEFI 2.7 spec, to provide services that allow management of labels contained in a Label Storage Area in NVDIMM. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni Cc: Liming Gao ---

[edk2] [PATCH 0/2] Add NVDIMM related spec definitions

2017-11-01 Thread Ruiyu Ni
Ruiyu Ni (2): MdePkg/Btt.h: Add Block Translation Table definitions MdePkg/NvdimmLabel.h: Add NVDIMM_LABEL protocol definition MdePkg/Include/IndustryStandard/Btt.h | 230 ++ MdePkg/Include/Protocol/NvdimmLabel.h | 351 ++ MdePkg/MdePkg.dec

[edk2] [PATCH 1/2] MdePkg/Btt.h: Add Block Translation Table definitions

2017-11-01 Thread Ruiyu Ni
BTT definitions are defined in UEFI spec 2.7, to defines a layout and set of rules for doing block I/O that provide powerfail write atomicity of a single block in NVDIMM. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni Cc: Liming Gao

[edk2] [PATCH v2 1/2] CryptoPkg/BaseCryptLib: Fix buffer overflow issue in realloc wrapper

2017-11-01 Thread Long Qin
There is one long-standing problem in CRT realloc wrapper, which will cause the obvious buffer overflow issue when re-allocating one bigger memory block: void *realloc (void *ptr, size_t size) { // // BUG: hardcode OldSize == size! We have no any knowledge about // memory

[edk2] [PATCH v2 2/2] CryptoPkg/BaseCryptLib: Fix mismatched memory allocation/free

2017-11-01 Thread Long Qin
The malloc/free (instead of AllocatePool/FreePool) were used directly in some wrapper implementations, which was designed to leverage the light-weight memory management routines at Runtime phase. The malloc/free and AllocatePool/FreePool usages are required to be matched, after extra memory size

Re: [edk2] UEFI shell hash tools?

2017-11-01 Thread Michael Zimmermann
I've never seen such tools for uefi but you could probably easily implement them using CryptoPkg's openssl lib. Thanks Michael On Tue, Oct 31, 2017 at 4:18 PM, Jeff Westfahl wrote: > Hello all, > > I'm looking for tools that run in the UEFI shell and do typical hash >

Re: [edk2] [PATCH 1/2] CryptoPkg/BaseCryptLib: Fix buffer overflow issue in realloc wrapper

2017-11-01 Thread Long, Qin
Thanks, Jian. It's great to pass the validation. And exactly, the null data checking was missed. I will re-produce the V2 patch. Best Regards & Thanks, LONG, Qin -Original Message- From: Wang, Jian J Sent: Wednesday, November 1, 2017 3:28 PM To: Long, Qin ;

Re: [edk2] [PATCH v2 1/2] CryptoPkg/BaseCryptLib: Fix buffer overflow issue in realloc wrapper

2017-11-01 Thread Wang, Jian J
Reviewed-by: Jian J Wang > -Original Message- > From: Long, Qin > Sent: Wednesday, November 01, 2017 4:19 PM > To: edk2-devel@lists.01.org > Cc: Wang, Jian J ; Ye, Ting ; > ler...@redhat.com; Long, Qin

Re: [edk2] [PATCH edk2-platforms v3 24/27] Platform/Socionext: add support for Socionext Developer Box rev 0.1

2017-11-01 Thread Ard Biesheuvel
On 1 November 2017 at 05:18, Leif Lindholm wrote: > On Tue, Oct 31, 2017 at 10:52:15AM +, Ard Biesheuvel wrote: >> Contributed-under: TianoCore Contribution Agreement 1.1 >> Signed-off-by: Ard Biesheuvel > > For itself: > Reviewed-by: Leif

[edk2] [PATCH] MdeModulePkg SerialDxe: Handle Timeout change more robustly

2017-11-01 Thread Star Zeng
https://lists.01.org/pipermail/edk2-devel/2017-October/016479.html reported "Xen Console input very slow in recent UEFI" that appears after 4cf3f37c87ba1f9d58072444bd735e40e4779e70 "MdeModulePkg SerialDxe: Process timeout consistently in SerialRead". Julien did more debugging and find out the

[edk2] [Patch 0/3] Add new PCD PcdInitValueInTempStack

2017-11-01 Thread Liming Gao
This PCD repalces the hard code 0x5AA55AA5 in the different modules. Liming Gao (3): MdeModulePkg: Add new PCD PcdInitValueInTempStack MdeModulePkg: Update PeiCore consumes PCD to get the init value in temp stack Nt32Pkg: Update SecMain consumes PCD to get the init value in temp

[edk2] [Patch 1/3] MdeModulePkg: Add new PCD PcdInitValueInTempStack

2017-11-01 Thread Liming Gao
https://bugzilla.tianocore.org/show_bug.cgi?id=740 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao --- MdeModulePkg/MdeModulePkg.dec | 6 ++ 1 file changed, 6 insertions(+) diff --git a/MdeModulePkg/MdeModulePkg.dec

[edk2] [Patch 2/3] MdeModulePkg: Update PeiCore consumes PCD to get the init value in temp stack

2017-11-01 Thread Liming Gao
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao --- MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c | 7 +-- MdeModulePkg/Core/Pei/PeiMain.inf | 1 + 2 files changed, 2 insertions(+), 6 deletions(-) diff --git

[edk2] [Patch 3/3] Nt32Pkg: Update SecMain consumes PCD to get the init value in temp stack

2017-11-01 Thread Liming Gao
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao --- Nt32Pkg/Sec/SecMain.c | 2 +- Nt32Pkg/Sec/SecMain.inf | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Nt32Pkg/Sec/SecMain.c b/Nt32Pkg/Sec/SecMain.c index

Re: [edk2] Official port of Python on EDK2

2017-11-01 Thread Richardson, Brian
Thiebaud: Thank you. I have started discussions within Intel for updating the UEFI CPython implementation to Python 3.x. The TianoCore community would appreciate contributions by people with Python experience to bring this code up to current standards. Please review the contribution

Re: [edk2] Build error in StdLib with VS 2015 compiler

2017-11-01 Thread Karunakar P
Any comment on this? From: Karunakar P Sent: Tuesday, October 31, 2017 3:18 PM To: 'edk2-devel@lists.01.org' Cc: 'Wu, Jiaxin'; 'Fu, Siyuan'; 'Ye, Ting' Subject: Build error in StdLib with VS 2015 compiler Hello All, Facing an build error with Stdlib module when built with VS 2015 compiler.

Re: [edk2] Build error in StdLib with VS 2015 compiler

2017-11-01 Thread Tim Lewis
Are you building C++ (.cpp)? Tim -Original Message- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Karunakar P Sent: Wednesday, November 1, 2017 8:27 PM To: 'edk2-devel@lists.01.org' Cc: 'Ye, Ting' ; 'Fu, Siyuan'

Re: [edk2] Xen Console input very slow in recent UEFI

2017-11-01 Thread Zeng, Star
Patch has been just sent at https://lists.01.org/pipermail/edk2-devel/2017-November/016837.html. Thanks, Star -Original Message- From: Julien Grall [mailto:julien.gr...@linaro.org] Sent: Wednesday, November 1, 2017 8:47 PM To: Zeng, Star Cc: Laszlo Ersek

[edk2] [Patch] BaseTools: parse map file generated by Xcode on Mac

2017-11-01 Thread Yonghong Zhu
Add support to parse map file generated by Xcode on Mac to get variable offset and Patchable Pcd info in current EFI file. Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu ---

Re: [edk2] [PATCH v2] MdePkg: Add definitions for the SPI protocols introduced in PI 1.6.

2017-11-01 Thread Bi, Dandan
Reviewed-by: Dandan Bi Thank you, Dandan -Original Message- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Marvin Häuser Sent: Tuesday, October 31, 2017 8:12 AM To: edk2-devel@lists.01.org Cc: Ni, Ruiyu ; Bi, Dandan

Re: [edk2] Official port of Python on EDK2

2017-11-01 Thread Antoine Pitrou
On Wed, 1 Nov 2017 13:46:27 +0100 Christian Heimes wrote: > > > This work would target the master branch (that is Python 3). I would > > be interested in hearing your thoughts on this idea. > > In general your proposal sounds like a good idea. A new platform may >

[edk2] [PATCH 0/2] PEI phase boot mode setting

2017-11-01 Thread Ard Biesheuvel
Two patches to allow a platform to set the boot mode from its PlatformPeiLib implementation using services exposed by a GPIO PPI. These are needed to implement a 'clear NVRAM' feature based on a DIP switch on the Developer Box platform. Ard Biesheuvel (2): EmbeddedPkg: introduce GPIO PPI

[edk2] [PATCH 1/2] EmbeddedPkg: introduce GPIO PPI

2017-11-01 Thread Ard Biesheuvel
Introduce a PPI counterpart of the existing 'embedded GPIO' protocol, so we can manipulate GPIOs from PEI modules. This allows things like setting the boot mode based on a DIP switch setting. Note that the naming is slightly awkward, as there is nothing 'embedded' about a GPIO, but given that the

[edk2] [PATCH 2/2] ArmPlatformPkg/PlatformPeim: allow PlatformPeiLib to set the boot mode

2017-11-01 Thread Ard Biesheuvel
The current interdepencies between the PrePeiCore SEC module, the platform PEIM and ArmPlatformLib is a bit awkward: due to the fact that ArmPlatformLib is also used by SEC modules, we cannot use PEI specific facilities in the implementation of ArmPlatformGetBootMode. However, given that we call

Re: [edk2] Xen Console input very slow in recent UEFI

2017-11-01 Thread Julien Grall
Hi Zeng, On 30 October 2017 at 01:09, Zeng, Star wrote: > I do not think SerialDxe should handle EFI_INVALID_PARAMETER return value > from SerialPortSetAttributes(). > If the EFI_INVALID_PARAMETER is because of Timeout value, the Timeout value > definitely should not be

[edk2] [PATCH] BaseTools/tools_def AARCH64 ARM: disable PIE linking for .aslc sources

2017-11-01 Thread Ard Biesheuvel
Commit 1894a7c64c0a ("BaseTools/tools_def AARCH64 ARM: disable PIE linking") works around an issue that was caught due to the fact that PIE linking produces broken .acpi files. However, v2 of that fix inadvertently only applied the workaround to the normal linker command line, and not to the ASLD

Re: [edk2] [PATCH edk2-platforms v3 24/27] Platform/Socionext: add support for Socionext Developer Box rev 0.1

2017-11-01 Thread Ard Biesheuvel
On 1 November 2017 at 10:01, Leif Lindholm wrote: > On Wed, Nov 01, 2017 at 08:31:14AM +, Ard Biesheuvel wrote: >> On 1 November 2017 at 05:18, Leif Lindholm wrote: >> > On Tue, Oct 31, 2017 at 10:52:15AM +, Ard Biesheuvel wrote: >> >>

Re: [edk2] [PATCH] BaseTools/tools_def AARCH64 ARM: disable PIE linking for .aslc sources

2017-11-01 Thread Gao, Liming
Reviewed-by: Liming Gao > -Original Message- > From: Ard Biesheuvel [mailto:ard.biesheu...@linaro.org] > Sent: Wednesday, November 1, 2017 11:01 PM > To: edk2-devel@lists.01.org; leif.lindh...@linaro.org; Gao, Liming > ; Zhu, Yonghong >

[edk2] [patch] BaseTools/VfrCompile: Add check to avoid using NULL pointer

2017-11-01 Thread Dandan Bi
Question value are stored in one specified storage, but the Data type of the storage or the field in the Data type may be NULL sometime, so we need to add check before using these related pointers. Here list some NULL cases: (1)For an efivastore which doesn't specify a data structure or a data

Re: [edk2] [PATCH 3/3] UefiCpuPkg/CpuExceptionHandlerLib: Add stack switch support

2017-11-01 Thread Kinney, Michael D
I agree that adding AsmWriteTr, IA32_TASK_STATE_SEGMENT, IA32_TSS_DESCRIPTOR to MdePkg BaseLib is a good idea. Mike -Original Message- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Fan Jeff Sent: Tuesday, October 31, 2017 7:33 PM To: Yao, Jiewen

Re: [edk2] [platforms: PATCH 1/6] Marvell/Drivers: MvSpiFlash: Improve ReadId

2017-11-01 Thread Marcin Wojtas
2017-11-01 4:14 GMT+01:00 Leif Lindholm : > On Tue, Oct 31, 2017 at 10:22:50AM +0100, Marcin Wojtas wrote: >> 2017-10-31 10:07 GMT+01:00 Leif Lindholm : >> > On Tue, Oct 31, 2017 at 04:59:30AM +0100, Marcin Wojtas wrote: >> >> Fix the ReadId

Re: [edk2] [PATCH edk2-platforms v3 12/27] Silicon/SynQuacer: add ACPI support

2017-11-01 Thread Ard Biesheuvel
On 1 November 2017 at 10:15, wrote: > I see nothing wrong with the ACPI in this patch, but I question the > sanity of exposing ACPI on this SoC where it seems to be not suited. > > Given the comment in the commit message would an alternative OS like > windows actually

Re: [edk2] [platforms: PATCH 5/6] Marvell/Drivers: MvSpiFlash: Fix bank selection for Spansion

2017-11-01 Thread Marcin Wojtas
2017-11-01 4:50 GMT+01:00 Leif Lindholm : > On Tue, Oct 31, 2017 at 04:59:34AM +0100, Marcin Wojtas wrote: >> Spansion SPI flash devices use different command for bank >> selection. Update it, basing on the first byte of flash ID. >> >> Contributed-under: TianoCore

Re: [edk2] [platforms: PATCH 4/6] Marvell/Applications: SpiTool: Do not override existing slave device

2017-11-01 Thread Marcin Wojtas
Leif, 2017-11-01 4:45 GMT+01:00 Leif Lindholm : > On Tue, Oct 31, 2017 at 04:59:33AM +0100, Marcin Wojtas wrote: >> Current usage of sf command requires running 'sf probe' prior to >> executing any other option. Because it is done in two separate steps, >> it turned out

Re: [edk2] [platforms: PATCH 4/6] Marvell/Applications: SpiTool: Do not override existing slave device

2017-11-01 Thread Ard Biesheuvel
On 1 November 2017 at 16:40, Marcin Wojtas wrote: > Leif, > > 2017-11-01 4:45 GMT+01:00 Leif Lindholm : >> On Tue, Oct 31, 2017 at 04:59:33AM +0100, Marcin Wojtas wrote: >>> Current usage of sf command requires running 'sf probe' prior to >>> executing

Re: [edk2] UEFI shell hash tools?

2017-11-01 Thread Blibbet
On Tue, Oct 31, 2017 at 4:18 PM, Jeff Westfahl wrote: > I'm looking for tools that run in the UEFI shell and do typical hash functions on files. [...] CPython for UEFI implements the hashlib module from the Python std library, so you could also search for Python solutions,

Re: [edk2] [PATCH] ShellPkg/hexeditor: Use CpuIo for memory access

2017-11-01 Thread Carsey, Jaben
Reviewed-by: Jaben Carsey > -Original Message- > From: Ni, Ruiyu > Sent: Wednesday, November 01, 2017 3:13 AM > To: edk2-devel@lists.01.org > Cc: Carsey, Jaben > Subject: [PATCH] ShellPkg/hexeditor: Use CpuIo for memory access >