]> git.proxmox.com Git - mirror_edk2.git/log
mirror_edk2.git
7 years agoCryptoPkg BaseCryptLib: Avoid passing NULL ptr to function BN_bn2bin()
Hao Wu [Fri, 1 Jul 2016 07:12:40 +0000 (15:12 +0800)]
CryptoPkg BaseCryptLib: Avoid passing NULL ptr to function BN_bn2bin()

This commit modifies the code logic to avoid passing NULL pointer to
function BN_bn2bin().

Cc: Long Qin <qin.long@intel.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: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Qin Long <qin.long@intel.com>
7 years agoMdeModulePkg MemoryProfile: ASSERT to ensure 'DriverInfoData' is not NULL
Hao Wu [Thu, 7 Jul 2016 00:49:38 +0000 (08:49 +0800)]
MdeModulePkg MemoryProfile: ASSERT to ensure 'DriverInfoData' is not NULL

Code logic ensures that the pointer 'DriverInfoData' will not be NULL when
it is used.

Add ASSERT as warning for case that will not happen.

Cc: Star Zeng <star.zeng@intel.com>
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>
7 years agoNetworkPkg: Update PXE driver to follow edk2 coding standards.
Fu Siyuan [Thu, 30 Jun 2016 01:57:56 +0000 (09:57 +0800)]
NetworkPkg: Update PXE driver to follow edk2 coding standards.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Samer El-Haj-Mahmoud <smahmoud@lenovo.com>
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Zhang Lubo <lubo.zhang@intel.com>
7 years agoMdeModulePkg: Update PXE driver to follow edk2 coding standards.
Fu Siyuan [Thu, 30 Jun 2016 01:57:23 +0000 (09:57 +0800)]
MdeModulePkg: Update PXE driver to follow edk2 coding standards.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Samer El-Haj-Mahmoud <smahmoud@lenovo.com>
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Zhang Lubo <lubo.zhang@intel.com>
7 years agoIntelFsp2Pkg SecFspSecPlatformLibNull: Remove MASM/GAS files
Liming Gao [Fri, 8 Jul 2016 14:49:23 +0000 (22:49 +0800)]
IntelFsp2Pkg SecFspSecPlatformLibNull: Remove MASM/GAS files

Keep NASM file only for new added modules.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Giri Mudusuru <giri.p.mudusuru@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>
7 years agoIntelFsp2Pkg BaseFspSwitchStackLib: Remove MASM/GAS files
Liming Gao [Fri, 8 Jul 2016 14:49:22 +0000 (22:49 +0800)]
IntelFsp2Pkg BaseFspSwitchStackLib: Remove MASM/GAS files

Keep NASM file only for new added modules.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Giri Mudusuru <giri.p.mudusuru@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>
7 years agoIntelFsp2Pkg BaseFspDebugLibSerialPort: Remove MASM/GAS files
Liming Gao [Fri, 8 Jul 2016 14:49:21 +0000 (22:49 +0800)]
IntelFsp2Pkg BaseFspDebugLibSerialPort: Remove MASM/GAS files

Keep NASM file only for new added modules.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Giri Mudusuru <giri.p.mudusuru@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>
7 years agoIntelFsp2WrapperPkg SecFspWrapperPlatformSecLibSample: Remove MASM/GAS files
Liming Gao [Fri, 8 Jul 2016 14:49:20 +0000 (22:49 +0800)]
IntelFsp2WrapperPkg SecFspWrapperPlatformSecLibSample: Remove MASM/GAS files

Keep NASM file only for new added modules.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Giri Mudusuru <giri.p.mudusuru@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>
7 years agoIntelFsp2WrapperPkg BaseFspWrapperApiLib: Remove MASM/GAS files
Liming Gao [Fri, 8 Jul 2016 14:49:19 +0000 (22:49 +0800)]
IntelFsp2WrapperPkg BaseFspWrapperApiLib: Remove MASM/GAS files

Keep NASM file only for new added modules.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Giri Mudusuru <giri.p.mudusuru@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>
7 years agoUefiCpuPkg CpuMpPei: Update INF to refer to NASM source file
Liming Gao [Mon, 11 Jul 2016 03:14:21 +0000 (11:14 +0800)]
UefiCpuPkg CpuMpPei: Update INF to refer to NASM source file

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
7 years agoUefiCpuPkg CpuIo2Dxe: Update INF to refer to NASM source file
Liming Gao [Mon, 11 Jul 2016 03:13:57 +0000 (11:13 +0800)]
UefiCpuPkg CpuIo2Dxe: Update INF to refer to NASM source file

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
7 years agoUefiCpuPkg SecCore: Update SecCore inf to refer to nasmb source
Liming Gao [Mon, 11 Jul 2016 02:59:58 +0000 (10:59 +0800)]
UefiCpuPkg SecCore: Update SecCore inf to refer to nasmb source

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
7 years agoNetworkPkg: Fix Assert issue in iSCSI driver.
Zhang, Lubo [Fri, 8 Jul 2016 07:50:46 +0000 (15:50 +0800)]
NetworkPkg: Fix Assert issue in iSCSI driver.

The bug existed in replacing AsciiStrToUnicodeStr with AsciiStrToUnicodeStrS,
since MacString now is a pointer, the value sizeof(MacString)/sizeof (MacString[0])
is not correct here as the third parameter.

Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Wu Jiaxin <jiaxin.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <lubo.zhang@intel.com>
Reviewed-By: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
7 years agoSecurityPkg OpalPasswordSmm: Remove useless code.
Eric Dong [Fri, 8 Jul 2016 02:51:10 +0000 (10:51 +0800)]
SecurityPkg OpalPasswordSmm: Remove useless code.

EdkII not allow to use #if in source code, also
the code in it already unused. so just remove this
code.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
7 years agoUefiCpuPkg: Fix typos in comments
Giri P Mudusuru [Fri, 8 Jul 2016 06:21:08 +0000 (14:21 +0800)]
UefiCpuPkg: Fix typos in comments

- becasue to because

Cc: Jeff Fan <jeff.fan@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
7 years agoNetworkPkg: Fix typos in comments
Giri P Mudusuru [Fri, 8 Jul 2016 06:21:06 +0000 (14:21 +0800)]
NetworkPkg: Fix typos in comments

- abstrated to abstracted
- apropriate to appropriate
- availabe to available
- ptototypes to prototypes
- prococol protocol

Cc: Siyuan Fu <siyuan.fu@intel.com>
Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>
Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
7 years agoMdePkg: Fix typos in comments
Mudusuru, Giri P [Fri, 8 Jul 2016 06:21:05 +0000 (14:21 +0800)]
MdePkg: Fix typos in comments

- availabe to available
- EFI_UNSUPPORTEDT to EFI_UNSUPPORTED

Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoMdeModulePkg: Fix typos in comments and variables
Giri P Mudusuru [Fri, 8 Jul 2016 06:21:04 +0000 (14:21 +0800)]
MdeModulePkg: Fix typos in comments and variables

  - abstrated to abstracted
  - accessibla to accessible
  - addres to address
  - apropriate to appropriate
  - arry to array
  - availabe to available
  - avaliable to available
  - becasue to because
  - correponding to corresponding
  - etablished to established
  - exeuction to execution
  - extensiable to extensible
  - fileds to fields
  - loadding to loading
  - ptototypes to prototypes
  - prococol protocol
  - requried to required
  - resoruce to resource
  - runing to running
  - uild to build

Cc: Star Zeng <star.zeng@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
7 years agoIntelFrameworkModulePkg: Fix typos in comments
Giri P Mudusuru [Fri, 8 Jul 2016 06:21:03 +0000 (14:21 +0800)]
IntelFrameworkModulePkg: Fix typos in comments

- requried to required

Cc: Jeff Fan <jeff.fan@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
7 years agoPcAtChipsetPkg: Fix typos in comments
Giri P Mudusuru [Fri, 8 Jul 2016 06:21:02 +0000 (14:21 +0800)]
PcAtChipsetPkg: Fix typos in comments

- EFI_UNSUPPORTEDT to EFI_UNSUPPORTED

Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
7 years agoOptionRomPkg: Fix typos in comments
Giri P Mudusuru [Fri, 8 Jul 2016 06:21:01 +0000 (14:21 +0800)]
OptionRomPkg: Fix typos in comments

- EFI_OUT_OF_RESORUCES to EFI_OUT_OF_RESOURCES

Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
7 years agoSecurityPkg: Fix typos in comments
Giri P Mudusuru [Fri, 8 Jul 2016 06:21:00 +0000 (14:21 +0800)]
SecurityPkg: Fix typos in comments

- availabe to available

Cc: Chao Zhang <chao.b.zhang@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>
Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
7 years agoCryptoPkg: Fix typos in comments
Giri P Mudusuru [Fri, 8 Jul 2016 06:20:59 +0000 (14:20 +0800)]
CryptoPkg: Fix typos in comments

- availabe to available

Cc: Qin Long <qin.long@intel.com>
Cc: Ting Ye <ting.ye@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>
Reviewed-by: Qin Long <qin.long@intel.com>
7 years agoNt32Pkg: Fix typos in comments
Giri P Mudusuru [Fri, 8 Jul 2016 06:20:58 +0000 (14:20 +0800)]
Nt32Pkg: Fix typos in comments

- EFI_UNSUPPORTEDT to EFI_UNSUPPORTED

Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
7 years agoEdkCompatibilityPkg: Fix typos in comments
Mudusuru, Giri P [Fri, 8 Jul 2016 06:20:56 +0000 (14:20 +0800)]
EdkCompatibilityPkg: Fix typos in comments

  - availabe to available
  - consummer to consumer
  - EFI_UNSUPPORTEDT to EFI_UNSUPPORTED
  - extensiable to extensible

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoArmPkg: Fix typos in comments
Giri P Mudusuru [Fri, 8 Jul 2016 06:20:55 +0000 (14:20 +0800)]
ArmPkg: Fix typos in comments

EFI_UNSUPPORTEDT to EFI_UNSUPPORTED

Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
7 years agoMdeModulePkg SdBlockIoPei: Initialize 'SwitchResp' elements before using
Hao Wu [Thu, 7 Jul 2016 06:53:58 +0000 (14:53 +0800)]
MdeModulePkg SdBlockIoPei: Initialize 'SwitchResp' elements before using

The commit makes sure that the elements in array 'SwitchResp' get
initialized before being used.

Cc: Feng Tian <feng.tian@intel.com>
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>
7 years agoMdeModulePkg MemoryProfile.h:two bytes of Reserved[4] as ActionStringOffset
Star Zeng [Fri, 8 Jul 2016 02:37:46 +0000 (10:37 +0800)]
MdeModulePkg MemoryProfile.h:two bytes of Reserved[4] as ActionStringOffset

At 94092aa60341a3e4b1e1ea7c362781b8404ac538, we extended
MEMORY_PROFILE_ALLOC_INFO to add ActionStringOffset and
Reserved2[6] fields, that was not aware the Reserved[4]
field can be reused to have better memory profile database
size efficiency.

With the patch, PcdMemoryProfilePropertyMask|0x3 and
PcdMemoryProfileMemoryType|0xffff, the memory profile
database size can be reduced as below on my sample platform.

UefiMemoryProfileSize - 0x1597A8 -> UefiMemoryProfileSize - 0x12AB28
SmramProfileSize - 0xCF68 -> SmramProfileSize - 0xB8E8

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>
7 years agoMdePkg Base.h: Fix typo funcation to function
Star Zeng [Fri, 8 Jul 2016 01:31:13 +0000 (09:31 +0800)]
MdePkg Base.h: Fix typo funcation to function

Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
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: Liming Gao <liming.gao@intel.com>
7 years agoArmVirtPkg/PlatformBootManagerLib: Postpone the shell registration
Laszlo Ersek [Fri, 8 Jul 2016 09:20:32 +0000 (11:20 +0200)]
ArmVirtPkg/PlatformBootManagerLib: Postpone the shell registration

This patch ports Gary's OvmfPkg commit 14b2ebc30c8b to ArmVirtPkg.

Turns out Gary's argument in 14b2ebc30c8b is not only valid for Xen. The
same situation arises with QEMU if:
- the user specifies no boot order via fw_cfg at all (so QemuBootOrderLib
  won't touch the boot order), and
- the varstore file has just been created from the varstore template.

In this case the user is dropped to the UEFI shell (because the shell is
registered earlier than all the auto-generated options), which is likely
not what the user wants.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Gary Lin <glin@suse.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
7 years agoOvmfPkg: Fix typos in comments
Giri P Mudusuru [Fri, 8 Jul 2016 06:21:07 +0000 (23:21 -0700)]
OvmfPkg: Fix typos in comments

  - accessibla to accessible
  - exeuction to execution

Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
7 years agoCryptoPkg: update openssl to ignore RVCT 3079
Eugene Cohen [Fri, 8 Jul 2016 07:53:16 +0000 (15:53 +0800)]
CryptoPkg: update openssl to ignore RVCT 3079

Getting openssl 1.0.2g building with ARM RVCT requires a change to
ignore an unset variable used before set was necessary.
(NOTE: This was fixed in OpenSSL 1.1 HEAD with commit
       d9b8b89bec4480de3a10bdaf9425db371c19145b, and can be dropped then.)

corrects x509_vfy.c(875): error C3017: ok may be used before being set

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eugene Cohen <eugene@hp.com>
Reviewed-by: Qin Long <qin.long@intel.com>
7 years agoRevert "ShellPkg: Make the USB mouse behavior in 'edit' consistent with 'hexedit'."
Ruiyu Ni [Tue, 5 Jul 2016 05:28:53 +0000 (13:28 +0800)]
Revert "ShellPkg: Make the USB mouse behavior in 'edit' consistent with 'hexedit'."

This reverts commit ee60bd2b6aa473fdff6af3bfc62203ed8ca5c52a and
e36ed7a84b2768443de22371f0aad5cf502328b1.
The two commits enhanced 'edit' to support text selection through
mouse. But the code introduced some bugs resulting the text
selection behavior is not very usable and potentially hang in
certain platforms.

So I'd like to revert them firstly. If there is strong
requirement for the text selection through mouse in 'edit'
I will refine and re-add the code.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Jaben Carsey <jarben.carsey@intel.com>
7 years agoShellPkg: Series of patches to fix typos - apropriate to appropriate
Mudusuru, Giri P [Thu, 7 Jul 2016 07:47:45 +0000 (00:47 -0700)]
ShellPkg: Series of patches to fix typos - apropriate to appropriate

Cc: Jaben Carsey <jaben.carsey@intel.com>
Cc: Shumin Qiu <shumin.qiu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>
Reviewed-By: Jaben Carsey <jaben.carsey@intel.com>
7 years agoStdLib: Series of patches to fix typos - availabe to available
Mudusuru, Giri P [Thu, 7 Jul 2016 07:47:35 +0000 (00:47 -0700)]
StdLib: Series of patches to fix typos - availabe to available

Cc: Jaben Carsey <jaben.carsey@intel.com>
Cc: Daryl McDaniel <edk2-lists@mc2research.org>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>
Reviewed-By: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-By: Daryl McDaniel <edk2-lists@mc2research.org>
7 years agoArmPlatformPkg: Set Juno debug serial port defaults
Evan Lloyd [Mon, 20 Jun 2016 18:43:04 +0000 (19:43 +0100)]
ArmPlatformPkg: Set Juno debug serial port defaults

Juno has several serial ports, one of which may be used for a remote
debug interface (e.g. gdb, WinDbg).  The debug serial port needs to
be distinct from that used for UEFI trace to prevent corruption of
debugger protocol messaging.
The UEFI spec requires that serial devices be initialised to default
settings. (11.8 Serial I/O Protocol - "The default attributes for all
UART-style serial device interfaces are: 115,200 baud, ..."
and 17.3.3 EFI Debugport Variable - "These defaults must be used in the
absence of a DEBUGPORT variable...")

This change adds initialization of the serial device reported in the
ACPI DBG2 table.  The initialisation is done early in the boot to allow
the possibility of remote debug of UEFI itself.

NOTE: This is functionally dependent on the DBG2 table being updated in
OpenPlatformPkg, but is required as a precursor to that change.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
Tested-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
7 years agoShellPkg:Ping: Ping command hangs with intermittent packet losses
Subramanian, Sriram (EG Servers Platform SW) [Thu, 7 Jul 2016 08:13:54 +0000 (01:13 -0700)]
ShellPkg:Ping: Ping command hangs with intermittent packet losses

When we have intermittent loss of packets, ping command doesnt
return to Shell prompt. It keeps looping in the while (Status
==EFI_NOT_READY) since Private->RxCount will never reach
Private->SendNum. Addresses the issue with the use of a new varibale
in the PRIVATE structure.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hegde, Nagaraj P <nagaraj-p.hegde@hpe.com>
Reviewed-by: Sriram Subramanian <sriram-s@hpe.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
7 years agoArmPkg/ArmMmuLib: add PEI specific version of ArmMmuLib
Ard Biesheuvel [Thu, 16 Jun 2016 10:21:50 +0000 (12:21 +0200)]
ArmPkg/ArmMmuLib: add PEI specific version of ArmMmuLib

This introduces a special version of ArmMmuLib for PEIMs that takes care
only to perform cache maintenance on the live entry replacement routine
if the module is not executing in place. Not only is such cache maintenance
unnecessary in that case, it may be actively harmful on some systems that
fail to tolerate cache maintenance operations on NOR flash regions.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
7 years agoArmPkg ArmVirtPkg MdeModulePkg: switch to separate ArmMmuLib
Ard Biesheuvel [Thu, 16 Jun 2016 09:51:10 +0000 (11:51 +0200)]
ArmPkg ArmVirtPkg MdeModulePkg: switch to separate ArmMmuLib

Switch all users of ArmLib that depend on the MMU routines to the new,
separate ArmMmuLib. This needs to occur in one go, since the MMU
routines are removed from ArmLib build at the same time, to prevent
conflicting symbols.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
7 years agoArmPkg: introduce base ArmMmuLib implementation
Ard Biesheuvel [Wed, 15 Jun 2016 16:49:09 +0000 (18:49 +0200)]
ArmPkg: introduce base ArmMmuLib implementation

This base library encapsulates the MMU manipulation routines that have been
factored out of ArmLib. The functionality covers initial creation of the 1:1
mapping in the page tables, and remapping regions to change permissions or
cacheability attributes.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
7 years agoArmPkg: introduce ArmMmuLib library class
Ard Biesheuvel [Wed, 15 Jun 2016 15:54:10 +0000 (17:54 +0200)]
ArmPkg: introduce ArmMmuLib library class

Introduce the library class ArmMmuLib, which encapsulates the functionality
to set up and modify page table entries.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
7 years agoIntelFrameworkModulePkg/LegacyUi: Get legacy options when open legacy form
Dandan Bi [Thu, 7 Jul 2016 02:58:14 +0000 (10:58 +0800)]
IntelFrameworkModulePkg/LegacyUi: Get legacy options when open legacy form

The LegacyBootMaintUiLib depends on the LegacyBootManagerLib to realize its
functionality, the LegacyBootManagerLib may initialize after
LegacyBootMaintUiLib, so the functionality of LegacyBootMaintUiLib may
be incorrect. Now we fix this issue by executing the related codes when
opening the legacy forminstead in its the constructor function. Because
when opening the legacy form, the LegacyBootManagerLib must have been
initialized.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
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>
7 years agoMdeModulePkg/BootMaintUiLib: Update menus when open BMM form
Dandan Bi [Thu, 30 Jun 2016 03:37:56 +0000 (11:37 +0800)]
MdeModulePkg/BootMaintUiLib: Update menus when open BMM form

BootMaintenanceManagerUiLib depend on the LeagcyBootMaintUiLib to show the
legacy menus. So we need to do the actions related to LegacyUi in BMM
after the LeagcyBootMaintUiLib have been initialized. So now : 1). update
menus (including legacy menus), 2) re-scan boot options (including legacy
boot option) when opening the BMM form. We think when opening BMM form,
the LeagcyBootMaintUiLib must have been initialized.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
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>
7 years agoMdeModulePkg/HiiDB: Record fail info if fail to save data for EfiVarStore
Dandan Bi [Mon, 20 Jun 2016 10:24:34 +0000 (18:24 +0800)]
MdeModulePkg/HiiDB: Record fail info if fail to save data for EfiVarStore

HiiConfigRoutingRouteConfig function returns 'Progress' to indicate
the failure info in the ConfigResp string. But when fail to route the
ConfigResp for EfiVarStore, it doesn't return the correct failure info.
Now this patch is to fix this issue and add debug info let user know the
reason of failure.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Chao Zhang <chao.b.zhang@intel.com>
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>
Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
7 years agoMdeModulePkg/Bds: MemoryTypeInformation excludes boot option mem use
Ruiyu Ni [Tue, 5 Jul 2016 09:46:07 +0000 (17:46 +0800)]
MdeModulePkg/Bds: MemoryTypeInformation excludes boot option mem use

The patch re-orders the sequences by putting updating memory type
information before loading the boot option so that the reserved
memory usage by HTTP RAM disk boot can be excluded by the memory
type information updating.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Sunny Wang <sunnywang@hpe.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
7 years agoMdeModulePkg: Fix IPv4 stack potential disappeared issue
Jiaxin Wu [Thu, 30 Jun 2016 07:53:01 +0000 (15:53 +0800)]
MdeModulePkg: Fix IPv4 stack potential disappeared issue

IP4_CONFIG2_INSTANCE->DataItem is used to save the configuration
data to NV variable. When the policy is changed from static to
DHCP, DnsServers info will be cleaned from DataItem first
(See Ip4Config2SetPolicy), it's correct because DnsServers info
should not be saved to NV variable.
But if there is any DnsServers info received from DHCP message, it
will be reset to DataItem again (See Ip4Config2SetDnsServerWorker),
which may cause the NV variable contain the DnsServers info while
the policy is DHCP (See Ip4Config2WriteConfigData).
Then, while the platform is reset, the issue happened. Because
Ip4Config2DataTypeDnsServer is set under DHCP policy, which is not
allowed by UEFI Spec and error returned.

This patch is used to resolve this potential issue.

Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Zhang Lubo <lubo.zhang@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Zhang Lubo <lubo.zhang@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
7 years agoFix GUID dereference
Thomas Palmer [Tue, 28 Jun 2016 18:21:32 +0000 (11:21 -0700)]
Fix GUID dereference

Print's "%g" argument requires a EFI_GUID pointer, not the EFI_GUID
value.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Thomas Palmer <thomas.palmer@hpe.com>
Reviewed-By: Jaben Carsey <jaben.carsey@intel.com>
7 years agoChange ShellPkg&ShellBinPkg maintainer
Ni, Ruiyu [Tue, 5 Jul 2016 07:35:48 +0000 (00:35 -0700)]
Change ShellPkg&ShellBinPkg maintainer

Since Shumin has left Intel to pursue a better job, I will temporary
be on his position to maintain ShellPkg and ShellBinPkg with Jaben.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-By: Jaben Carsey <jaben.carsey@intel.com>
7 years agoEmbeddedPkg/AcpiLib: add GICC table init macro for ACPI 6.0
Graeme Gregory [Tue, 5 Jul 2016 20:15:39 +0000 (21:15 +0100)]
EmbeddedPkg/AcpiLib: add GICC table init macro for ACPI 6.0

ACPI 6.0 added a processor efficiency field and 3 reserved bytes at the
end of the GICC structure so add a new macro to initialise the new
field.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
7 years agoMdeModulePkg/BootMaintUi: Add error handling codes when AllocatePool fail
Bi, Dandan [Tue, 5 Jul 2016 08:53:11 +0000 (16:53 +0800)]
MdeModulePkg/BootMaintUi: Add error handling codes when AllocatePool fail

The AllocateCopyPool in function ExtractFileNameFromDevicePath
may return NULL, so need to do error handling. This patch is to
add error handling codes for function ExtractFileNameFromDevicePath
and its caller functions.

Cc: Eric Dong <eric.dong@intel.com>
Cc: Hao Wu <hao.a.wu@intel.com>
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: Hao Wu <hao.a.wu@intel.com>
7 years agoMdeModulePkg/UefiHiiLib: Add error handling codes when AllocatePool fail
Bi, Dandan [Tue, 5 Jul 2016 03:19:22 +0000 (11:19 +0800)]
MdeModulePkg/UefiHiiLib: Add error handling codes when AllocatePool fail

Cc: Eric Dong <eric.dong@intel.com>
Cc: Hao Wu <hao.a.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
7 years agoMdeModulePkg UefiPxeBcDxe: Fix build error for lastest VS2015 compiler
Hao Wu [Tue, 5 Jul 2016 02:30:51 +0000 (10:30 +0800)]
MdeModulePkg UefiPxeBcDxe: Fix build error for lastest VS2015 compiler

The UefiPxeBcDxe module encounters a build error for IA32 arch using the
latest version of VS2015:

UefiPxe4BcDxe.lib(PxeBcDhcp.obj) : error LNK2001: unresolved external
symbol __allmul

The cause is line 1659 in file
MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDhcp.c. The third
parameter for gBS->SetTimer() function is of type UINT64, so the
multiplication should use the MultU64x32() function.

Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Wu Jiaxin <jiaxin.wu@intel.com>
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>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-By: Wu Jiaxin <jiaxin.wu@intel.com>
7 years agoMdeModulePkg: Skip registering BootManagerMenu if absent
Sunny Wang [Fri, 1 Jul 2016 02:38:24 +0000 (10:38 +0800)]
MdeModulePkg: Skip registering BootManagerMenu if absent

This is a enhancement to support the case when platform firmware
doesn't support Boot Manager Menu. For now, if BootManagerMenu FFS
can not be retrieved from FV, BDS core code will still register a
boot option for it. Then, this non-functional boot option will
still be booted by user's request (like HotKey or Exit from shell)
to cause additional boot time and error status code reported.
Therefore, it would be good to skip BootManagerMenu boot option
registration and then return error status and Invalid BootOption
data for this case so that the BootManagerBoot() or other consumers
can directly return without doing anything.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Sunny Wang <sunnywang@hpe.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
7 years agoBaseTools MemoryProfileSymbolGen.py: Handle 64bits rva from "nm -l xxx.dll"
Star Zeng [Mon, 4 Jul 2016 10:39:34 +0000 (18:39 +0800)]
BaseTools MemoryProfileSymbolGen.py: Handle 64bits rva from "nm -l xxx.dll"

Current MemoryProfileSymbolGen.py assumes the rva is 32bits,
the patch is to remove the restriction to match any lengths
of rva.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@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>
7 years agoMdeModulePkg MemoryProfileInfo: Handle "/" character in the PDB path
Star Zeng [Mon, 4 Jul 2016 10:27:29 +0000 (18:27 +0800)]
MdeModulePkg MemoryProfileInfo: Handle "/" character in the PDB path

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>
7 years agoShellPkg: Update the error prompt for ping6 command.
Zhang Lubo [Fri, 1 Jul 2016 06:12:31 +0000 (14:12 +0800)]
ShellPkg: Update the error prompt for ping6 command.

when we use the ping6 command without configuring the network
interface, it should give correct prompt to users.

Cc: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Wu Jiaxin <jiaxin.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <lubo.zhang@intel.com>
Reviewed-by: Sriram Subramanian <sriram-s@hpe.com>
Reviewed-by: Hegde, Nagaraj P <nagaraj-p.hegde@hpe.com>
Reviewed-By: Wu Jiaxin <jiaxin.wu@intel.com>
7 years agoBaseTools: Add support for $(FAMILY) macro
Yonghong Zhu [Mon, 4 Jul 2016 08:34:28 +0000 (16:34 +0800)]
BaseTools: Add support for $(FAMILY) macro

Build spec mentions $(FAMILY) macro be used in DSC/FDF to specify the tool
chain family, like GCC, MSFT. This patch add the support for this macro.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoMdeModulePkg DxeIplPeim: Add ASSERTs for unexpected AllocatePages failure
Hao Wu [Mon, 4 Jul 2016 04:56:51 +0000 (12:56 +0800)]
MdeModulePkg DxeIplPeim: Add ASSERTs for unexpected AllocatePages failure

Cc: Star Zeng <star.zeng@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
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>
7 years agoMdeModulePkg MemoryProfile: Add ASSERTs to make sure pointers are not NULL
Hao Wu [Mon, 4 Jul 2016 04:38:28 +0000 (12:38 +0800)]
MdeModulePkg MemoryProfile: Add ASSERTs to make sure pointers are not NULL

Code logic ensures that both pointers 'DriverInfoData' and 'AllocInfoData'
will not be NULL when they are used.

Add ASSERTs as warning for cases that will not happen.

Cc: Star Zeng <star.zeng@intel.com>
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>
7 years agoUefiCpuPkg S3Resume2Pei: Report status code when allocate memory is failed
Star Zeng [Thu, 30 Jun 2016 07:17:58 +0000 (15:17 +0800)]
UefiCpuPkg S3Resume2Pei: Report status code when allocate memory is failed

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jeff Fan <jeff.fan@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>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
7 years agoArmPkg/CpuDxe: unmask SErrors in DEBUG builds
Ard Biesheuvel [Fri, 1 Jul 2016 10:49:12 +0000 (12:49 +0200)]
ArmPkg/CpuDxe: unmask SErrors in DEBUG builds

SErrors (formerly called asynchronous aborts) are a distinct class of
exceptions that are not closely tied to the currently executing
instruction. Since execution may be able to proceed in such a condition,
this class of exception is masked by default, and software needs to unmask
it explicitly if it is prepared to handle such exceptions.

On DEBUG builds, we are well equipped to report the CPU context to the user
and it makes sense to report an SError as soon as it occurs rather than to
wait for the OS to take it when it unmasks them, especially since the current
arm64/Linux implementation simply panics in that case. So unmask them when
ArmCpuDxe loads.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
7 years agoArmPkg/DefaultExceptionHandlerLib: put ASSERT (FALSE) last
Ard Biesheuvel [Fri, 1 Jul 2016 10:29:37 +0000 (12:29 +0200)]
ArmPkg/DefaultExceptionHandlerLib: put ASSERT (FALSE) last

Putting DEBUG () code after an ASSERT (FALSE) statement is not very
useful, since the code will be unreachable on DEBUG builds and compiled
out on RELEASE builds. So move the ASSERT () statement after it.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
7 years agoMerge branch 'master' of https://github.com/tianocore/edk2
david wei [Fri, 1 Jul 2016 07:05:48 +0000 (15:05 +0800)]
Merge branch 'master' of https://github.com/tianocore/edk2

7 years agoVlv2TbltDevicePkg: fix ASSERT_EFI_ERROR() typos
Laszlo Ersek [Tue, 28 Jun 2016 13:25:38 +0000 (21:25 +0800)]
Vlv2TbltDevicePkg: fix ASSERT_EFI_ERROR() typos

A number of code locations use

  ASSERT_EFI_ERROR (BooleanExpression)

instead of

  ASSERT (BooleanExpression)

Fix them.

Cc: David Wei <david.wei@intel.com>
Cc: Tim He <tim.he@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: David Wei <david.wei@intel.com>
Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>
7 years agoMdeModulePkg/EmmcDxe: Don't expose BlockIo interface for RPMB partition
Feng Tian [Wed, 29 Jun 2016 03:15:50 +0000 (11:15 +0800)]
MdeModulePkg/EmmcDxe: Don't expose BlockIo interface for RPMB partition

This change is to avoid UEFI SCT failure as UEFI SCT has no knowledge
about how to accessing a EMMC RPMB partition.

The user needs to access RPMB partition should get access through
EFI_SD_MMC_PASS_THRU protocol with authentication key & mac.

Cc: Hao Wu <hao.a.wu@intel.com>
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>
7 years agoMdeModulePkg/SdMmc: update TPL to notify to fix UEFI SCT hang
Feng Tian [Wed, 22 Jun 2016 08:21:35 +0000 (16:21 +0800)]
MdeModulePkg/SdMmc: update TPL to notify to fix UEFI SCT hang

We have to upgrade the TPL level used by SdMmc stack because the
following flow:

DiskIo2ReadWriteDisk() in logical partition -> PartitionReadBlocksEx()
in logical partition at TPL callback level -> ProbeMediaStatusEx()
with sync request -> DiskIo2ReadWriteDisk() in physical partition ->
 waiting for async task completion.

if the low layer driver doesn't run at TPL_NOTIFY level, it will have
no time to trigger async task and cause system hang.

Cc: Hao Wu <hao.a.wu@intel.com>
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>
7 years agoSecurityPkg/Tcg: Fix bug that prevented SubmitCommand buffers from being Max size
Zhang, Chao B [Fri, 1 Jul 2016 02:32:27 +0000 (10:32 +0800)]
SecurityPkg/Tcg: Fix bug that prevented SubmitCommand buffers from being Max size

SubmitCommand() was checking the buffer size for ">=" Max size. This would
cause code to fail with "EFI_INVALID_PARAMETER" if a buffer was passed
that was the "max" size as indicated by the GetCapability() command.
Change to ">" to allow for maximum buffer size.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Bret Barkelew <brbarkel@microsoft.com>
Reviewed-by: Yao Jiewen <jiewen.yao@intel.com>
Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
7 years agoBaseTools Scripts: Add MemoryProfileSymbolGen.py
Star Zeng [Sun, 26 Jun 2016 05:07:26 +0000 (13:07 +0800)]
BaseTools Scripts: Add MemoryProfileSymbolGen.py

This tool depends on DIA2Dump.exe (VS) or nm (gcc) to parse debug entry.

Usage: MemoryProfileSymbolGen.py [--version] [-h] [--help] [-i inputfile
[-o outputfile]]

Copyright (c) 2016, Intel Corporation. All rights reserved.

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -i INPUTFILENAME, --inputfile=INPUTFILENAME
                        The input memory profile info file output from
                        MemoryProfileInfo application in MdeModulePkg
  -o OUTPUTFILENAME, --outputfile=OUTPUTFILENAME
                        The output memory profile info file with symbol,
                        MemoryProfileInfoSymbol.txt will be used if it is not

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@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>
7 years agoMdeModulePkg PiSmmCoreMemoryAllocLib: Extend to support MemoryProfileLib
Star Zeng [Thu, 23 Jun 2016 14:45:14 +0000 (22:45 +0800)]
MdeModulePkg PiSmmCoreMemoryAllocLib:  Extend to support MemoryProfileLib

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>
7 years agoMdeModulePkg DxeCoreMemoryAllocationLib: Extend to support MemoryProfileLib
Star Zeng [Thu, 23 Jun 2016 14:33:55 +0000 (22:33 +0800)]
MdeModulePkg DxeCoreMemoryAllocationLib: Extend to support MemoryProfileLib

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>
7 years agoMdeModulePkg: Implement new library instance SmmMemoryAllocationProfileLib
Star Zeng [Sat, 18 Jun 2016 01:05:22 +0000 (09:05 +0800)]
MdeModulePkg: Implement new library instance SmmMemoryAllocationProfileLib

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>
7 years agoMdeModulePkg: Implement new library instance UefiMemoryAllocationProfileLib
Star Zeng [Sat, 18 Jun 2016 01:31:28 +0000 (09:31 +0800)]
MdeModulePkg: Implement new library instance UefiMemoryAllocationProfileLib

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>
7 years agoMdeModulePkg: Introduce new library class MemoryProfileLib
Star Zeng [Sat, 18 Jun 2016 01:04:31 +0000 (09:04 +0800)]
MdeModulePkg: Introduce new library class MemoryProfileLib

Provides services to record memory profile of multilevel caller.

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>
7 years agoMdeModulePkg MemoryProfileInfo: Enhance output info for memory leak detection
Star Zeng [Sat, 18 Jun 2016 01:03:39 +0000 (09:03 +0800)]
MdeModulePkg MemoryProfileInfo: Enhance output info for memory leak detection

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>
7 years agoMdeModulePkg PiSmmCore: Enhance memory profile for memory leak detection
Star Zeng [Sat, 18 Jun 2016 02:14:40 +0000 (10:14 +0800)]
MdeModulePkg PiSmmCore: Enhance memory profile for memory leak detection

1. Produce SMM memory profile protocol.
2. Consume PcdMemoryProfilePropertyMask to support disable recording
at the start.
3. Consume PcdMemoryProfileDriverPath to control which drivers need
memory profile data.

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>
7 years agoMdeModulePkg DxeCore: Add lock to pretect memory profile AllocInfo list
Star Zeng [Wed, 29 Jun 2016 04:51:55 +0000 (12:51 +0800)]
MdeModulePkg DxeCore: Add lock to pretect memory profile AllocInfo list

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>
7 years agoMdeModulePkg DxeCore: Enhance memory profile for memory leak detection
Star Zeng [Sat, 18 Jun 2016 01:03:20 +0000 (09:03 +0800)]
MdeModulePkg DxeCore: Enhance memory profile for memory leak detection

1. Implement include GetRecordingState/SetRecordingState/Record for
memory profile protocol.
2. Consume PcdMemoryProfilePropertyMask to support disable recording
at the start.
3. Consume PcdMemoryProfileDriverPath to control which drivers need
memory profile data.

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>
7 years agoMdeModulePkg: Extend memory profile definitions for memory leak detection
Star Zeng [Tue, 31 May 2016 05:40:24 +0000 (13:40 +0800)]
MdeModulePkg: Extend memory profile definitions for memory leak detection

Current memory profile feature:
1. Shows which line of code calls gBS->AllocateXXX(). But most entries
are from MemoryAllocationLib.
2. Records at the start.
3. Records all modules.

Enhanced memory profile feature:
1. User can know which line of code calls AllocateXXX() API instead of
gBS->Allocate().
2. User can know which line of code calls a specific API that will call
AllocateXXX().
3. User can know total memory allocated by a specific line of code.
4. User can configure to record single module.
5. User can configure when to enable recording.
6. User can know RVA<->Symbol (Function, Source, Line).

For the enhanced memory profile feature,
1. Extend MEMORY_PROFILE_DRIVER_INFO to include PdbString.
2. Extend MEMORY_PROFILE_ALLOC_INFO to include ActionString.
3. Extend MEMORY_PROFILE_ACTION to indicate action in memory allocation
lib and user defined action.
4. Extend memory profile protocol to include GetRecordingState/
SetRecordingState/Record.
5. Define SMM memory profile protocol.
6. Extend PcdMemoryProfilePropertyMask to support disable recording at
the start.
7. Introduce new PCD PcdMemoryProfileDriverPath to control which drivers
need memory profile data.

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>
7 years agoMdeModulePkg/PiSmmCore: Replace BASE_4GB with MAX_ADDRESS check.
Jiewen Yao [Wed, 29 Jun 2016 02:19:57 +0000 (10:19 +0800)]
MdeModulePkg/PiSmmCore: Replace BASE_4GB with MAX_ADDRESS check.

PI specification Vol 4 - SMM does not have any limitation of BASE_4GB for SMM.
So we should replace BASE_4GB check with MAX_ADDRESS check to make sure
the SMM memory is accessible by SMM Core.

Cc: Jeff Fan <jeff.fan@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
7 years agoIntelFsp2WrapperPkg: Add error handling for possible NULL ptr dereference
Hao Wu [Thu, 30 Jun 2016 01:13:24 +0000 (09:13 +0800)]
IntelFsp2WrapperPkg: Add error handling for possible NULL ptr dereference

Possible NULL pointer dereference for FspmHeaderPtr/FspsHeaderPtr in
module FspmWrapperPeim/FspsWrapperPeim.

Add error handling codes to avoid this issue.

Cc: Jiewen Yao <jiewen.yao@intel.com>
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>
Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>
7 years agoShellPkg: UefiHandleParsingLib: remove tautological comparison
Laszlo Ersek [Thu, 30 Jun 2016 20:39:00 +0000 (22:39 +0200)]
ShellPkg: UefiHandleParsingLib: remove tautological comparison

The code being removed in this patch dates back to git commit a405b86d274d
(Sep 14, 2010; "udk2010.up2.shell initial release."). The condition always
evaluates to true, and it breaks DEBUG builds of ArmVirtPkg with gcc-6.1:

  ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c:
    In function 'ParseHandleDatabaseByRelationshipWithType':
  ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c:2465:76:
    error: self-comparison always evaluates to true
    [-Werror=tautological-compare]
         ASSERT((*HandleType)[HandleIndex] == (*HandleType)[HandleIndex]);

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Jaben Carsey <jaben.carsey@intel.com>
Cc: Michael Zimmermann <sigmaepsilon92@gmail.com>
Reported-by: Gerd Hoffmann <kraxel@redhat.com>
Reported-by: Michael Zimmermann <sigmaepsilon92@gmail.com>
Suggested-by: Jaben Carsey <jaben.carsey@intel.com>
Ref: http://thread.gmane.org/gmane.comp.bios.edk2.devel/13794/focus=13939
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
7 years agoVlv2TbltDevicePkg: fix ASSERT_EFI_ERROR() typos
Laszlo Ersek [Tue, 28 Jun 2016 11:47:52 +0000 (13:47 +0200)]
Vlv2TbltDevicePkg: fix ASSERT_EFI_ERROR() typos

A number of code locations use

  ASSERT_EFI_ERROR (BooleanExpression)

instead of

  ASSERT (BooleanExpression)

Fix them.

Cc: David Wei <david.wei@intel.com>
Cc: Tim He <tim.he@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>
Reviewed-by: David Wei <david.wei@intel.com>
7 years agoUefiCpuPkg: fix ASSERT_EFI_ERROR() typos
Laszlo Ersek [Tue, 28 Jun 2016 11:47:52 +0000 (13:47 +0200)]
UefiCpuPkg: fix ASSERT_EFI_ERROR() typos

A number of code locations use

  ASSERT_EFI_ERROR (BooleanExpression)

instead of

  ASSERT (BooleanExpression)

Fix them.

Cc: Jeff Fan <jeff.fan@intel.com>
Reported-by: Gerd Hoffmann <kraxel@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
7 years agoShellPkg: don't call functions with side effects in ASSERT_EFI_ERROR()
Laszlo Ersek [Tue, 28 Jun 2016 11:52:11 +0000 (13:52 +0200)]
ShellPkg: don't call functions with side effects in ASSERT_EFI_ERROR()

When ASSERT_EFI_ERROR() is compiled out, dependent on build flags, only
the status checking should be removed; the function calls should stay.

Cc: Jaben Carsey <jaben.carsey@intel.com>
Cc: Shumin Qiu <shumin.qiu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
7 years agoQuarkPlatformPkg: fix ASSERT_EFI_ERROR() typos
Laszlo Ersek [Tue, 28 Jun 2016 11:47:52 +0000 (13:47 +0200)]
QuarkPlatformPkg: fix ASSERT_EFI_ERROR() typos

A number of code locations use

  ASSERT_EFI_ERROR (BooleanExpression)

instead of

  ASSERT (BooleanExpression)

Fix them.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Kelly Steele <kelly.steele@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
7 years agoNetworkPkg: fix ASSERT_EFI_ERROR() typos
Laszlo Ersek [Tue, 28 Jun 2016 11:47:52 +0000 (13:47 +0200)]
NetworkPkg: fix ASSERT_EFI_ERROR() typos

A number of code locations use

  ASSERT_EFI_ERROR (BooleanExpression)

instead of

  ASSERT (BooleanExpression)

Fix them.

Cc: Siyuan Fu <siyuan.fu@intel.com>
Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>
7 years agoEdkCompatibilityPkg: fix ASSERT_EFI_ERROR() typos
Laszlo Ersek [Tue, 28 Jun 2016 11:47:52 +0000 (13:47 +0200)]
EdkCompatibilityPkg: fix ASSERT_EFI_ERROR() typos

A number of code locations use

  ASSERT_EFI_ERROR (BooleanExpression)

instead of

  ASSERT (BooleanExpression)

Fix them.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoMdeModulePkg VariableInfo: Fix GCC build failure
Star Zeng [Wed, 29 Jun 2016 14:22:57 +0000 (22:22 +0800)]
MdeModulePkg VariableInfo: Fix GCC build failure

GCC build failure: 'RealCommSize' may be used uninitialized

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: Giri P Mudusuru <giri.p.mudusuru@intel.com>
7 years agoIntelFrameworkModulePkg StatusCode RuntimeDxe: Remove duplicated structure.
Liming Gao [Thu, 30 Jun 2016 02:36:35 +0000 (10:36 +0800)]
IntelFrameworkModulePkg StatusCode RuntimeDxe: Remove duplicated structure.

RUNTIME_MEMORY_STATUSCODE_HEADER has been moved into MdeModulePkg public header
file Include/Guid/MemoryStatusCodeRecord.h. It should be removed from the driver.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
7 years agoVlv2TbltDevicePkg:Add PiSmmCommunication&PiSmmCpuDxeSmm of UefiCpuPkg.
Lu, ShifeiX A [Tue, 21 Jun 2016 07:42:01 +0000 (15:42 +0800)]
Vlv2TbltDevicePkg:Add PiSmmCommunication&PiSmmCpuDxeSmm of UefiCpuPkg.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: lushifex <shifeix.a.lu@intel.com>
Reviewed-by: David Wei <david.wei@intel.com>
Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>
7 years agoNetworkPkg: Stop the HTTP Boot service after the boot image download complete.
Fu Siyuan [Tue, 28 Jun 2016 03:30:04 +0000 (11:30 +0800)]
NetworkPkg: Stop the HTTP Boot service after the boot image download complete.

After boot image has been downloaded, the HTTP boot driver leaves the service
in the started state, with an active TCP child. This may cause some problems:
1. The HTTP session may become unavaiable after a while, then a following HTTP
Boot will fail.
2. An active TCP child will send RST to any incoming TCP message, which may
break other driver which tries to setup a TCP connection.
The HTTP boot driver doesn't provide any interface to the boot loader, so it's
unnecessary to keep the service running after a boot image is downloaded.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-By: Wu Jiaxin <jiaxin.wu@intel.com>
7 years agoMdePkg/IndustryStandard: fix build break due to latest Atapi.h change
Feng Tian [Wed, 29 Jun 2016 03:11:35 +0000 (11:11 +0800)]
MdePkg/IndustryStandard: fix build break due to latest Atapi.h change

Update the new introduced ATA_CMD_SEEK to ATA_CMD_ATAPI_SEEK.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Feng Tian <feng.tian@intel.com>
7 years agoMdeModulePkg VariableInfo: Use fixed buffer for smm comm buffer
Star Zeng [Tue, 28 Jun 2016 05:37:06 +0000 (13:37 +0800)]
MdeModulePkg VariableInfo: Use fixed buffer for smm comm buffer

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>
7 years agoMdeModulePkg DxeSmmPerformanceLib: Add missing UefiLib in *.inf at de2459d
Star Zeng [Tue, 28 Jun 2016 05:32:12 +0000 (13:32 +0800)]
MdeModulePkg DxeSmmPerformanceLib: Add missing UefiLib in *.inf at de2459d

Cc: Jiewen Yao <jiewen.yao@intel.com>
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: Jiewen Yao <jiewen.yao@intel.com>
7 years agoMdePkg/IndustryStandard: Add additional Atapi.h definitions.
Feng Tian [Wed, 29 Jun 2016 01:46:57 +0000 (09:46 +0800)]
MdePkg/IndustryStandard: Add additional Atapi.h definitions.

Add definitions complying Industry Standard specifications.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Anandakrishnan Loganathan <anandakrishnanl@ami.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
7 years agoMdeModulePkg/XhciDxe:Fix usb desc length check logic
Feng Tian [Wed, 15 Jun 2016 02:29:45 +0000 (10:29 +0800)]
MdeModulePkg/XhciDxe:Fix usb desc length check logic

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Evgeny Yakovlev <insoreiges@gmail.com>
7 years agoMdeModulePkg/UsbBusDxe: Fixed USB descriptor length check
Evgeny Yakovlev [Sun, 5 Jun 2016 14:28:31 +0000 (22:28 +0800)]
MdeModulePkg/UsbBusDxe: Fixed USB descriptor length check

According to spec if the length of a descriptor is smaller than
what the specification defines, then the host shall ignore it.
However if the size is greater than expected the host will ignore
the extra bytes and start looking for the next descriptor
at the end of actual length returned. Original check did not
handle the latter case correctly and only allowed descriptors
with lengths exactly as defined in specification.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Evgeny Yakovlev <insoreiges@gmail.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
7 years agoMdeModulePkg/MemoryStatusCode: Expose the DXE memory status code table.
Cinnamon Shia [Tue, 28 Jun 2016 09:40:35 +0000 (17:40 +0800)]
MdeModulePkg/MemoryStatusCode: Expose the DXE memory status code table.

Let data of DXE memory status code can be used by other modules.
1. Save the address of DXE memory status code table to DxeConfigurationTable.
2. Save the address of SMM memory status code table to SmmConfigurationTable.
3. Move RUNTIME_MEMORY_STATUSCODE_HEADER to its public header file.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Cinnamon Shia <cinnamon.shia@hpe.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoSecurityPkg: Update PlatformSecureLibNull with PCD to get physical presence.
Liming Gao [Thu, 23 Jun 2016 09:52:33 +0000 (17:52 +0800)]
SecurityPkg: Update PlatformSecureLibNull with PCD to get physical presence.

This is an incompatible change. It uses PcdUserPhysicalPresence value instead
of hard code TRUE. Because PcdUserPhysicalPresence default value is FALSE,
this patch changes UserPhysicalPresent() return value from TRUE to FALSE.

From Security point, it is not safe to always return TRUE. If user wants this
behavior, he can still configure PcdUserPhysicalPresence value to TRUE in
the platform DSC file.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>
7 years agoSecurityPkg: Add PcdUserPhysicalPresence to indicate use physical presence.
Liming Gao [Thu, 23 Jun 2016 09:50:27 +0000 (17:50 +0800)]
SecurityPkg: Add PcdUserPhysicalPresence to indicate use physical presence.

This PCD supports all configuration type. Its default value is FALSE.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>