Re: [edk2] [PATCH] Fix edit on screens with more than 200 columns

2017-01-24 Thread Carsey, Jaben
I didn't mean a 400 static, I meant start by allocating 400 and simplify the end of the function... > -Original Message- > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of > Witt, Sebastian > Sent: Tuesday, January 24, 2017 8:48 AM > To: Carsey, Jaben

Re: [edk2] [PATCH] ShellPkg/pci: Support interpreting specific PCIE ext cap thru "-ec"

2017-01-24 Thread Carsey, Jaben
Reviewed-by: Jaben Carsey > -Original Message- > From: Ni, Ruiyu > Sent: Monday, January 23, 2017 10:43 PM > To: edk2-devel@lists.01.org > Cc: Carsey, Jaben > Subject: [PATCH] ShellPkg/pci: Support interpreting specific PCIE ext cap thru >

Re: [edk2] [PATCH] ShellPkg/pci: Fix extended register dumping for MFVC capability

2017-01-24 Thread Carsey, Jaben
Reviewed-by: Jaben Carsey > -Original Message- > From: Ni, Ruiyu > Sent: Monday, January 23, 2017 10:43 PM > To: edk2-devel@lists.01.org > Cc: Carsey, Jaben > Subject: [PATCH] ShellPkg/pci: Fix extended register dumping for MFVC >

Re: [edk2] [PATCH] Fix edit on screens with more than 200 columns

2017-01-24 Thread Carsey, Jaben
Is there a reason to not just always start with allocating the 400 and then we don't need to complicate the end to conditionally free the buffer? > -Original Message- > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Witt, > Sebastian > Sent: Tuesday, January 24,

Re: [edk2] [PATCH] Fix edit on screens with more than 200 columns

2017-01-24 Thread Witt, Sebastian
Only performance. But I haven't measured if there is a big difference between static buffer and AllocateZeroPool. I wouldn't use a fixed value. There may be a display device with more than 400 columns. Otherwise one can always allocate the [LastCol + 1] buffer. -Original Message- From:

Re: [edk2] [PATCH] ShellPkg/pci: Use PCI definitions defined in MdePkg

2017-01-24 Thread Carsey, Jaben
Reviewed-by: Jaben Carsey > -Original Message- > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Ruiyu > Ni > Sent: Monday, January 23, 2017 10:42 PM > To: edk2-devel@lists.01.org > Cc: Jaben Carsey > Subject:

Re: [edk2] [PATCH] ShellPkg/pci: Use PCI definitions defined in MdePkg

2017-01-24 Thread Carsey, Jaben
Reviewed-by: Jaben Carsey > -Original Message- > From: Ni, Ruiyu > Sent: Monday, January 23, 2017 10:52 PM > To: edk2-devel@lists.01.org > Cc: Carsey, Jaben > Subject: [PATCH] ShellPkg/pci: Use PCI definitions defined in MdePkg >

Re: [edk2] [PATCH 1/3] MdePkg: UefiTcgPlatform.h: Add UEFI_VARIABLE_DATA

2017-01-24 Thread Yao, Jiewen
Series reviewed-by: jiewen@intel.com > -Original Message- > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Zhang, > Chao B > Sent: Tuesday, January 24, 2017 3:58 PM > To: edk2-devel@lists.01.org > Cc: Yao, Jiewen ; Zhang, Chao B >

Re: [edk2] [PATCH 2/3] MdePkg: VariableDxe: Use UEFI_VARIABLE_DATA

2017-01-24 Thread Zeng, Star
Could we remove " #include " in Measurement.c? Thanks, Star -Original Message- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Zhang, Chao B Sent: Tuesday, January 24, 2017 3:58 PM To: edk2-devel@lists.01.org Cc: Yao, Jiewen ; Zhang, Chao B

Re: [edk2] [Patch] SecurityPkg/Tpm12CommandLib: Always check response returnCode

2017-01-24 Thread Yao, Jiewen
Reviewed-by: jiewen@intel.com > -Original Message- > From: Kinney, Michael D > Sent: Wednesday, January 11, 2017 2:23 AM > To: edk2-devel@lists.01.org > Cc: Zhang, Chao B ; Yao, Jiewen > > Subject: [Patch] SecurityPkg/Tpm12CommandLib:

Re: [edk2] [PATCH 2/3] MdePkg: VariableDxe: Use UEFI_VARIABLE_DATA

2017-01-24 Thread Zeng, Star
Please update "MdePkg" to "MdeModulePkg" in the title. Thanks, Star -Original Message- From: Zeng, Star Sent: Tuesday, January 24, 2017 4:33 PM To: Zhang, Chao B ; edk2-devel@lists.01.org Cc: Yao, Jiewen ; Zeng, Star

Re: [edk2] [Patch] SecurityPkg/Tpm12CommandLib: Always check response returnCode

2017-01-24 Thread Zhang, Chao B
Reviewed-by : Chao Zhang -Original Message- From: Yao, Jiewen Sent: Tuesday, January 24, 2017 4:20 PM To: Kinney, Michael D ; edk2-devel@lists.01.org Cc: Zhang, Chao B Subject: RE: [Patch]

[edk2] [PATCH] SecurityPkg HashLibRouter: Avoid incorrect PcdTcg2HashAlgorithmBitmap

2017-01-24 Thread Star Zeng
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=244 Currently, when software HashLib (HashLibBaseCryptoRouter) and related HashInstanceLib instances are used, PcdTcg2HashAlgorithmBitmap is expected to be configured to 0 in platform dsc. But PcdTcg2HashAlgorithmBitmap has default value

Re: [edk2] [PATCH v2 1/1] MdePkg: Refine casting expression result to bigger size

2017-01-24 Thread Laszlo Ersek
On 01/24/17 08:25, Hao Wu wrote: > There are cases that the operands of an expression are all with rank less > than UINT64/INT64 and the result of the expression is explicitly casted to > UINT64/INT64 to fit the target size. > > An example will be: > UINT32 a,b; > // a and b can be any unsigned

Re: [edk2] [PATCH] ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe: Fixed crash on Juno R0

2017-01-24 Thread Ryan Harkin
On 24 January 2017 at 02:19, Daniil Egranov wrote: > Hi Ryan, > > > > On 01/23/2017 06:56 AM, Ryan Harkin wrote: >> >> On 20 January 2017 at 20:57, Daniil Egranov >> wrote: >>> >>> Hi Ryan, >>> >>> >>> On 01/20/2017 04:30 AM, Ryan Harkin wrote: >>>

Re: [edk2] [PATCH v2] ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe: Fixed crash on Juno R0

2017-01-24 Thread Ryan Harkin
On 24 January 2017 at 02:01, Daniil Egranov wrote: > The Marvell Yukon MAC address load supported only on Juno R1 and R2. > It disabled for Juno R0 due to PCI issues on this board. > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Daniil Egranov

Re: [edk2] [PATCH 1/6] MdeModulePkg: Refine type cast for pointer subtraction

2017-01-24 Thread Laszlo Ersek
On 01/24/17 08:50, Hao Wu wrote: > For pointer subtraction, the result is of type "ptrdiff_t". According to > the C11 spec, ptrdiff_t is a signed integer type but its size is > implementation-defined. > > There are cases that the result of pointer subtraction is type casted to > UINTN, like: > >

Re: [edk2] [PATCH] ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe: Fixed crash on Juno R0

2017-01-24 Thread Ryan Harkin
On 24 January 2017 at 11:05, Ryan Harkin wrote: > On 24 January 2017 at 02:19, Daniil Egranov wrote: >> Hi Ryan, >> >> >> >> On 01/23/2017 06:56 AM, Ryan Harkin wrote: >>> >>> On 20 January 2017 at 20:57, Daniil Egranov >>>

[edk2] [PATCH 3/5] MdeModulePkg/EbcDxe: add a stack tracker for ARM EBC->native support

2017-01-24 Thread Pete Batard
* This patch fixes the CALLEX to native vs ARM calling convention issue by tracking whether each potential call argument is a natural or a 64-bit value. * This is accomplished by monitoring stack pointer operations, including arithmetic or single stack buffer reallocation, through a separate

[edk2] [PATCH 2/5] MdeModulePkg/EbcDxe: add ARM support

2017-01-24 Thread Pete Batard
From: Ard Biesheuvel * This is a port of the AARCH64 implementation of the EBC runtime to ARM. * Note that, on its own, this patch only allows running self contained EBC applications, such as ones that don't issue calls into the native platform, or that aren't

[edk2] [PATCH 1/5] MdeModulePkg/EbcDxe: allow VmReadIndex##() to return a decoded index

2017-01-24 Thread Pete Batard
* The VmReadIndex## function now take an optional pointer to an index pair structure which, when not NULL, is filled with the decoded const and natural values. * This feature is needed by the ARM EBC VM. * For now, the new parameters is set to NULL, so as not to change existing behaviour

[edk2] [PATCH 0/5] MdeModulePkg/EbcDxe: add ARM support

2017-01-24 Thread Pete Batard
(This e-mail is fairly lengthy, so an Executive Summary is provided, for those who don't want to go through a wall of text). 0. Executive Summary 0.1 Preamble One of the most vexing aspect of EFI Byte Code (EBC) proposal from the UEFI specs is that its EDK2

[edk2] [PATCH 5/5] BaseTools: add scripts to generate EBC call signatures

2017-01-24 Thread Pete Batard
* EBC binaries meant to be compatible with the ARM EBC VM require the insertion of call signatures at the locations where the BREAK 5 offsets are stored. * This patch adds 2 new Python applications, as well as the required modifications for build_rule and tools_def templates: -

[edk2] [PATCH 4/5] MdeModulePkg/EbcDxe: add call signatures for ARM native->EBC support

2017-01-24 Thread Pete Batard
* This patch fixes the call from native into EBC ARM calling convention issue by introducing support for call signatures when invoking BREAK 5. * These call signatures are provided as the high 32 bit word of the 64-bit longword to which R7 points during BREAK 5 invocation (the lowest 32-bit

Re: [edk2] SetUnicodeMem in DisplayEngineDxe seems unsafe

2017-01-24 Thread Gao, Liming
Xiaofeng: Yes. This is a potential issue. This API should be updated with original Buffer Size. Could you help submit this issue in BugZillar? Thanks Liming >-Original Message- >From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of >wang xiaofeng >Sent: Tuesday,

[edk2] [PATCH v2 0/6] Refine type cast for pointer subtraction

2017-01-24 Thread Hao Wu
Please note that this patch is maily for feedback collection and only the MdeModulePkg part of the series is sent out firstly. V2 refines the commit messages: For pointer subtraction, the result is of type "ptrdiff_t". According to the C11 standard (Committee Draft - April 12, 2011): "When two

[edk2] [PATCH v2 1/6] MdeModulePkg: Refine type cast for pointer subtraction

2017-01-24 Thread Hao Wu
For pointer subtraction, the result is of type "ptrdiff_t". According to the C11 standard (Committee Draft - April 12, 2011): "When two pointers are subtracted, both shall point to elements of the same array object, or one past the last element of the array object; the result is the difference of

Re: [edk2] [PATCH v2 1/1] MdePkg: Refine casting expression result to bigger size

2017-01-24 Thread Wu, Hao A
> -Original Message- > From: Gao, Liming > Sent: Wednesday, January 25, 2017 1:58 PM > To: Wu, Hao A; Laszlo Ersek > Cc: edk2-de...@ml01.01.org > Subject: RE: [edk2] [PATCH v2 1/1] MdePkg: Refine casting expression result to > bigger size > > Hao: > For PCILIB_TO_COMMON_ADDRESS, we

[edk2] [edk2-staging] Create new edk2-test branch

2017-01-24 Thread Kinney, Michael D
I am creating a new branch in edk2-staging called edk2-test. The purpose of this branch is to develop a test harness, test case SDK, and library of test cases that can be used as part of edk2 validation. The initial version of this test harness is compatible with binary releases of the PI SCTs

[edk2] [PATCH] SecurityPkg: Tcg2Dxe: Update PCR[4] measure logic

2017-01-24 Thread Zhang, Chao B
Update PCR[4] measure logic for each boot attempt. 1. Measure event to PCR[4] instead of PCR[5] 2. Measure “Calling UEFI Application from Boot Option” http://www.trustedcomputinggroup.org/wp-content/uploads/PC-ClientSpecific_Platform_Profile_for_TPM_2p0_Systems_v21.pdf Cc: Star Zeng

Re: [edk2] [PATCH v2 1/1] MdePkg: Refine casting expression result to bigger size

2017-01-24 Thread Gao, Liming
Hao: For PCILIB_TO_COMMON_ADDRESS, we can't assume its usage in the consumer code. There may be some usage in other projects. So, I suggest to provide the safe fix. Thanks Liming >-Original Message- >From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Wu, >Hao A

Re: [edk2] [PATCH v2 1/1] MdePkg: Refine casting expression result to bigger size

2017-01-24 Thread Gao, Liming
Got it. Thanks for your clarification. >-Original Message- >From: Wu, Hao A >Sent: Wednesday, January 25, 2017 2:17 PM >To: Gao, Liming >Cc: edk2-de...@ml01.01.org >Subject: RE: [edk2] [PATCH v2 1/1] MdePkg: Refine casting expression result >to bigger size > >>

Re: [edk2] [PATCH v2 0/6] Refine type cast for pointer subtraction

2017-01-24 Thread Laszlo Ersek
On 01/25/17 06:28, Hao Wu wrote: > Please note that this patch is maily for feedback collection and only the > MdeModulePkg part of the series is sent out firstly. > > > V2 refines the commit messages: > For pointer subtraction, the result is of type "ptrdiff_t". According to > the C11 standard

Re: [edk2] SetUnicodeMem in DisplayEngineDxe seems unsafe

2017-01-24 Thread Dong, Eric
Xiaofeng, Thanks, we will follow up to fix it. > -Original Message- > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of wang > xiaofeng > Sent: Wednesday, January 25, 2017 10:49 AM > To: Dong, Eric > Cc: edk2-devel@lists.01.org; Gao, Liming > Subject: Re: [edk2]

Re: [edk2] [PATCH v1 1/1] BaseTools: AutoGen: Expand macros in INF files

2017-01-24 Thread Gao, Liming
Hi, This usage will break UDP (UEFI Platform Initialization Distribution Packaging Specification). It can be downloaded from http://www.uefi.org/specifications. This spec defines the packaging format. It defines SourceFiles.Filename as the path (relative to the Module "root" directory) and

Re: [edk2] [PATCH v2 1/1] MdePkg: Refine casting expression result to bigger size

2017-01-24 Thread Wu, Hao A
> -Original Message- > From: Laszlo Ersek [mailto:ler...@redhat.com] > Sent: Tuesday, January 24, 2017 5:54 PM > To: Wu, Hao A > Cc: edk2-de...@ml01.01.org > Subject: Re: [edk2] [PATCH v2 1/1] MdePkg: Refine casting expression result to > bigger size > > On 01/24/17 08:25, Hao Wu wrote: >

Re: [edk2] [PATCH 2/3] MdePkg: VariableDxe: Use UEFI_VARIABLE_DATA

2017-01-24 Thread Zhang, Chao B
Star: I agree. I will clean up other TrEEProtocol reference later on. -Original Message- From: Zeng, Star Sent: Tuesday, January 24, 2017 4:33 PM To: Zhang, Chao B ; edk2-devel@lists.01.org Cc: Yao, Jiewen ; Zeng, Star

Re: [edk2] SetUnicodeMem in DisplayEngineDxe seems unsafe

2017-01-24 Thread wang xiaofeng
Hi Eric and Liming, Bug 358 is submitted for this issue. At 2017-01-25 10:29:52, "Dong, Eric" wrote: >Xiaofeng, > >BugZillar link is: https://bugzilla.tianocore.org/ > >Thanks, >Eric >> -Original Message- >> From: edk2-devel

Re: [edk2] [PATCH 2/3] MdePkg: VariableDxe: Use UEFI_VARIABLE_DATA

2017-01-24 Thread Yao, Jiewen
Thank you. I also think this is a right way to go. One observation I have is that we need use sizeof(TREE_BOOT_SERVICE_CAPABILITY_1_0) in Tcg2Dxe. I think we can use OFFSET_OF(EFI_TCG2_BOOT_SERVICE_CAPABILITY , NumberOfPCRBanks) to remove TrEE reference in Tcg2. Thank you Yao Jiewen >

Re: [edk2] SetUnicodeMem in DisplayEngineDxe seems unsafe

2017-01-24 Thread wang xiaofeng
Hi Liming, Where is the BugZillar link? I will try if I can submit it. But not sure where I can quickly apply for an account. At 2017-01-25 08:54:47, "Gao, Liming" wrote: >Xiaofeng: > Yes. This is a potential issue. This API should be updated with original >

Re: [edk2] SetUnicodeMem in DisplayEngineDxe seems unsafe

2017-01-24 Thread Gao, Liming
https://bugzilla.tianocore.org/ Thanks Liming >-Original Message- >From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of >wang xiaofeng >Sent: Wednesday, January 25, 2017 10:22 AM >To: Gao, Liming >Cc: edk2-devel@lists.01.org; Dong, Eric

Re: [edk2] [PATCH 1/6] MdeModulePkg: Refine type cast for pointer subtraction

2017-01-24 Thread Wu, Hao A
> -Original Message- > From: Laszlo Ersek [mailto:ler...@redhat.com] > Sent: Tuesday, January 24, 2017 6:15 PM > To: Wu, Hao A > Cc: edk2-de...@ml01.01.org > Subject: Re: [edk2] [PATCH 1/6] MdeModulePkg: Refine type cast for pointer > subtraction > > On 01/24/17 08:50, Hao Wu wrote: > >

Re: [edk2] SetUnicodeMem in DisplayEngineDxe seems unsafe

2017-01-24 Thread Dong, Eric
Xiaofeng, BugZillar link is: https://bugzilla.tianocore.org/ Thanks, Eric > -Original Message- > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of wang > xiaofeng > Sent: Wednesday, January 25, 2017 10:22 AM > To: Gao, Liming > Cc: edk2-devel@lists.01.org; Dong,

[edk2] [PATCH] Fix edit on screens with more than 200 columns

2017-01-24 Thread Witt, Sebastian
If the shell edit command is used on a screen with more than 200 columns, we get a buffer overflow. This increases the default buffer size to 400 columns and allocates a pool when this is not enough. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Sebastian Witt