]> git.proxmox.com Git - mirror_edk2.git/log
mirror_edk2.git
8 years agoSecurityPkg: Correct NumberOfPCRBanks calculation.
Yao, Jiewen [Mon, 18 Jan 2016 05:49:39 +0000 (05:49 +0000)]
SecurityPkg: Correct NumberOfPCRBanks calculation.

Previously, NumberOfPCRBanks is calculated based on TPM
capability. However, there might be a case that TPM hardware
support 1 algorithm, but BIOS does not support and BIOS
mask it via PCD. This causes the conflict between
HashAlgorithmBitmap and NumberOfPCRBanks.
So we move the NumberOfPCRBanks calculation based on
HashAlgorithmBitmap to make sure the data is consistent.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com>
Reviewed-by: "Zhang, Chao B" <chao.b.zhang@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19660 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoSecurityPkg: Replace TREE macro with TCG2.
Yao, Jiewen [Mon, 18 Jan 2016 05:48:32 +0000 (05:48 +0000)]
SecurityPkg: Replace TREE macro with TCG2.

Since Tcg2Dxe driver follows TCG spec, we should use
TCG2 MACRO, instead of TREE macro.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com>
Reviewed-by: "Zhang, Chao B" <chao.b.zhang@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19659 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg: Add generic PciHostBridgeDxe driver.
Ruiyu Ni [Mon, 18 Jan 2016 04:50:18 +0000 (04:50 +0000)]
MdeModulePkg: Add generic PciHostBridgeDxe driver.

This driver links to PciHostBridgeLib provided by platform/silicon to
produce PciRootBridgeIo and PciHostBridgeResourceAllocation protocol.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19658 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdePkg: Add PciSegmentLib instance based on PciLib
Ruiyu Ni [Mon, 18 Jan 2016 04:50:04 +0000 (04:50 +0000)]
MdePkg: Add PciSegmentLib instance based on PciLib

This PciSegmentLib instance only supports Segment 0 access.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19657 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg: Add PciHostBridgeLibNull
Ruiyu Ni [Mon, 18 Jan 2016 04:49:54 +0000 (04:49 +0000)]
MdeModulePkg: Add PciHostBridgeLibNull

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19656 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg: Add new library class PciHostBridgeLib
Ruiyu Ni [Mon, 18 Jan 2016 04:49:22 +0000 (04:49 +0000)]
MdeModulePkg: Add new library class PciHostBridgeLib

PciHostBridgeDxe driver needs PciHostBridgeLib implemented by platform
to provide the root bridge related information and may call into
PciHostBridgeLib when resource conflicts happen.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19655 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoEdkCompatibilityPkg: Fix wrong guid value of gEfiManagedNetworkProtocolGuid
Liming Gao [Mon, 18 Jan 2016 03:03:19 +0000 (03:03 +0000)]
EdkCompatibilityPkg: Fix wrong guid value of gEfiManagedNetworkProtocolGuid

UEFI2.1B corrects the guid value of gEfiManagedNetworkProtocolGuid.
ECP package updates its value in ManagedNetwork.h, but miss the one
in EdkIIGlueLib.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19654 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoNetworkPkg: Fix SPD entry edit policy issue in IPSecConfig.
Jiaxin Wu [Mon, 18 Jan 2016 01:59:41 +0000 (01:59 +0000)]
NetworkPkg: Fix SPD entry edit policy issue in IPSecConfig.

The current implementation doesn't handle the relationship
between SPD and SAD well, which may introduce some security
and connection issue after SPD updated.
For SPD entry edit policy, if one SPD entry is edited/updated,
the original SAs list should be discard. Current IPSecConfig
tool does not dealt properly with those rules.

Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19653 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoNetworkPkg: Fix IpSec SPD and SAD mapping issue when SPD is updated
Jiaxin Wu [Mon, 18 Jan 2016 01:59:16 +0000 (01:59 +0000)]
NetworkPkg: Fix IpSec SPD and SAD mapping issue when SPD is updated

The current implementation doesn't handle the relationship between
SPD and SAD well, which may introduce some security and connection
issue after SPD updated.
For SPD SetData policy:
 A) When delete the existed SPD entry, its related SAs also should be
removed from its Sas list(SadEntry->BySpd). If the SA entry is
established by IKE, we can remove it from global SAD list(SadEntry->List)
and then free it directly since its SpdEntry will be freed later.
 B) SPD SetData operation should do some setting date validity-check.
For example, whether the SaId specified by setting Data is valid. If
the setting date is invalid, EFI_INVALID_PARAMETER should be returned.

Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19652 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoBaseTools: VPD Tool to allocate VPD region be aligned based on value type
Yonghong Zhu [Mon, 18 Jan 2016 01:47:50 +0000 (01:47 +0000)]
BaseTools: VPD Tool to allocate VPD region be aligned based on value type

Base on build spec update, ASCII strings(“string”), will be byte aligned,
Unicode strings(L”string”) will be two-byte aligned, Byte arrays,
{0x00, 0x01} will be 8-byte aligned.
This patch is going to update VPD Tool to allocate VOID* PCDs to an offset
value that is aligned based in syntax of the PCD value.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19651 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoBaseTools: VOID* PCDs in VPD region must be aligned based on value type
Yonghong Zhu [Mon, 18 Jan 2016 01:46:25 +0000 (01:46 +0000)]
BaseTools: VOID* PCDs in VPD region must be aligned based on value type

Base on build spec update, ASCII strings(“string”), will be byte aligned,
Unicode strings(L”string”) will be two-byte aligned, Byte arrays,
{0x00, 0x01} will be 8-byte aligned.
This patch is going to halt with an error message if a VOID* PCD has an
offset value that is not aligned based on the syntax of the PCD value.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19650 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoBaseTools: Fix GenPatchPcdTable to support '-' characters in file names
Yonghong Zhu [Mon, 18 Jan 2016 01:42:20 +0000 (01:42 +0000)]
BaseTools: Fix GenPatchPcdTable to support '-' characters in file names

The Regular Expression parsing of lines in MAP files does not currently
support the use of '-' in the column for the filename the symbol is
sources from, it cause a build break from the GenPatchPcdTable.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19649 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoShellPkg: Update 'dh' command to reflect correct driver handle information
Tapan Shah [Fri, 15 Jan 2016 17:05:18 +0000 (17:05 +0000)]
ShellPkg: Update 'dh' command to reflect correct driver handle information

'dh' command shows Supported EFI Specification Version value as DriverVersion. Changing it to 'SupportedEfiSpecVersion' to provide more accurate information.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Tapan Shah <tapandshah@hpe.com>
Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19648 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg:Fix the potential memory leak issue in Display Engine
Dandan Bi [Fri, 15 Jan 2016 09:50:40 +0000 (09:50 +0000)]
MdeModulePkg:Fix the potential memory leak issue in Display Engine

The MenuOption insert to gMenuOption allocate memory every time,but not free.
Now add the code to free it.And for Date/Time,it will create 3 menus,but previously
the Description point to the same address,so when free the Description,it will cause
issue,now reset the Description pointer.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19647 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoSecurityPkg: SecureBootConfigDxe: Fix string typo
Chao Zhang [Fri, 15 Jan 2016 05:26:04 +0000 (05:26 +0000)]
SecurityPkg: SecureBootConfigDxe: Fix string typo

Fix secure boot mode transition string typo.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chao Zhang <chao.b.zhang@intel.com>
Reviewed-by: Qin Long <qin.long@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19646 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoSecurityPkg: SecureBootConfigDxe: Enhance secure boot string update logic
Chao Zhang [Fri, 15 Jan 2016 01:06:51 +0000 (01:06 +0000)]
SecurityPkg: SecureBootConfigDxe: Enhance secure boot string update logic

ExtractConfig is called many times, so it's not efficient to update Secure Boot STR_SECURE_BOOT_STATE_CONTENT, STR_CUR_SECURE_BOOT_MODE_CONTENT string in ExtractConfig.
As these 2 strings are displayed on one form, always update them when opening the form.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chao Zhang <chao.b.zhang@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19645 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoSecurityPkg: SecureBootConfigDxe: Change KEY_TRANS_SECURE_BOOT_MODE value
Chao Zhang [Fri, 15 Jan 2016 00:58:37 +0000 (00:58 +0000)]
SecurityPkg: SecureBootConfigDxe: Change KEY_TRANS_SECURE_BOOT_MODE value

Change KEY_TRANS_SECURE_BOOT_MODE value, as it conflicts with OPTION_DEL_KEK_QUESTION_ID.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chao Zhang <chao.b.zhang@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Qin Long <qin.long@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19644 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoNetworkPkg: Remove DNS QType and QClass definition
Jiaxin Wu [Thu, 14 Jan 2016 03:00:38 +0000 (03:00 +0000)]
NetworkPkg: Remove DNS QType and QClass definition

This patch is used to remove DNS QType and QClass definition in
DnsImpl.h since it will be exposed in NetLib.h.

Cc: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19643 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg: Add DNS QType and QClass values definition
Jiaxin Wu [Thu, 14 Jan 2016 03:00:16 +0000 (03:00 +0000)]
MdeModulePkg: Add DNS QType and QClass values definition

This patch is used to add DNS QType and QClass values definition
in NetLib.h

Cc: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19642 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoNetworkPkg: Fix some typos in Http boot driver.
Paulo Alcantara [Tue, 12 Jan 2016 01:37:48 +0000 (01:37 +0000)]
NetworkPkg: Fix some typos in Http boot driver.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Paulo Alcantara <paulo.alc.cavalcanti@hp.com>
Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19640 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoSecurityPkg: TcgDxe,Tcg2Dxe,TrEEDxe: New PCD for TCG event log and TCG2 final event...
Chao Zhang [Tue, 12 Jan 2016 00:37:02 +0000 (00:37 +0000)]
SecurityPkg: TcgDxe,Tcg2Dxe,TrEEDxe: New PCD for TCG event log and TCG2 final event log area

TCG event log and TCG2 final event log area length can be configurable to meet platform event log
requirement.
PcdTcgLogAreaMinLen    : 0x10000  based on minimum requirement in TCG ACPI Spec 00.37
PcdTcg2FinalLogAreaLen : 0x8000   based on experience value

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chao Zhang <chao.b.zhang@intel.com>
Reviewed-by: Yao Jiewen <jiewen.yao@intel.com>
Reviewed-by: Qin Long <qin.long@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19639 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoBaseTools AARCH64: build XIP modules with strict alignment
Ard Biesheuvel [Mon, 11 Jan 2016 08:50:49 +0000 (08:50 +0000)]
BaseTools AARCH64: build XIP modules with strict alignment

GCC for AARCH64 recognizes byte swapping load and store sequences
and may replace them with wider loads or stores combined with rev
instructions. In some cases (i.e., with GCC version 5 and later)
this may result in unaligned accesses, which are not allowed before
we turn the MMU on.

So build any modules or static libraries that may execute with the MMU
off with -mstrict-align. Other modules don't need this switch, so we
can remove it from the CLANG35/AARCH64 common CC flags.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19638 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoBaseTools AARCH64: add separate GCC build rule for XIP objects
Ard Biesheuvel [Mon, 11 Jan 2016 08:50:39 +0000 (08:50 +0000)]
BaseTools AARCH64: add separate GCC build rule for XIP objects

This introduces a special .c to .obj build rule for GCC/AARCH64 that
takes into account additional compiler flags that have been specified
via *_*_*_CC_XIPFLAGS. These will be passed after (and in addition to)
the ordinary CC_FLAGS.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19637 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoBaseTools/VfrCompile: honor CC if it is set
Michael Thomas [Mon, 11 Jan 2016 07:42:03 +0000 (07:42 +0000)]
BaseTools/VfrCompile: honor CC if it is set

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Thomas <malinka@entropy-development.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19636 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoSecurityPkg: Clear AuthSession content after use.
Yao, Jiewen [Mon, 11 Jan 2016 05:18:32 +0000 (05:18 +0000)]
SecurityPkg: Clear AuthSession content after use.

Some commands in Tpm2CommandLib accept AuthSession
as input parameter and copy to local command buffer.
After use, this AuthSession content should be zeroed,
because there might be some secrete there.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com>
Reviewed-by: "Zhang, Chao B" <chao.b.zhang@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19635 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoSecurityPkg: Add Tpm2Startup return code check.
Yao, Jiewen [Mon, 11 Jan 2016 05:15:18 +0000 (05:15 +0000)]
SecurityPkg: Add Tpm2Startup return code check.

Tpm2Startup does not check TPM device return code.
It might cause problem, that error is not detected
in Tcg2Peim, for example, S3 resume case.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com>
Reviewed-by: "Zhang, Chao B" <chao.b.zhang@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19634 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoSecurityPkg: MOR drivers use Tcg2Protocol instead of TrEE.
Yao, Jiewen [Mon, 11 Jan 2016 05:12:31 +0000 (05:12 +0000)]
SecurityPkg: MOR drivers use Tcg2Protocol instead of TrEE.

The official TCG standard uses Tcg2Protocol, instead of TrEE.
We should update TCG driver to use Tcg2Protocol, too.
TrEE should be used only for old TrEE implementation.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com>
Reviewed-by: "Zhang, Chao B" <chao.b.zhang@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19633 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg/NvmExpressDxe: Fix MS toolchain /Od 32bit build failure
Feng Tian [Mon, 11 Jan 2016 02:47:21 +0000 (02:47 +0000)]
MdeModulePkg/NvmExpressDxe: Fix MS toolchain /Od 32bit build failure

Note NVME_ACQ & NVME_ASQ internal data structure are changed to make
build pass.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19632 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg/UfsBlockIoPei: Fix MS toolchain /Od 32bit build failure
Feng Tian [Mon, 11 Jan 2016 02:46:36 +0000 (02:46 +0000)]
MdeModulePkg/UfsBlockIoPei: Fix MS toolchain /Od 32bit build failure

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19631 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg: Fix GraphicsConsole driver resolution out of sync issue
Ruiyu Ni [Mon, 11 Jan 2016 02:29:09 +0000 (02:29 +0000)]
MdeModulePkg: Fix GraphicsConsole driver resolution out of sync issue

When the GOP doesn't support the resolution specified by
PcdVideoHorizontalResolution and PcdVideoVerticalResolution,
the code tries to set the resolution to 800x600 but uses the resolution
equals to the PCD when calculating the text print position.
The patch fixes the bug by updating the resolution to 800x600 for
this case.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19630 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoPcAtChipsetPkg SerialIoLib: Fix VS2010 build error
Hao Wu [Mon, 11 Jan 2016 00:34:36 +0000 (00:34 +0000)]
PcAtChipsetPkg SerialIoLib: Fix VS2010 build error

When overriding compiler options '/GL' with '/GL-', VS2010 will report
warning C4701 potentially uninitialized local variable for 'LcrParity'
and 'LcrStop' in function SerialPortSetAttributes().

This commit fixes this build issue.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19629 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg BaseSerialPortLib: Fix VS2010 build error
Hao Wu [Mon, 11 Jan 2016 00:34:15 +0000 (00:34 +0000)]
MdeModulePkg BaseSerialPortLib: Fix VS2010 build error

When overriding compiler options '/GL' with '/GL-', VS2010 will report
warning C4701 potentially uninitialized local variable for 'LcrParity'
and 'LcrStop' in function SerialPortSetAttributes().

This commit fixes this build issue.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19628 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoStdLib: Fix compilation errors caused by previous commit of daConsole.c
Daryl McDaniel [Sun, 10 Jan 2016 21:23:51 +0000 (21:23 +0000)]
StdLib: Fix compilation errors caused by previous commit of daConsole.c

Move functions da_ConFlush and da_ConClose to just before da_ConPoll so that
they are defined after any calls to them.

Replace da_ConFlush with the actual final implementation instead of the
initial version which was committed.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Daryl McDaniel <edk2-lists@mc2research.org>
Reviewed-by: Michael Zimmermann <sigmaepsilon92@gmail.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19627 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg: DeleteLoadOptionVariable() removes Boot####
Ruiyu Ni [Fri, 8 Jan 2016 07:16:22 +0000 (07:16 +0000)]
MdeModulePkg: DeleteLoadOptionVariable() removes Boot####

Change EfiBootManagerDeleteLoadOptionVariable() to not just
remove #### from BootOrder but also remove Boot#### variable.

The old behavior tries to do less for performance but it leaves
unreferenced Boot#### which cannot be reclaimed in variable
reclaim operation though the Boot#### will be eventually be overwritten
by EfiBootManagerAddLoadOptionVariable().

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19626 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoRefine error handle code, avoid assert when load this module twice.
Eric Dong [Fri, 8 Jan 2016 05:21:55 +0000 (05:21 +0000)]
Refine error handle code, avoid assert when load this module twice.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19625 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg: Update MNP driver to recycle TX buffer asynchronously.
Fu Siyuan [Fri, 8 Jan 2016 02:38:34 +0000 (02:38 +0000)]
MdeModulePkg: Update MNP driver to recycle TX buffer asynchronously.

This patch updates the MNP driver to recycle TX buffer asynchronously, instead
of using a while loop wait after each transmit command.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19624 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg: update SNP.GetStatus to handle multiple recycled TX buffer.
Fu Siyuan [Fri, 8 Jan 2016 02:21:25 +0000 (02:21 +0000)]
MdeModulePkg: update SNP.GetStatus to handle multiple recycled TX buffer.

This patch fixes a bug in SNP.GetStatus() interface. The UNDI driver may return
multiple transmitted buffers in a single GetStatus command, while SNP.GetStatus
could only return one pointer each time, the rest of them are lost. This patch
fixes this issue by store these recycled pointer in a temporary buffer in SNP
driver.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19623 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoSecurityPkg : Tpm2DeviceLibDTpm : Rename TisTpmCommand to avoid name collision
Samer El-Haj-Mahmoud [Fri, 8 Jan 2016 01:36:45 +0000 (01:36 +0000)]
SecurityPkg : Tpm2DeviceLibDTpm :  Rename TisTpmCommand to avoid name collision

Change TisTpmCommand to Tpm2TisTpmCommand. Makes function name more clear.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Samer El-Haj-Mahmoud <samer.el-haj-mahmoud@hpe.com>
Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19622 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoQuarkPlatformPkg/PlatformSecureLib: Remove redundant GPIO expander config
Michael Kinney [Thu, 7 Jan 2016 22:43:31 +0000 (22:43 +0000)]
QuarkPlatformPkg/PlatformSecureLib: Remove redundant GPIO expander config

Remove GPIO expander configuration actions that are now performed in
PEI Phase in PlatformInit module.  In order to detect physical presence
only the state of the Reset Button needs to be read.

Cc: Kelly Steele <kelly.steele@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Kelly Steele <kelly.steele@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19621 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoQuarkPlatformPkg/PlatformEarlyInit: Configure GPIO expander
Michael Kinney [Thu, 7 Jan 2016 22:43:22 +0000 (22:43 +0000)]
QuarkPlatformPkg/PlatformEarlyInit: Configure GPIO expander

Configure GPIO expander in PEI phase
1) Configure all GPIO expander pins connected to Reset Button as inputs
2) Configure multiplexer for I2C to route I2C bus to Arduino Header

Cc: Kelly Steele <kelly.steele@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Kelly Steele <kelly.steele@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19620 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoQuarkPlatformPkg/PlatformHelperLib: Move PCAL functions for PEI use
Michael Kinney [Thu, 7 Jan 2016 22:43:11 +0000 (22:43 +0000)]
QuarkPlatformPkg/PlatformHelperLib: Move PCAL functions for PEI use

The functions used to manage the PCAL GPIO I2C expander are located
in a DXE specific source file.  Move these functions to a source
file that is common to both the PEI and DXE versions of this library
so these GPIO pins can be managed from PEIMs.

Cc: Kelly Steele <kelly.steele@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Kelly Steele <kelly.steele@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19619 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoQuarkPlatformPkg/PlatformInit: Adjust memory bin size to avoid reboot
Michael Kinney [Thu, 7 Jan 2016 22:31:13 +0000 (22:31 +0000)]
QuarkPlatformPkg/PlatformInit: Adjust memory bin size to avoid reboot

Update memory bin sizes in Memory Type Information on first boot after
FLASH update to avoid reboot when memory bins are too small when all
features are enabled.

Cc: Kelly Steele <kelly.steele@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Kelly Steele <kelly.steele@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19618 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoSecurityPkg/Tcg: Fix debug messages
Michael Kinney [Thu, 7 Jan 2016 22:24:22 +0000 (22:24 +0000)]
SecurityPkg/Tcg: Fix debug messages

Debug messages are using a format strings with %s for
a Unicode string, but the strings being printed are
ASCII strings and this results in corrupted debug
messages.  Change the the format string to use %a
instead of %s.

Cc: Chao Zhang <chao.b.zhang@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19617 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoShellPkg: Clean-up 'map' command error message handling
Tapan Shah [Thu, 7 Jan 2016 22:01:28 +0000 (22:01 +0000)]
ShellPkg: Clean-up 'map' command error message handling

Refactor 'map' command error handling code and add standard error message

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Tapan Shah <tapandshah@hpe.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19616 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoQuarkSocPkg: Remove X64 from SUPPORTED_ARCHITECTURES
Michael Kinney [Thu, 7 Jan 2016 21:52:53 +0000 (21:52 +0000)]
QuarkSocPkg: Remove X64 from SUPPORTED_ARCHITECTURES

QuarkSocPkg is only for IA32.  Remove X64 from SUPPORTED_ARCCHITECTURES in
DSC file.

Cc: Kelly Steele <kelly.steele@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Kelly Steele <kelly.steele@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19615 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoOvmfPkg: execute option ROM images regardless of Secure Boot
Laszlo Ersek [Thu, 7 Jan 2016 18:48:17 +0000 (18:48 +0000)]
OvmfPkg: execute option ROM images regardless of Secure Boot

Change the image verification policy for option ROM images to 0x00
(ALWAYS_EXECUTE).

While this may not be a good idea for physical platforms (see e.g.
<https://trmm.net/Thunderstrike>), on the QEMU platform the benefits seem
to outweigh the drawbacks:

- For QEMU's virtual PCI devices, and for some assigned PCI devices, the
  option ROMs come from host-side files, which can never be rewritten from
  within the guest. Since the host admin has full control over a guest
  anyway, executing option ROMs that originate from host-side files
  presents no additional threat to the guest.

- For assigned physical PCI devices with option ROMs, the argument is not
  so clear-cut. In theory a setup could exist where:

  - the host-side UEFI firmware (with DENY_EXECUTE_ON_SECURITY_VIOLATION)
    rejects the option ROM of a malicious physical PCI device, but

  - when the device is assigned to the guest, OVMF executes the option ROM
    in the guest,

  - the option ROM breaks out of the guest (using an assumed QEMU
    vulnerability) and gains QEMU user privileges on the host.

  However, in order to escalate as far as it would happen on the bare
  metal with ALWAYS_EXECUTE (i.e., in order to gain firmware-level access
  on the host), the malicious option ROM would have to break through (1)
  QEMU, (2) traditional UID and GID based privilege separation on the
  host, (3) sVirt (SELinux) on the host, (4) the host OS - host firmware
  boundary. This is not impossible, but not likely enough to discourage
  the use cases below.

- This patch makes it possible to use unsigned iPXE network drivers that
  QEMU presents in the option ROMs of virtual NICs and assigned SR-IOV
  VFs, even if Secure Boot is in User Mode or Deployed Mode.

- The change also makes it possible to execute unsigned, outdated
  (revoked), or downright malicious option ROMs of assigned physical
  devices in guests, for corporate, entertainment, academia, or security
  research purposes.

Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Chao Zhang <chao.b.zhang@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19614 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoOvmfPkg: inherit Image Verification Policy defaults from SecurityPkg
Laszlo Ersek [Thu, 7 Jan 2016 18:48:13 +0000 (18:48 +0000)]
OvmfPkg: inherit Image Verification Policy defaults from SecurityPkg

Secure Boot support was originally addded to OvmfPkg on 2012-Mar-09, in
SVN r13093 (git 8cee3de7e9f4), titled

  OvmfPkg: Enable secure-boot support when SECURE_BOOT_ENABLE==TRUE

At that time the image verification policies in
SecurityPkg/SecurityPkg.dec were:

- option ROM image:      0x00 (ALWAYS_EXECUTE)
- removable media image: 0x05 (QUERY_USER_ON_SECURITY_VIOLATION)
- fixed media image:     0x05 (QUERY_USER_ON_SECURITY_VIOLATION)

The author of SVN r13093 apparently didn't want to depend on the
SecurityPkg defaults for the latter two image origins, plus the
ALWAYS_EXECUTE policy for option ROM images must have been deemed too lax.
For this reason SVN r13093 immediately spelled out 0x05
(QUERY_USER_ON_SECURITY_VIOLATION) within OvmfPkg for all three image
origins.

Fast forward to 2013-Aug-28: policy 0x05
(QUERY_USER_ON_SECURITY_VIOLATION) had been forbidden in the UEFI spec,
and SVN r14607 (git db44ea6c4e09) reflected this in the source code:

- The policies for the latter two image origins were switched from 0x05 to
  0x04 (DENY_EXECUTE_ON_SECURITY_VIOLATION) in SecurityPkg,

- the patch changed the default policy for option ROM images too, from
  0x00 (ALWAYS_EXECUTE) to 0x04 (DENY_EXECUTE_ON_SECURITY_VIOLATION),

- any other client DSC files, including OvmfPkg's, underwent a whole-sale
  0x05 (QUERY_USER_ON_SECURITY_VIOLATION) -> 0x04
  (DENY_EXECUTE_ON_SECURITY_VIOLATION) replacement too.

The practical result of that patch for OvmfPkg was that the explicit 0x04
settings would equal the strict SecurityPkg defaults exactly.

And that's what we have today: the "override the default values from
SecurityPkg" comments in OvmfPkg's DSC files are stale, in practice.

It is extremely unlikely that SecurityPkg would change the defaults from
0x04 (DENY_EXECUTE_ON_SECURITY_VIOLATION) any time in the future, so let's
just inherit those in OvmfPkg.

Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Chao Zhang <chao.b.zhang@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19613 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg/ScsiDisk: Increase the value of SCSI_DISK_TIMEOUT to 30s
Feng Tian [Thu, 7 Jan 2016 07:03:54 +0000 (07:03 +0000)]
MdeModulePkg/ScsiDisk: Increase the value of SCSI_DISK_TIMEOUT to 30s

As ScsiDisk and ScsiBus driver are used to manage SCSI or ATAPI devices,
the timeout value is updated to 30s to follow ATA/ATAPI spec in which
the device may take up to 30s to respond command.

The change is used to solve device compatibility issue found with a TEAC
DV-W28S-WZ3 slim DVD plus a SONY AccuCORE DVD-R media in which the DVD
spends 8s to response READ_CAPACITY cmd after resetting the host machine.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19612 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg/Ide: return correct status when DRQ is not ready for ATAPI
Feng Tian [Thu, 7 Jan 2016 07:03:32 +0000 (07:03 +0000)]
MdeModulePkg/Ide: return correct status when DRQ is not ready for ATAPI

When executing ATAPI cmd at IDE mode, EFI_SUCCESS may be returned wrongly
with old logic but in fact DRQ is not ready and the transaction doesn't
get executed correctly at this time.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19611 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoRevert "ShellPkg : Add UEFI_APPLICATION module type to UefiShellInstall1CommandsLib...
Laszlo Ersek [Wed, 6 Jan 2016 16:23:20 +0000 (16:23 +0000)]
Revert "ShellPkg : Add UEFI_APPLICATION module type to UefiShellInstall1CommandsLib.inf"

SVN r19585 broke the OVMF build:

> ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf(20):
> error 3001: MODULE_TYPE UEFI_DRIVER UEFI_APPLICATION is not supported
> for EDK II, valid values are:
>  BASE SEC PEI_CORE PEIM DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER
>  DXE_SAL_DRIVER DXE_SMM_DRIVER UEFI_DRIVER UEFI_APPLICATION USER_DEFINED
>  SMM_CORE

Revert the patch.

Reported-by: Laszlo Ersek <lersek@redhat.com>
Suggested-by: "El-Haj-Mahmoud, Samer" <samer.el-haj-mahmoud@hpe.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19610 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoNetworkPkg: DnsDxe: fix return type of DnsFillinQNameForQueryIp()
Laszlo Ersek [Wed, 6 Jan 2016 12:34:46 +0000 (12:34 +0000)]
NetworkPkg: DnsDxe: fix return type of DnsFillinQNameForQueryIp()

Change the return type of DnsFillinQNameForQueryIp() from (UINT8*) to
(CHAR*). This brings the function in sync with both its internal variables
and all of its call sites, fixing the following gcc build breakage:

> NetworkPkg/DnsDxe/DnsImpl.c: In function 'DnsFillinQNameForQueryIp':
> NetworkPkg/DnsDxe/DnsImpl.c:1068:3: error: pointer targets in return
>                                     differ in signedness
>                                     [-Werror=pointer-sign]
>    return QueryName;
>    ^

The code was added in git commit fcae1a99 (SVN r19579).

Cc: Subramanian Sriram <sriram-s@hpe.com>
Cc: El-Haj-Mahmoud Samer <samer.el-haj-mahmoud@hpe.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Ye Ting <ting.ye@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19609 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoShellPkg: Make 'alias' can display a single alias name.
Qiu Shumin [Wed, 6 Jan 2016 07:43:58 +0000 (07:43 +0000)]
ShellPkg: Make 'alias' can display a single alias name.

When we run command "alias cat" Shell print out "alias: Too few arguments". This patch makes value of single alias name can be displayed.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19608 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoShellPkg: Fix Shell assert when mv a file to a NULL target.
Qiu Shumin [Wed, 6 Jan 2016 07:40:56 +0000 (07:40 +0000)]
ShellPkg: Fix Shell assert when mv a file to a NULL target.

When run command 'mv file ' the Shell assert. The patch refined the length of the buffer to fix this bug.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19607 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoRollback the commit because it has potential issue.
Dandan Bi [Wed, 6 Jan 2016 03:25:50 +0000 (03:25 +0000)]
Rollback the commit because it has potential issue.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19606 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg: Add error DEBUG statements in ATA passthru driver
Samer El-Haj-Mahmoud [Wed, 6 Jan 2016 02:49:47 +0000 (02:49 +0000)]
MdeModulePkg: Add error DEBUG statements in ATA passthru driver

DEBUG errors for COMRESET and Port phy not ready.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Samer El-Haj-Mahmoud <elhaj@hpe.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19605 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoBaseTools: Fix 'caculate' typos
Hao Wu [Wed, 6 Jan 2016 01:13:35 +0000 (01:13 +0000)]
BaseTools: Fix 'caculate' typos

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19604 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg: Fix 'accroding' typos in MdeModulePkg.dec/.uni
Hao Wu [Wed, 6 Jan 2016 01:13:07 +0000 (01:13 +0000)]
MdeModulePkg: Fix 'accroding' typos in MdeModulePkg.dec/.uni

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19603 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoSecurityPkg Tcg2Pei: Fix a typo in function description
Hao Wu [Wed, 6 Jan 2016 01:12:48 +0000 (01:12 +0000)]
SecurityPkg Tcg2Pei: Fix a typo in function description

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19602 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoNetworkPkg IScsiDxe: Fix typos in function descriptions
Hao Wu [Wed, 6 Jan 2016 01:12:27 +0000 (01:12 +0000)]
NetworkPkg IScsiDxe: Fix typos in function descriptions

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19601 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoNetworkPkg IpSecDxe: Fix a typo in function description
Hao Wu [Wed, 6 Jan 2016 01:12:07 +0000 (01:12 +0000)]
NetworkPkg IpSecDxe: Fix a typo in function description

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19600 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg IScsiDxe: Fix a typo in function description
Hao Wu [Wed, 6 Jan 2016 01:11:49 +0000 (01:11 +0000)]
MdeModulePkg IScsiDxe: Fix a typo in function description

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19599 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg AcpiTableDxe: Fix a typo in function description
Hao Wu [Wed, 6 Jan 2016 01:11:25 +0000 (01:11 +0000)]
MdeModulePkg AcpiTableDxe: Fix a typo in function description

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19598 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg DxeHttpLib: Fix typos in function descriptions
Hao Wu [Wed, 6 Jan 2016 01:11:00 +0000 (01:11 +0000)]
MdeModulePkg DxeHttpLib: Fix typos in function descriptions

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19597 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg Core/Dxe/Misc: Fix typos in function descriptions
Hao Wu [Wed, 6 Jan 2016 01:10:40 +0000 (01:10 +0000)]
MdeModulePkg Core/Dxe/Misc: Fix typos in function descriptions

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19596 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg UhciDxe: Fix a typo in function description
Hao Wu [Wed, 6 Jan 2016 01:09:56 +0000 (01:09 +0000)]
MdeModulePkg UhciDxe: Fix a typo in function description

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19595 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoAppPkg/.../Python: Clean up and document how to escape the -# option.
Daryl McDaniel [Wed, 6 Jan 2016 01:00:19 +0000 (01:00 +0000)]
AppPkg/.../Python: Clean up and document how to escape the -# option.

Depending upon the version of Shell you are using, it may be necessary
to escape the '#' character, when using the "-#" command-line option, so that
the Shell doesn't interpret it as the start of a comment.
The escape character is '^'.
Example:
    python -^# -V

* General updating.
* Re-format so that no line is longer than 80 char.
* Add note about escaping the "-#" command-line option.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Daryl McDaniel <edk2-lists@mc2research.org>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19594 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg:Fix the potential memory leak issue in Display Engine
Dandan Bi [Wed, 6 Jan 2016 00:57:23 +0000 (00:57 +0000)]
MdeModulePkg:Fix the potential memory leak issue in Display Engine

The MenuOption insert to gMenuOption allocate memory everytime,but not free.
Now add the code to free it.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19593 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoNetworkPkg: Removing or adding some ASSERT statement
Jiaxin Wu [Wed, 6 Jan 2016 00:55:38 +0000 (00:55 +0000)]
NetworkPkg: Removing or adding some ASSERT statement

Refine the code by removing or adding some ASSERT statement
to make the code more readable.

Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19592 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg:Change the type of BootNext
Dandan Bi [Wed, 6 Jan 2016 00:55:12 +0000 (00:55 +0000)]
MdeModulePkg:Change the type of BootNext

Currently the invalid boot next set to the number of boot option,
when add a new boot option,also need update the boot next value,
otherwise it will be incorrect.Now set the type of BootNext value
to UINT32,the number out of the range of UINT16 means it is an
invalid BootNext Value.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19591 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg:Avoid ASSERT in HiiConfigRoutingRouteConfig
Dandan Bi [Wed, 6 Jan 2016 00:52:53 +0000 (00:52 +0000)]
MdeModulePkg:Avoid ASSERT in HiiConfigRoutingRouteConfig

Add error handling code to enhance the code,the driver may not install
the ConfigAccess protocol,so should not just ASSERT here.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19590 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoStdLib: Fix IIO_Write() to return the number of bytes consumed, not characters output.
Daryl McDaniel [Wed, 6 Jan 2016 00:44:24 +0000 (00:44 +0000)]
StdLib: Fix IIO_Write() to return the number of bytes consumed, not characters output.

Depending upon termios settings, writing to a terminal device may result in
many more characters being output than were in the buffer provided to the
IIO_Write() function.

IIO_Write() is supposed to return the number of BYTES written, not characters.
Since the provided buffer contains MBCS characters, there can be up to three
bytes per character.  Due to the expansion that may occur, "BYTES written"
is interpreted to mean the number of BYTES consumed from the MBCS buffer
provided as a parameter to IIO_Write.

These changes ensure that the correct number of characters are consumed from
the internal Output buffer and the correct number of BYTES consumed from the
buffer parameter are counted and returned.

Update copyright.
Fix some indentation and white space issues.
Improve comments for IIO_Write().
Add debugging instrumentation to count unconsumed data in the Input and Output buffers.
Modify IIO_Write() to:
  Accurately count input bytes CONSUMED.
  Consume only as many expanded (cooked) characters from the output buffer
  as were actually sent to the device.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Daryl McDaniel <edk2-lists@mc2research.org>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19589 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoStdLib: Clarify and improve comments.
Daryl McDaniel [Wed, 6 Jan 2016 00:31:42 +0000 (00:31 +0000)]
StdLib: Clarify and improve comments.

Indentation has been corrected in all of the files.

LibC/Locale/multibyte_Utf8.c
LibC/Uefi/SysCalls.c
  Clarify and improve comments.

Include/sys/termios.h
  Add parameter names to function prototypes as referenced in the comments.

StdLibPrivateInternalFiles\Include\kfile.h
  Add comment for the fo_close fileop.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Daryl McDaniel <edk2-lists@mc2research.org>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19588 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoStdLib: Implement da_ConFlush() and flush I/O buffers when closing a console device.
Daryl McDaniel [Wed, 6 Jan 2016 00:05:02 +0000 (00:05 +0000)]
StdLib: Implement da_ConFlush() and flush I/O buffers when closing a console device.

Add header file Efi/SysEfi.h
Clean up some indent issues.
Implement function da_ConFlush()
Modify da_ConClose() to flush its buffers and clean up better upon close.
Construct the console instance using the new da_ConFlush() instead of the nullop function.
Remove da_ConFlush() from the "Not implemented (yet?)" place holder.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Daryl McDaniel <edk2-lists@mc2research.org>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19587 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoStdLib: Temporarily restrict compiler warnings so that sockets can be built using...
Daryl McDaniel [Tue, 5 Jan 2016 23:46:22 +0000 (23:46 +0000)]
StdLib: Temporarily restrict compiler warnings so that sockets can be built using VS2015.

Update Copyright notice.
Add Build Options so that builds using VS2015 have the /Wv:11 options added to the CC_FLAGS.
This restricts the warnings generated by VS2015 (VC++) to just those that are produced by
version 11 of the C compiler, VS2010.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Daryl McDaniel <edk2-lists@mc2research.org>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19586 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoShellPkg : Add UEFI_APPLICATION module type to UefiShellInstall1CommandsLib.inf
Samer El-Haj-Mahmoud [Tue, 5 Jan 2016 23:17:18 +0000 (23:17 +0000)]
ShellPkg : Add UEFI_APPLICATION module type to UefiShellInstall1CommandsLib.inf

Using UEFI_APPLICATION for all Shell app and libraries allows the use of
different compiler flags for the Shell application itself and for other
applications that are built separately that use Shell libraries.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Samer El-Haj-Mahmoud <elhaj@hpe.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19585 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoBaseTools CLANG35: use -target in PP flags as well
Ard Biesheuvel [Mon, 4 Jan 2016 09:31:42 +0000 (09:31 +0000)]
BaseTools CLANG35: use -target in PP flags as well

The Clang preprocessor may rely on builtin defines that are target
dependent, so we should add the -target argument also when invoking
the preprocessor directly.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19584 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoBaseTools CLANG35: use linux-gnu target triplets explicitly
Ard Biesheuvel [Mon, 4 Jan 2016 09:31:33 +0000 (09:31 +0000)]
BaseTools CLANG35: use linux-gnu target triplets explicitly

Since we are combining Clang with the GNU linker, make that explicit in
the target triplet. This affects certain builtin defines and other compiler
behavior that may be unspecified otherwise.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19583 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg: For RegularExpressionDxe use 'sprintf_s' to replace 'sprintf'.
Qiu Shumin [Mon, 4 Jan 2016 05:14:53 +0000 (05:14 +0000)]
MdeModulePkg: For RegularExpressionDxe use 'sprintf_s' to replace 'sprintf'.

Function 'sprintf' has potential buffer overflow risk. This patch use 'sprintf_s' to improve the code.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Yao Jiewen <Jiewen.Yao@intel.com>
Reviewed-by: Cinnamon Shia <cinnamon.shia@hpe.com>
Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19582 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoAppPkg/Applications/Python/Python-2.7.10/*/pyconfig.h: Update pyconfig for Python...
Daryl McDaniel [Mon, 4 Jan 2016 02:48:18 +0000 (02:48 +0000)]
AppPkg/Applications/Python/Python-2.7.10/*/pyconfig.h: Update pyconfig for Python 2.7.10 compliance.

Add new constants required for Python 2.7.10.
Update package and help values.
Define networking constants so that the getaddrinfo, gethostbyname, and
getnameinfo functions are used from the sockets package.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Daryl McDaniel <edk2-lists@mc2research.org>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19581 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdePkg/BaseLib: do not rely on undefined behavior in arithmetic shift
Ard Biesheuvel [Thu, 31 Dec 2015 10:47:22 +0000 (10:47 +0000)]
MdePkg/BaseLib: do not rely on undefined behavior in arithmetic shift

The runtime test whether the compiler supports arithmetic shift of
negative signed numbers currently relies on undefined behavior in C,
which means that all bets are off regarding whether the condition
that follows passes or fails, regardless of whether the compiler in
fact supports arithmetic shift or not.

Relevant quote from ISO C99 (6.5.7/4)

  The result of E1 << E2 is E1 left-shifted E2 bit positions; vacated bits
  are filled with zeros. If E1 has an unsigned type, the value of the result
  is E1 × 2^E2, reduced modulo one more than the maximum value representable
  in the result type. If E1 has a signed type and nonnegative value, and
  E1 × 2^E2 is representable in the result type, then that is the resulting
  value; otherwise, the behavior is undefined.

For historic purposes, let's keep the test in place (although it is doubtful
we actually need it) but rewrite it in a way that prevents compilers from
this century from doing whacky things with it.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19580 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoNetworkPkg: Support DNS4/6 GeneralLookUp feature
Jiaxin Wu [Wed, 30 Dec 2015 08:10:55 +0000 (08:10 +0000)]
NetworkPkg: Support DNS4/6 GeneralLookUp feature

This patch is used to support DNS4/6 GeneralLookUp feature.

Cc: Subramanian Sriram <sriram-s@hpe.com>
Cc: El-Haj-Mahmoud Samer <samer.el-haj-mahmoud@hpe.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19579 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg Variable: Add a missing variable info record
Star Zeng [Wed, 30 Dec 2015 05:09:50 +0000 (05:09 +0000)]
MdeModulePkg Variable: Add a missing variable info record

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19578 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg Variable: Handle ftw driver executes prior to variable driver
Star Zeng [Wed, 30 Dec 2015 05:09:16 +0000 (05:09 +0000)]
MdeModulePkg Variable:  Handle ftw driver executes prior to variable driver

Variable driver uses gEdkiiFaultTolerantWriteGuid hob and copies  data to NvStorageData if hob exists.
But if ftw driver executes prior to variable driver then spare block is erased.

So the patch is to enhance the code to do not check FTW last write data hob if FTW protocol has been installed.

Cc: Liming Gao <liming.gao@intel.com>
Reported-by: Baraneedharan Anbazhagan <anbazhagan@hp.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Baraneedharan Anbazhagan <anbazhagan@hp.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19577 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoBaseTool/UPT: Fix a typo issue
Hess Chen [Wed, 30 Dec 2015 02:22:30 +0000 (02:22 +0000)]
BaseTool/UPT: Fix a typo issue

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hess Chen <hesheng.chen@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19576 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoBaseTool/ECC: Add UTF-8 support on ECC tool
Hess Chen [Wed, 30 Dec 2015 02:22:02 +0000 (02:22 +0000)]
BaseTool/ECC: Add UTF-8 support on ECC tool

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hess Chen <hesheng.chen@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19575 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoSecurityPkg AuthVariableLib: Correct comment/error log about CleanCertsFromDb
Star Zeng [Tue, 29 Dec 2015 09:07:32 +0000 (09:07 +0000)]
SecurityPkg AuthVariableLib: Correct comment/error log about CleanCertsFromDb

Cc: Chao Zhang <chao.b.zhang@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19574 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg Variable: VarErrFlag need to be consistent in NV flash and cache
Star Zeng [Tue, 29 Dec 2015 09:04:55 +0000 (09:04 +0000)]
MdeModulePkg Variable: VarErrFlag need to be consistent in NV flash and cache

The code wrongly has TempFlag wrote to NV flash, but has Flag assigned to NV cache.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19573 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg Variable: ###VariableTotalSize need to be initialized to 0 first
Star Zeng [Tue, 29 Dec 2015 09:00:58 +0000 (09:00 +0000)]
MdeModulePkg Variable: ###VariableTotalSize need to be initialized to 0 first

HwErrVariableTotalSize/CommonVariableTotalSize/CommonUserVariableTotalSize
need to be initialized to 0 first after reclaim failed, then to be assigned by += operation.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19572 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoAppPkg/Applications/Python/Python-2.7.10/*/pyconfig.h: Update pyconfig for Python...
Daryl McDaniel [Tue, 29 Dec 2015 02:53:10 +0000 (02:53 +0000)]
AppPkg/Applications/Python/Python-2.7.10/*/pyconfig.h: Update pyconfig for Python 2.7.10 compliance.

Add new constants required for Python 2.7.10.
Update package and help values.
Define networking constants so that the getaddrinfo, gethostbyname, and
getnameinfo functions are used from the sockets package.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Daryl McDaniel <edk2-lists@mc2research.org>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19553 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoNetworkPkg: Fix suspicious dereference of pointer before NULL check
Jiaxin Wu [Fri, 25 Dec 2015 08:10:37 +0000 (08:10 +0000)]
NetworkPkg: Fix suspicious dereference of pointer before NULL check

This patch is used to fix suspicious dereference of pointer before
NULL check in IScsiDxe driver.

Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19552 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdePkg: Remove empty BasePeCoffLib/AArch64 directory.
Ruiyu Ni [Fri, 25 Dec 2015 06:50:55 +0000 (06:50 +0000)]
MdePkg: Remove empty BasePeCoffLib/AArch64 directory.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19551 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoDuetPkg: Remove CpuDxe empty directory.
Ruiyu Ni [Fri, 25 Dec 2015 06:49:29 +0000 (06:49 +0000)]
DuetPkg: Remove CpuDxe empty directory.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19550 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoShellBinPkg: Ia32/X64 Shell binary update.
Qiu Shumin [Fri, 25 Dec 2015 04:20:28 +0000 (04:20 +0000)]
ShellBinPkg: Ia32/X64 Shell binary update.

The binaries of ShellBinPkg are generated with ShellPkg project 19529. The binaries are built with no debug information by building with "RELEASE" target.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19548 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoRemove the empty folder.
Eric Dong [Fri, 25 Dec 2015 04:09:49 +0000 (04:09 +0000)]
Remove the empty folder.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eirc.dong@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19546 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg/BootManagerMenu: Fix bug that boots to undesired option
Ruiyu Ni [Fri, 25 Dec 2015 02:45:57 +0000 (02:45 +0000)]
MdeModulePkg/BootManagerMenu: Fix bug that boots to undesired option

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19542 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoShellPkg: Fix memory leak in function 'EfiShellSetCurDir' and 'EfiShellSetMap'.
Yao Jiewen [Fri, 25 Dec 2015 01:52:56 +0000 (01:52 +0000)]
ShellPkg: Fix memory leak in function 'EfiShellSetCurDir' and 'EfiShellSetMap'.

Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yao Jiewen <Jiewen.Yao@intel.com>
Reviewed-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19529 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoShellPkg: Fix memory leak in function'ShellCommandConsistMappingInitialize'.
Yao Jiewen [Fri, 25 Dec 2015 01:46:02 +0000 (01:46 +0000)]
ShellPkg: Fix memory leak in function'ShellCommandConsistMappingInitialize'.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yao Jiewen <Jiewen.Yao@intel.com>
Reviewed-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19528 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoShellPkg: Fix memory leak in function 'ShellCommandCreateInitialMappingsAndPaths'.
Yao Jiewen [Fri, 25 Dec 2015 01:41:38 +0000 (01:41 +0000)]
ShellPkg: Fix memory leak in function 'ShellCommandCreateInitialMappingsAndPaths'.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yao Jiewen <Jiewen.Yao@intel.com>
Reviewed-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19527 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoShellPkg: Fix memory leak in function'ShellCommandRunHelp'.
Yao Jiewen [Fri, 25 Dec 2015 01:33:53 +0000 (01:33 +0000)]
ShellPkg: Fix memory leak in function'ShellCommandRunHelp'.

When run help command Shell may have memory leak. This patch fix this bug.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yao Jiewen <Jiewen.Yao@intel.com>
Reviewed-by: Qiu Shumin <shumin.qiu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19526 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoSubject: [PATCH 5/9] ShellPkg: Fix memory leak in function'ManBufferFindSections'.
Qiu Shumin [Fri, 25 Dec 2015 01:29:38 +0000 (01:29 +0000)]
Subject: [PATCH 5/9] ShellPkg: Fix memory leak in function'ManBufferFindSections'.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Yao Jiewen <Jiewen.Yao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19525 6f19259b-4bc3-4df7-8a09-765794883524