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

2017-01-23 Thread Zhang, Chao B
Add UEFI_VARIABLE_DATA according to TCG PC-Client PFP Spec 00.21. http://www.trustedcomputinggroup.org/wp-content/uploads/PC-ClientSpecific_Platform_Profile_for_TPM_2p0_Systems_v21.pdf Cc: Star Zeng Cc: Yao Jiewen Contributed-under: TianoCore

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

2017-01-23 Thread Zhang, Chao B
Use UEFI_VARIABLE_DATA data structure according to TCG PC-Client PFP Spec 00.21. http://www.trustedcomputinggroup.org/wp-content/uploads/PC-ClientSpecific_Platform_Profile_for_TPM_2p0_Systems_v21.pdf Cc: Star Zeng Cc: Yao Jiewen Contributed-under:

[edk2] SetUnicodeMem in DisplayEngineDxe seems unsafe

2017-01-23 Thread wang xiaofeng
Hi DisplayEngineDxe Owner, SetUnicodeMem seems unsafe since the buffer may overflow if the input Size is bigger than buffer size.Do we think about improve the function /** Set Buffer to Value for Size bytes. @param Buffer Memory to set. @param Size

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

2017-01-23 Thread Hao Wu
Please note that this patch is maily for feedback collection and the only the MdeModulePkg part of the series is sent out firstly. 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.

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

2017-01-23 Thread Hao Wu
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: UINT8 *Ptr1, *Ptr2; UINTN PtrDiff; ... PtrDiff

Re: [edk2] [PATCH 2/3] MdeModulePkg: Update PcdSmbiosDocRev to 0x1 for SMBIOS spec 3.1.1

2017-01-23 Thread Tian, Feng
reviewed-by: Feng Tian -Original Message- From: Zeng, Star Sent: Sunday, January 22, 2017 4:18 PM To: edk2-devel@lists.01.org Cc: Zeng, Star ; Tian, Feng ; Gao, Liming Subject: [PATCH 2/3]

Re: [edk2] [PATCH 1/3] MdePkg: Add definitions for SMBIOS spec 3.1.1

2017-01-23 Thread Zeng, Star
Yes, good catch. Thanks, Star -Original Message- From: Gao, Liming Sent: Tuesday, January 24, 2017 3:25 PM To: Zeng, Star ; edk2-devel@lists.01.org Cc: Kinney, Michael D Subject: RE: [PATCH 1/3] MdePkg: Add definitions for SMBIOS spec

[edk2] [PATCH v2 0/1] Refine casting expression result to bigger size

2017-01-23 Thread Hao Wu
Please note that this patch is maily for feedback collection and the patch only covers MdePkg. We are working on patches for other packages. V2: Follow the below rules to refine codes: 1). When the expression will not overflow within the rank of "int", remove the explicit type casts: c = a + b;

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

2017-01-23 Thread Hao Wu
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 int type with rank less than UINT64, like //

Re: [edk2] [PATCH 1/3] MdePkg: Add definitions for SMBIOS spec 3.1.1

2017-01-23 Thread Gao, Liming
Star: Please fix the incorrect character in comments. With this change, I add my Reviewed-by: Liming Gao +/// 00h �C 3Fh: MCTP Host Interfaces Thanks Liming >-Original Message- >From: Zeng, Star >Sent: Sunday, January 22, 2017 4:18 PM >To:

Re: [edk2] [PATCH 3/3] ShellPkg SmbiosView: Add decoding of SMBIOS spec 3.1.1

2017-01-23 Thread Ni, Ruiyu
Tim, I agree with you. If the text to display has to be in English. Embedding them in C file makes code more readable. Thanks/Ray > -Original Message- > From: Tim Lewis [mailto:tim.le...@insyde.com] > Sent: Tuesday, January 24, 2017 4:52 AM > To: Carsey, Jaben ;

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

2017-01-23 Thread Ruiyu Ni
https://bugzilla.tianocore.org/show_bug.cgi?id=354 The patch removes the local PCI definitions and uses the definitions defined in MdePkg/Include/IndustryStandard folder. There is no functionality impact. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni

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

2017-01-23 Thread Ruiyu Ni
https://bugzilla.tianocore.org/show_bug.cgi?id=355 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni Cc: Jaben Carsey --- ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c | 3 ++- 1 file changed, 2 insertions(+), 1

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

2017-01-23 Thread Ruiyu Ni
The implementation was already there but through a private flag "-_e". The patch removes "-_e" support and add "-ec" support. Removing old "-_e" support makes the pci command more clean. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni Cc: Jaben

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

2017-01-23 Thread Ruiyu Ni
https://bugzilla.tianocore.org/show_bug.cgi?id=354 The patch removes the local PCI definitions and uses the definitions defined in MdePkg/Include/IndustryStandard folder. There is no functionality impact. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni

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

2017-01-23 Thread Wu, Hao A
> -Original Message- > From: Ard Biesheuvel [mailto:ard.biesheu...@linaro.org] > Sent: Tuesday, January 24, 2017 4:58 AM > To: Laszlo Ersek > Cc: Wu, Hao A; edk2-devel@lists.01.org > Subject: Re: [edk2] [PATCH 0/1] Refine casting expression result to bigger > size > > On 23 January 2017

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

2017-01-23 Thread Daniil Egranov
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: On 20 January 2017 at 01:34, Daniil Egranov wrote: Hi Leif, Ryan On 01/19/2017

Re: [edk2] [PATCH V2 2/2] MdePkg : UefiTcgPlatform.h: Define Startup Locality Event & Indicator

2017-01-23 Thread Yao, Jiewen
Reviewed-by: jiewen@intel.com > -Original Message- > From: Zhang, Chao B > Sent: Tuesday, January 24, 2017 9:54 AM > To: edk2-devel@lists.01.org > Cc: Yao, Jiewen ; Zeng, Star ; > Zhang, Chao B > Subject: [PATCH V2

Re: [edk2] [PATCH V2 1/2] SecurityPkg: Tcg2Dxe: Log Startup Locality Event

2017-01-23 Thread Yao, Jiewen
Reviewed-by: jiewen@intel.com > -Original Message- > From: Zhang, Chao B > Sent: Tuesday, January 24, 2017 9:54 AM > To: edk2-devel@lists.01.org > Cc: Yao, Jiewen ; Zeng, Star ; > Zhang, Chao B > Subject: [PATCH V2

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

2017-01-23 Thread Daniil Egranov
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 --- Changelog: v2 Replaced ASSERT with the error message in

[edk2] [PATCH V2 1/2] SecurityPkg: Tcg2Dxe: Log Startup Locality Event

2017-01-23 Thread Zhang, Chao B
Log Startup Locality Event according to TCG PC Client PFP 00.21. Event should be placed before any extend to PCR[0] http://www.trustedcomputinggroup.org/wp-content/uploads/PC-ClientSpecific_Platform_Profile_for_TPM_2p0_Systems_v21.pdf Cc: Star Zeng Cc: Yao Jiewen

[edk2] [PATCH V2 2/2] MdePkg : UefiTcgPlatform.h: Define Startup Locality Event & Indicator

2017-01-23 Thread Zhang, Chao B
Add Startup Locality Event definition according to PC Client PFP 00.21 http://www.trustedcomputinggroup.org/wp-content/uploads/PC-ClientSpecific_Platform_Profile_for_TPM_2p0_Systems_v21.pdf Add Locality Indicator definition according to PC Client PTP 00.43

Re: [edk2] [PATCH 1/2] SecurityPkg: Tcg2Dxe: Log Startup Locality Event

2017-01-23 Thread Zhang, Chao B
Jiewen: Actually I tried item 2 in PEI & produce hob for DXE to consume. But basing on my test No TPM we have can support such feature defined in PTP00.47. PCR[0] after Startup(CLEAR) always shows zero. I will choose option 1 first. From: Yao, Jiewen Sent: Monday, January 23, 2017 11:25 PM

Re: [edk2] [PATCH 3/3] ShellPkg SmbiosView: Add decoding of SMBIOS spec 3.1.1

2017-01-23 Thread Tim Lewis
In our case, the main firmware is multi-lingual, but the shell is mono-lingual, and they are built together. The reason is: setup users require more user-friendly than shell users in our experience. Tim -Original Message- From: Carsey, Jaben [mailto:jaben.car...@intel.com] Sent:

Re: [edk2] [PATCH 3/3] ShellPkg SmbiosView: Add decoding of SMBIOS spec 3.1.1

2017-01-23 Thread Carsey, Jaben
I was wondering if some replaced version of HiiLib could use the StrDefs.h differently and save the overhead if only one language is present... -Jaben > -Original Message- > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Tim > Lewis > Sent: Monday, January 23,

Re: [edk2] [PATCH 3/3] ShellPkg SmbiosView: Add decoding of SMBIOS spec 3.1.1

2017-01-23 Thread Tim Lewis
We have not found a good solution for handling this automatically, although we have toyed with alternate ways to process the .uni file to create string literals with the StrDefs.h #defines and alternate versions of the ShellLib functions that use them. Tim -Original Message- From:

Re: [edk2] [PATCH 3/3] ShellPkg SmbiosView: Add decoding of SMBIOS spec 3.1.1

2017-01-23 Thread Carsey, Jaben
Tim, I meant some customers do localize the shell and we don't want to arbitrarily restrict that. Do you have any ideas on how to remove the overhead when localization is not required? -Jaben > -Original Message- > From: Tim Lewis [mailto:tim.le...@insyde.com] > Sent: Monday, January

Re: [edk2] [PATCH 3/3] ShellPkg SmbiosView: Add decoding of SMBIOS spec 3.1.1

2017-01-23 Thread Tim Lewis
Jaben -- I don't know exactly what you mean by each "compiler of the shell". I do know that HII strings and HII string handling add the largest discretionary, non-spec-required overhead to the Shell executable (based on our production mini-shell vs. the EDK2 shell) even without any second

Re: [edk2] [PATCH 3/3] ShellPkg SmbiosView: Add decoding of SMBIOS spec 3.1.1

2017-01-23 Thread Carsey, Jaben
Tim, I agree that some strings are directly from SMBIOS or UEFI specifications and are not needed to be localized. Is there a disadvantage to allowing each compiler of the shell to make that an individual decision? In either case, it might be worthwhile to verify that all of the embedded

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

2017-01-23 Thread Ard Biesheuvel
On 23 January 2017 at 11:01, Laszlo Ersek wrote: > On 01/22/17 07:43, Hao Wu wrote: >> Please note that this patch is maily for feedback collection and the patch >> only covers MdePkg. We are working on patches for other packages. >> >> >> There are cases that the operands of

Re: [edk2] [PATCH 3/3] ShellPkg SmbiosView: Add decoding of SMBIOS spec 3.1.1

2017-01-23 Thread Tim Lewis
Also, in some cases, the text is taken directly from the specification. Introducing HII strings in order to make these translatable when the source material is normative doesn't help, IMO. Tim -Original Message- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of

Re: [edk2] [PATCH 3/3] ShellPkg SmbiosView: Add decoding of SMBIOS spec 3.1.1

2017-01-23 Thread Carsey, Jaben
Reviewed-by: Jaben Carsey I think that string mixed use existed in the EDK version of the command and was just never removed. -Jaben > -Original Message- > From: Ni, Ruiyu > Sent: Sunday, January 22, 2017 1:49 AM > To: Zeng, Star ;

Re: [edk2] [PATCH 1/2] SecurityPkg: Tcg2Dxe: Log Startup Locality Event

2017-01-23 Thread Yao, Jiewen
Hi StartupLocality is a platform policy. We should not hardcode it. We may use one of below ways: 1) Define a new PCD. 2) Detect if there is an startuplocality event hob reported in PEI phase. Thank you Yao Jiewen > -Original Message- > From: edk2-devel

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

2017-01-23 Thread Ryan Harkin
On 20 January 2017 at 20:57, Daniil Egranov wrote: > Hi Ryan, > > > On 01/20/2017 04:30 AM, Ryan Harkin wrote: > > On 20 January 2017 at 01:34, Daniil Egranov wrote: > > Hi Leif, Ryan > > > On 01/19/2017 09:13 AM, Leif Lindholm wrote: > > On Thu,

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

2017-01-23 Thread Ryan Harkin
On 20 January 2017 at 20:57, Daniil Egranov wrote: > Hi Ryan, > > > On 01/20/2017 04:30 AM, Ryan Harkin wrote: > > On 20 January 2017 at 01:34, Daniil Egranov wrote: > > Hi Leif, Ryan > > > On 01/19/2017 09:13 AM, Leif Lindholm wrote: > > On Thu,

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

2017-01-23 Thread Laszlo Ersek
On 01/22/17 07:43, Hao Wu wrote: > Please note that this patch is maily for feedback collection and the patch > only covers MdePkg. We are working on patches for other packages. > > > There are cases that the operands of an expression are all with rank less > than UINT64/INT64 and the result of

Re: [edk2] [PATCH 3/3] OvmfPkg/QemuVideoDxe: Frame buffer config size may change in new mode

2017-01-23 Thread Laszlo Ersek
On 01/23/17 07:11, Ruiyu Ni wrote: > https://bugzilla.tianocore.org/show_bug.cgi?id=339 > > The patch removes the assumption in QemuVideoDxe driver that it > wrongly assumes the frame buffer configure size is the same in > different video modes. > The assumption is true in old FrameBufferBltLib

Re: [edk2] [PATCH v3 0/3] Enable the HTTP connections switch

2017-01-23 Thread Laszlo Ersek
On 01/23/17 03:40, Wu, Jiaxin wrote: >> Subject: [PATCH v3 0/3] Enable the HTTP connections switch >> >> v3: >> * Append patch for OVMF. >> >> Cc: Laszlo Ersek >> Cc: Justen Jordan L >> Cc: Gary Lin >> Cc: Ye Ting

[edk2] [PATCH 2/2] MdePkg : UefiTcgPlatform.h: Define Startup Locality Event & Indicator

2017-01-23 Thread Zhang, Chao B
Add Startup Locality Event definition according to PC Client PFP 00.21 http://www.trustedcomputinggroup.org/wp-content/uploads/PC-ClientSpecific_Platform_Profile_for_TPM_2p0_Systems_v21.pdf Add Locality Indicator definition according to PC Client PTP 00.43

[edk2] [PATCH 1/2] SecurityPkg: Tcg2Dxe: Log Startup Locality Event

2017-01-23 Thread Zhang, Chao B
Log Startup Locality Event according to TCG PC Client PFP 00.21. Event should be placed before any extend to PCR[0] http://www.trustedcomputinggroup.org/wp-content/uploads/PC-ClientSpecific_Platform_Profile_for_TPM_2p0_Systems_v21.pdf Cc: Star Zeng Cc: Yao Jiewen

Re: [edk2] [PATCH 1/3] MdeModulePkg/FrameBufferBltLib: Refine ConfigurePixelBitMaskFormat

2017-01-23 Thread Tian, Feng
Reviewed-by: Feng Tian Thanks Feng -Original Message- From: Ni, Ruiyu Sent: Monday, January 23, 2017 2:12 PM To: edk2-devel@lists.01.org Cc: Tian, Feng Subject: [PATCH 1/3] MdeModulePkg/FrameBufferBltLib: Refine ConfigurePixelBitMaskFormat

Re: [edk2] [PATCH 2/3] MdeModulePkg/FrameBufferBltLib: Use dynamic allocated line buffer

2017-01-23 Thread Tian, Feng
Reviewed-by: Feng Tian Thanks Feng -Original Message- From: Ni, Ruiyu Sent: Monday, January 23, 2017 2:12 PM To: edk2-devel@lists.01.org Cc: Tian, Feng Subject: [PATCH 2/3] MdeModulePkg/FrameBufferBltLib: Use dynamic allocated line buffer