mirror_edk2.git
5 years agoQuarkPlatformPkg: Add ForceRecovery UEFI application
Michael Kinney [Mon, 3 Oct 2016 18:16:19 +0000 (11:16 -0700)]
QuarkPlatformPkg: Add ForceRecovery UEFI application

https://bugzilla.tianocore.org/show_bug.cgi?id=138

Add the ForceRecovery UEFI application to the Quark.dsc file
so this application can be put onto an SD card or USB drive
to test the Galileo firmware recovery feature.

The library mappings to the RecoveryOemHookLib are also
removed becuse this library is not longer used by any modules.

Cc: Kelly Steele <kelly.steele@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>
5 years agoQuarkPlatformPkg/PlatformHelperLib: Remove PlatformDebugPortGetChar8()
Michael Kinney [Mon, 3 Oct 2016 18:15:02 +0000 (11:15 -0700)]
QuarkPlatformPkg/PlatformHelperLib: Remove PlatformDebugPortGetChar8()

Remove the library function PlatformDebugPortGetChar8() from the
PlatformHelperLib that is no longer used by any modules.

Cc: Kelly Steele <kelly.steele@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>
5 years agoQuarkPlatformPkg/PlatformInit: Fix recovery detection issues
Michael Kinney [Mon, 3 Oct 2016 18:13:42 +0000 (11:13 -0700)]
QuarkPlatformPkg/PlatformInit: Fix recovery detection issues

https://bugzilla.tianocore.org/show_bug.cgi?id=137
https://bugzilla.tianocore.org/show_bug.cgi?id=139

There are four supported methods to generate a boot mode of
BOOT_IN_RECOVERY_MODE on the Galileo platforms:

* Detect a corrupt FV
* Detect a forced recovery from the ForceRecovery UEFI application
  that sets a bit in a sticky R/W register
* The RESET button for the Arduino shield is held while the system
  is powered up
* The RESET button for the Arduino shield is held while the system
  is rebooted using the REBOOT button.

The logic in the PlatformInit module is cleaned up and updated to
support all three of the recovery detection methods.  The clean
ups include:

* Remove extra debug messages
* Remove user input from serial port

In addition, once one of the recovery methods is detected and a
boot mode of BOOT_IN_RECOVERY_MODE is set, the Galileo platforms
would get an error attempting to use the USB host controller to
detect and read a recovery image from a USB drive.  The issue is
the IMR protection registers are programmed to prevent DMA to
memory owned by the PEI Core. The IMR register programming is
updated to allow DMA to memory that is allocated by the recovery
modules using the PEI AllocatePages() service.

Cc: Kelly Steele <kelly.steele@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>
5 years agoQuarkPlatformPkg/ForceRecovery: Add UEFI application to force recovery
Michael Kinney [Mon, 3 Oct 2016 18:09:58 +0000 (11:09 -0700)]
QuarkPlatformPkg/ForceRecovery: Add UEFI application to force recovery

https://bugzilla.tianocore.org/show_bug.cgi?id=138

This UEFI Application sets a sticky bit that persists across reset
to force a boot mode of BOOT_IN_RECOVERY_MODE.  It then performs
a warm reset using the UEFI Runtime Service ResetSystem().

Cc: Kelly Steele <kelly.steele@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>
5 years agoQuarkSocPkg/QncSmmDispatcher: Fix use after free issue
Michael Kinney [Tue, 4 Oct 2016 17:55:24 +0000 (10:55 -0700)]
QuarkSocPkg/QncSmmDispatcher: Fix use after free issue

Update Quark North Cluster SMM dispatcher logic to handle
case where an SMI handler unregisters itself.

https://bugzilla.tianocore.org/show_bug.cgi?id=51

This issue was reproduced using the unit test at:

https://github.com/mdkinney/edk2/tree/Bug51/Reproduce

An ASSERT() is generated the 4th time the periodic SMI
handler is triggered when the periodic SMI handler
unregisters itself.  After applying this patch, the
DEBUG() message from the periodic SMI handler in this
unit test is generated 4 times, the periodic SMI handler
is unregistered, and the UEFI Shell works as expected.

Cc: Kelly Steele <kelly.steele@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>
5 years agoQuarkSocPkg/QncSmmDispatcher: Fix context passed to SMI handlers
Michael Kinney [Wed, 5 Oct 2016 03:03:24 +0000 (20:03 -0700)]
QuarkSocPkg/QncSmmDispatcher: Fix context passed to SMI handlers

https://bugzilla.tianocore.org/show_bug.cgi?id=136

1) Add CallbackContext field to the DATABASE_RECORD structure that
   is set to the RegisterContent value passed to QNCSmmCoreRegister().
   This is the content that must be passed to the SMI handler when
   its source is triggered.

2) Update usage of ChildContext field in the DATABASE_RECOD to use
   CopyMem() instead of structure assignments to avoid compiler
   use of memcpy() intrinsics

This issue was reproduced using the unit test at:

https://github.com/mdkinney/edk2/tree/Bug51/Reproduce

An ASSERT() is generated the first time the periodic SMI
handler is triggered.  After applying this patch, the
DEBUG() messages from the periodic SMI handler in this
unit test are generated.

Cc: Kelly Steele <kelly.steele@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>
5 years agoShellPkg: Fix erroneous Status returned by ShellOpenFileByName()
Vladimir Olovyannikov [Thu, 6 Oct 2016 22:02:26 +0000 (15:02 -0700)]
ShellPkg: Fix erroneous Status returned by ShellOpenFileByName()

In ShellOpenFileByName() the file is opened using
gEfiShellProtocol->OpenFileByName().
It is supposed that if this call returns an EFI_ERROR, the function
should return that error immediately. However, this return was missing,
and if UnicodeCollationProtocol has not been located by this time, the
Status gets overwritten with LocateProtocol() call result, which
eventually erroneously returns EFI_SUCCESS to the Shell.c, and this
leads to attempt to execute a non-existent startup script, which fails,
and which in turn leads to Shell being unloaded with "Invalid parameter"
error. This patch fixes the bug.

Cc: Tapan Shah <tapandshah@hpe.com>
Cc: Jaben Carsey <jaben.carsey@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Vladimir Olovyannikov <vladimir.olovyannikov@broadcom.com>
Reviewed-by: Tapan Shah <tapandshah@hpe.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
5 years agoIntelSiliconPkg: Updated IgdOpregion.h based on latest spec
Giri P Mudusuru [Fri, 30 Sep 2016 17:35:18 +0000 (10:35 -0700)]
IntelSiliconPkg: Updated IgdOpregion.h based on latest spec

Updated IgdOpregion.h to align with latest specification
https://01.org/sites/default/files/documentation/skl_opregion_rev0p5.pdf

1) Updated Mailbox structures to align with latest spec
2) Added Mailbox 5 structure
3) Added defines for Signature and Mailbox support

Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Maurice Ma <maurice.ma@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>
5 years agoIntelFsp2Pkg/Tools: Add PE32 section rebasing support
Maurice Ma [Wed, 5 Oct 2016 00:02:24 +0000 (17:02 -0700)]
IntelFsp2Pkg/Tools: Add PE32 section rebasing support

The current SplitFspBin.py can only support TE image format
rebasing in an FSP binary. This patch adds PE32 image format
rebasing support.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Giri P Mudusuru <giri.p.mudusuru@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
Reviewed-by: Satya Yarlagadda <Satya.p.yarlagadda@intel.com>
5 years agoShellPkg: Move UnicodeCollation2 Protcol locate out of UefiShellLib constructor
Tapan Shah [Wed, 5 Oct 2016 20:58:05 +0000 (13:58 -0700)]
ShellPkg: Move UnicodeCollation2 Protcol locate out of UefiShellLib constructor

Move gEfiUnicodeCollation2ProtocolGuid protocol outside of UefiShellLib constructor
function.
Locate gEfiUnicodeCollation2ProtocolGuid protocol in ShellOpenFileByName() which
consumes this protocol API.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Tapan Shah <tapandshah@hpe.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
5 years agoShellPkg/Hexedit: Fix FreePool() ASSERT() when writing disk
Michael Kinney [Thu, 29 Sep 2016 00:33:43 +0000 (17:33 -0700)]
ShellPkg/Hexedit: Fix FreePool() ASSERT() when writing disk

The HDiskImageSave() function copies a device path using
DuplicateDevicePath() and passes that device path to
gBS->LocateDevicePath() that changes the value of the
device path pointer.  When FreePool() is called with the
modified device path pointer, the FreePool() service
generates an ASSERT() because the signature for the pool
head can not be found.

The function HDiskImageRead() immediately above
HDiskImageSave() has the correct algorithm that uses an
additional local variable called DupDevicePathForFree to
preserve the pointer to the allocated buffer so it can
be used in the call to FreePool().

Bug: <https://bugzilla.tianocore.org/show_bug.cgi?id=131>

Cc: Jaben Carsey <jaben.carsey@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Jaben Carsey <Jaben.carsey@intel.com>
5 years agoShellPkg/Shell: Update CRC32 in the EFI System Table header
Cinnamon Shia [Mon, 3 Oct 2016 16:37:17 +0000 (09:37 -0700)]
ShellPkg/Shell: Update CRC32 in the EFI System Table header

Update CRC32 in the EFI System Table header after shell changes the
value of gST->ConsoleOutHandle and gST->ConOut

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Cinnamon Shia <cinnamon.shia@hpe.com>
Reviewed-By: Tapan Shah <tapandshah@hpe.com>
Reviewed-By: Jaben Carsey <Jaben.carsey@intel.com>
5 years agoBaseTools Build: Fix build break for clean target in Linux
Hao Wu [Thu, 29 Sep 2016 14:47:38 +0000 (22:47 +0800)]
BaseTools Build: Fix build break for clean target in Linux

In Linux, Command needs to be String instead of list when Command run
as shell with True.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
5 years agoBaseTools VS Makefile: Don't include ms.common in ms.app
Liming Gao [Thu, 29 Sep 2016 14:00:42 +0000 (22:00 +0800)]
BaseTools VS Makefile: Don't include ms.common in ms.app

ms.common is included by every tool Makefile. it is not necessary to be placed
in ms.app again.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
5 years agoBaseTools Makefile: Missing LFAGS in app.makefile
Liming Gao [Thu, 29 Sep 2016 14:00:22 +0000 (22:00 +0800)]
BaseTools Makefile: Missing LFAGS in app.makefile

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
5 years agoCryptoPkg/OpensslLib: Upgrade OpenSSL version to 1.0.2j
Qin Long [Tue, 27 Sep 2016 08:54:04 +0000 (16:54 +0800)]
CryptoPkg/OpensslLib: Upgrade OpenSSL version to 1.0.2j

Two official releases (OpenSSL 1.0.2i and 1.0.2j) were available
with several severity fixes at 22-Sep-2016 and 26-Sep-2016.
Refer to
https://www.openssl.org/news/secadv/20160922.txt and
https://www.openssl.org/news/secadv/20160926.txt.
This patch is to upgrade the supported OpenSSL version in
CryptoPkg/OpensslLib to catch the latest release 1.0.2j.

Cc: Ting Ye <ting.ye@intel.com>
Cc: David Woodhouse <David.Woodhouse@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qin Long <qin.long@intel.com>
Reviewed-by: Ting Ye <ting.ye@intel.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
5 years agoMdeModulePkg/ImageDecoderLib: Retire it due to new BootLogoLib
Ruiyu Ni [Thu, 29 Sep 2016 02:37:44 +0000 (10:37 +0800)]
MdeModulePkg/ImageDecoderLib: Retire it due to new BootLogoLib

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
5 years agoMdeModulePkg/BmpImageDecoderLib: Retire it due to new BootLogoLib
Ruiyu Ni [Thu, 29 Sep 2016 02:38:35 +0000 (10:38 +0800)]
MdeModulePkg/BmpImageDecoderLib: Retire it due to new BootLogoLib

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
5 years agoMdeModulePkg: Remove ImageDecoderLib and BmpImageDecoderLib
Ruiyu Ni [Thu, 29 Sep 2016 02:40:28 +0000 (10:40 +0800)]
MdeModulePkg: Remove ImageDecoderLib and BmpImageDecoderLib

The two libraries are created to support old BootLogoLib to
decode the images. Due to the new BootLogoLib starts using
HiiImageEx interfaces, the two libraries are not needed.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
5 years agoSecurityPkg: Tcg2: Fix TCG2 PP issues
Zhang, Chao B [Tue, 27 Sep 2016 01:46:40 +0000 (09:46 +0800)]
SecurityPkg: Tcg2: Fix TCG2 PP issues

Several issues exist in TCG2 PP
1. TCG2 PP use NVS PPRQ/PPRM as PP parameter as well as current
PP state cache. But it doesn't handle PP set failure case
2. TCG2 PP Submit TPM Operation Request to Pre-OS Environment forgets
to clean PPRM
3. Potential alignment issue

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>
5 years agoOvmfPkg: Use the new LogoDxe driver
Ruiyu Ni [Mon, 26 Sep 2016 06:45:06 +0000 (14:45 +0800)]
OvmfPkg: Use the new LogoDxe driver

Contributed-under: TianoCore Contribution Agreement 1.0
Cc: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
5 years agoArmVirtPkg: Use the new LogoDxe driver
Ruiyu Ni [Mon, 26 Sep 2016 06:49:40 +0000 (14:49 +0800)]
ArmVirtPkg: Use the new LogoDxe driver

Contributed-under: TianoCore Contribution Agreement 1.0
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
5 years agoNt32Pkg: Use the new LogoDxe driver
Ruiyu Ni [Fri, 23 Sep 2016 08:07:58 +0000 (16:07 +0800)]
Nt32Pkg: Use the new LogoDxe driver

Contributed-under: TianoCore Contribution Agreement 1.0
Reviewed-by: Liming Gao <liming.gao@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
5 years agoMdeModulePkg/Logo: Add LogoDxe module
Ruiyu Ni [Fri, 23 Sep 2016 08:03:47 +0000 (16:03 +0800)]
MdeModulePkg/Logo: Add LogoDxe module

LogoDxe embeds the image resource in the PE resource section, then
it produces Platform Logo protocol which can return the images
in pixel format.
HiiImageEx protocol is responsible to decode the JPEG/PNG images
to pixel format. LogoDxe driver uses HiiImageEx protocol.

Contributed-under: TianoCore Contribution Agreement 1.0
Reviewed-by: Liming Gao <liming.gao@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
5 years agoMdeModulePkg/BootLogoLib&PlatformLogo: Use HII data types in parameters
Ruiyu Ni [Fri, 23 Sep 2016 07:54:01 +0000 (15:54 +0800)]
MdeModulePkg/BootLogoLib&PlatformLogo: Use HII data types in parameters

1. Change PlatformLogo protocol to return EFI_IMAGE_INPUT instead of
   RAW image data. PlatformLogo implementation can use HiiImageEx to
   decode the image if it's JPEG or PNG format.
2. Change BootLogoLib to consume the new PlatformLogo protocol.
3. Change BootLogoEnableLogo() to only use images returned from
   PlatformLogo protocol.

Contributed-under: TianoCore Contribution Agreement 1.0
Reviewed-by: Liming Gao <liming.gao@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
5 years agoOvmfPkg/PlatformBds: Do not call BootLogoEnableLogo
Ruiyu Ni [Mon, 26 Sep 2016 06:40:32 +0000 (14:40 +0800)]
OvmfPkg/PlatformBds: Do not call BootLogoEnableLogo

Prototype of BootLogoEnableLogo will change in following patches, so
do not call BootLogoEnableLogo to avoid build failure.

Contributed-under: TianoCore Contribution Agreement 1.0
Cc: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
5 years agoArmVirtPkg/PlatformBds: Do not call BootLogoEnableLogo
Ruiyu Ni [Mon, 26 Sep 2016 06:39:04 +0000 (14:39 +0800)]
ArmVirtPkg/PlatformBds: Do not call BootLogoEnableLogo

Prototype of BootLogoEnableLogo will change in following patches, so
do not call BootLogoEnableLogo to avoid build failure.

Contributed-under: TianoCore Contribution Agreement 1.0
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
5 years agoNt32Pkg/PlatformBds: Do not call BootLogoEnableLogo
Ruiyu Ni [Fri, 23 Sep 2016 07:21:47 +0000 (15:21 +0800)]
Nt32Pkg/PlatformBds: Do not call BootLogoEnableLogo

Prototype of BootLogoEnableLogo will change in following patches, so
do not call BootLogoEnableLogo to avoid build failure.

Contributed-under: TianoCore Contribution Agreement 1.0
Reviewed-by: Liming Gao <liming.gao@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
5 years agoMdeModulePkg/HiiDatabase: Add HiiImageEx implementation.
Ruiyu Ni [Wed, 21 Sep 2016 09:48:13 +0000 (17:48 +0800)]
MdeModulePkg/HiiDatabase: Add HiiImageEx implementation.

According to UEFI spec, NewImageEx()/SetImageEx()/DrawImageEx()
implicitly call the non-Ex version interface
of HiiImage protocol.
GetImageEx()/DrawImageIdEx() are the enhanced version of
GetImage()/DrawImageId(), which can support decoding JPEG/PNG
through the help of HiiImageDecoder protocol.

Contributed-under: TianoCore Contribution Agreement 1.0
Reviewed-by: Liming Gao <liming.gao@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
5 years agoMdeModulePkg/HiiDatabase: Update HiiImage to support PNG/JPEG
Ruiyu Ni [Wed, 21 Sep 2016 04:55:00 +0000 (12:55 +0800)]
MdeModulePkg/HiiDatabase: Update HiiImage to support PNG/JPEG

1. Update GetImageIdOrAddress() to recognize PNG/JPEG image block.
   A offset calculation bug was fixed.
2. Update HiiGetImage() comments to say PNG/JPEG support is provided
   by HiiImageEx
3. Update HiiSetImage() to support replacing a PNG/JPEG image block
   with a new image

Contributed-under: TianoCore Contribution Agreement 1.0
Reviewed-by: Liming Gao <liming.gao@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
5 years agoMdePkg/HiiImage.h: Include GraphicsOutput.h
Ruiyu Ni [Mon, 26 Sep 2016 07:39:54 +0000 (15:39 +0800)]
MdePkg/HiiImage.h: Include GraphicsOutput.h

HiiImage.h uses EFI_GRAPHICS_OUTPUT_BLT_PIXEL which is defined in
GraphicsOutput.h. Include GraphicsOutput.h to avoid build failure
from consumer of HiiImage protocol.

Contributed-under: TianoCore Contribution Agreement 1.0
Reviewed-by: Liming Gao <liming.gao@intel.com>
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
5 years agoMdemodulePkg/HiiDatabase: Correct typo in comments.
Ruiyu Ni [Wed, 21 Sep 2016 04:48:10 +0000 (12:48 +0800)]
MdemodulePkg/HiiDatabase: Correct typo in comments.

Contributed-under: TianoCore Contribution Agreement 1.0
Reviewed-by: Liming Gao <liming.gao@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
5 years agoMdeModulePkg/HiiDatabase: Refine HiiDrawImage()
Ruiyu Ni [Wed, 21 Sep 2016 03:31:49 +0000 (11:31 +0800)]
MdeModulePkg/HiiDatabase: Refine HiiDrawImage()

Contributed-under: TianoCore Contribution Agreement 1.0
Reviewed-by: Liming Gao <liming.gao@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
5 years agoMdeModulePkg/HiiDatabase: Refine HiiSetImage()
Ruiyu Ni [Wed, 21 Sep 2016 03:29:08 +0000 (11:29 +0800)]
MdeModulePkg/HiiDatabase: Refine HiiSetImage()

Contributed-under: TianoCore Contribution Agreement 1.0
Reviewed-by: Liming Gao <liming.gao@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
5 years agoMdeModulePkg/HiiDatabase: Refine HiiGetImage()
Ruiyu Ni [Wed, 21 Sep 2016 03:27:05 +0000 (11:27 +0800)]
MdeModulePkg/HiiDatabase: Refine HiiGetImage()

Contributed-under: TianoCore Contribution Agreement 1.0
Reviewed-by: Liming Gao <liming.gao@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
5 years agoMdeModulePkg/HiiDatabase: Refine HiiNewImage()
Ruiyu Ni [Wed, 21 Sep 2016 03:18:15 +0000 (11:18 +0800)]
MdeModulePkg/HiiDatabase: Refine HiiNewImage()

Contributed-under: TianoCore Contribution Agreement 1.0
Reviewed-by: Liming Gao <liming.gao@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
5 years agoMdeModulePkg/HiiDatabase: Move common code to LocatePackageList()
Ruiyu Ni [Wed, 21 Sep 2016 03:14:01 +0000 (11:14 +0800)]
MdeModulePkg/HiiDatabase: Move common code to LocatePackageList()

Contributed-under: TianoCore Contribution Agreement 1.0
Reviewed-by: Liming Gao <liming.gao@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
5 years agoMdeModulePkg/HiiDatabase: Refine GetImageIdOrAddress
Ruiyu Ni [Wed, 21 Sep 2016 03:10:38 +0000 (11:10 +0800)]
MdeModulePkg/HiiDatabase: Refine GetImageIdOrAddress

Contributed-under: TianoCore Contribution Agreement 1.0
Reviewed-by: Liming Gao <liming.gao@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
5 years agoMdePkg/HiiImageDecoder.h: Add missing EFI_HII_IMAGE_DECODER_OTHER_INFO
Ruiyu Ni [Tue, 27 Sep 2016 02:09:05 +0000 (10:09 +0800)]
MdePkg/HiiImageDecoder.h: Add missing EFI_HII_IMAGE_DECODER_OTHER_INFO

Besides adding the missing structure
EFI_HII_IMAGE_DECODER_OTHER_INFO, the patch also correct some typo.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
5 years agoMdePkg/HiiImageDecoder.h: Rename from ImageDecoder.h
Ruiyu Ni [Tue, 27 Sep 2016 01:56:34 +0000 (09:56 +0800)]
MdePkg/HiiImageDecoder.h: Rename from ImageDecoder.h

Rename the protocol header file to follow EDKII file
name rule before the HiiImageDecoder protocol is used
by anyone.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
5 years agoMdeModulePkg/PciSioSerialDxe: Remove unused global variables
Ruiyu Ni [Tue, 27 Sep 2016 07:41:39 +0000 (15:41 +0800)]
MdeModulePkg/PciSioSerialDxe: Remove unused global variables

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
5 years agoMdePkg/BaseMemoryLibOptDxe: replace deprecated uses of IT blocks
Ard Biesheuvel [Mon, 26 Sep 2016 22:55:05 +0000 (15:55 -0700)]
MdePkg/BaseMemoryLibOptDxe: replace deprecated uses of IT blocks

The ARM architecture version 8 deprecates all uses of the IT instruction
except cases where it is followed by a single narrow instruction. So
replace any occurrences with equivalent sequences that adhere to the
new rules.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
5 years agoMdePkg/BaseMemoryLibOptDxe ARM: fix Thumb-2 bug in ScanMem()
Ard Biesheuvel [Mon, 26 Sep 2016 22:51:45 +0000 (15:51 -0700)]
MdePkg/BaseMemoryLibOptDxe ARM: fix Thumb-2 bug in ScanMem()

The ARM ScanMem() in BaseMemoryLibOptDxe contains code from the open
source cortex-strings library, and inherited a bug from it where the
conditional execution of a sequence of instructions is erroneously
made dependent on the same condition. Since the final 'addeq' is
supposed to be dependent on the preceding 'tsteq' instruction, they
cannot be part of the same IT block.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
5 years agoBaseTools: List missing source python files for Ecc tool in Makefile
Hao Wu [Tue, 27 Sep 2016 02:07:18 +0000 (10:07 +0800)]
BaseTools: List missing source python files for Ecc tool in Makefile

Add missing python sources files that are dependent for Ecc tool in
Makefile.

Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Liming Gao <liming.gao@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: Yonghong Zhu <yonghong.zhu@intel.com>
5 years agoBaseTools: Add some posixlike files for Linux
Yonghong Zhu [Sun, 25 Sep 2016 02:47:08 +0000 (10:47 +0800)]
BaseTools: Add some posixlike files for Linux

Add the posixlike files for Rsa2048Sha256Sign, Rsa2048Sha256GenerateKeys
and Pkcs7Sign.

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>
5 years agoMdePkg: Add SMM PciExpressLib Instance
Gao, Liming [Tue, 20 Sep 2016 14:02:28 +0000 (22:02 +0800)]
MdePkg: Add SMM PciExpressLib Instance

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Felix Polyudov <felixp@ami.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
5 years agoBaseTools: support generating image package from BMP/JPEG/PNG files
Yonghong Zhu [Wed, 21 Sep 2016 02:39:11 +0000 (10:39 +0800)]
BaseTools: support generating image package from BMP/JPEG/PNG files

BaseTools add support to generating image package from BMP/JPEG/PNG
files.
1) New file type *.idf Image definition file to describe HII image
resource. It is the ASCII text file, and includes one or more "#image
IMAGE_ID [TRANSPARENT] ImageFileName".
2) New IMAGE_TOKEN macro is used to refer to IMAGE_ID.
3) New AutoGen header file $(MODULE_NAME)ImgDefs.h to include the
generated ImageId definition.
4) New $(MODULE_NAME)Idf.hpk or $(MODULE_NAME)Images are generated
as the output binary HII image package.

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>
5 years agoMdePkg UefiHii: Add IMAGE_TOKEN macro to access image resource in C and VFR
Liming Gao [Wed, 21 Sep 2016 02:39:09 +0000 (10:39 +0800)]
MdePkg UefiHii: Add IMAGE_TOKEN macro to access image resource in C and VFR

Cc: Eric Dong <eric.dong@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Dandan Bi <dandan.bi@intel.com>
5 years agoMdeModulePkg FormBrowserEx: Change its structure name with EDKII_ prefix
Liming Gao [Thu, 22 Sep 2016 02:03:42 +0000 (10:03 +0800)]
MdeModulePkg FormBrowserEx: Change its structure name with EDKII_ prefix

EDKII implementation protocol should be with EDKII_ prefix.

V2: add gEdkiiFormBrowserExProtocolGuid to align its structure name.

Cc: Eric Dong <eric.dong@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
5 years agoSecurityPkg: Tcg: New field for User Confirmation Status
Zhang, Chao B [Mon, 26 Sep 2016 02:31:15 +0000 (10:31 +0800)]
SecurityPkg: Tcg: New field for User Confirmation Status

Add a new field in TcgNVS for PP operation user confirmation status,
instead of previous logic overriding Request. Previous logic causes
Get Pending TPM Operation Requested sub function return wrong 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: Long Qin <qin.long@intel.com>
5 years agoArmPkg/CpuDxe: Fix MMU initialization problem
Kurt Kennett [Mon, 26 Sep 2016 22:45:02 +0000 (22:45 +0000)]
ArmPkg/CpuDxe: Fix MMU initialization problem

During Mmu initialization in the CpuDxe, for a page table any bits set
in the 'NextSectionAttributes' are garbage and were set from bits that
are actually part of the pagetable address.  We clear it out to zero
so that the SyncCacheConfigPage will use the page attributes instead
of trying to convert the (bogus) section attributes into page
attributes.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Kurt Kennett <kurt.kennett@microsoft.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
5 years agoShellPkg: Enhance 'cls' command to change the background and foreground colors
Tapan Shah [Fri, 23 Sep 2016 16:03:16 +0000 (09:03 -0700)]
ShellPkg: Enhance 'cls' command to change the background and foreground colors

As per ECR 1416 change in UEFI Shell Specification 2.2,
enhancing 'cls' command to change the background color as well as
foreground color. Also add support to display current settings
using 'cls -sfo' command.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Tapan Shah <tapandshah@hpe.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
5 years agoNetworkPkg: Clean the previous address since the policy changed
Jiaxin Wu [Wed, 21 Sep 2016 07:13:37 +0000 (15:13 +0800)]
NetworkPkg: Clean the previous address since the policy changed

The previous DNS server data will be retained after the policy
changes from Auto to Manual. This patch is used to clean the
previous dhcp configuration data.

Cc: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>
Cc: Subramanian Sriram <sriram-s@hpe.com>
Cc: Ye Ting <ting.ye@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Sriram Subramanian <sriram-s@hpe.com>
Reviewed-by: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>
Tested-by: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>
5 years agoMdeModulePkg: Clean the previous address since the policy changed
Jiaxin Wu [Wed, 21 Sep 2016 07:12:21 +0000 (15:12 +0800)]
MdeModulePkg: Clean the previous address since the policy changed

The previous DNS server data will be retained after the policy
changes from Dhcp to Static. This patch is used to clean the
previous dhcp configuration data.

Cc: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>
Cc: Subramanian Sriram <sriram-s@hpe.com>
Cc: Ye Ting <ting.ye@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Sriram Subramanian <sriram-s@hpe.com>
Reviewed-by: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>
Tested-by: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>
5 years agoMdeModulePkg/PciBusDxe: make OPROM BAR degradation configurable
Ard Biesheuvel [Mon, 19 Sep 2016 08:36:13 +0000 (09:36 +0100)]
MdeModulePkg/PciBusDxe: make OPROM BAR degradation configurable

The 'universal' PCI bus driver in MdeModulePkg contains a quirk to
degrade 64-bit PCI MMIO BARs to 32-bit in the presence of an option
ROM on the same PCI controller.

This quirk is highly specific to not just the X64 architecture in general,
but to the PC platform in particular, given that only X64 platforms that
require legacy PC BIOS compatibility require it. However, making the
quirk dependent on the presence of the legacy BIOS protocol met with
resistance, due to the fact that it introduces a dependency on the
IntelFrameworkModulePkg package.

So instead, make the quirk configurable, by introducing a feature flag PCD
'PcdPciDegradeResourceForOptionRom' which defaults to TRUE only for X64.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
5 years agoBaseTools: handling the case that map file is not exist
Yonghong Zhu [Thu, 22 Sep 2016 01:48:46 +0000 (09:48 +0800)]
BaseTools: handling the case that map file is not exist

We meet a case that add the library inf file which has the uni file in
the [Sources] section, for this case there will no map file exist, it
cause build tools report Traceback  error.

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>
5 years agoShellPkg: Update help output for disconnect command
Tapan Shah [Fri, 23 Sep 2016 16:10:28 +0000 (09:10 -0700)]
ShellPkg: Update help output for disconnect command

Minor changes to match help output notes for disconnect command
with UEFI Shell 2.2 specification document.

Few other formatting changes to fit the help output in 80x25 screen size.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Tapan Shah <tapandshah@hpe.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
5 years agoMdePkg/BaseMemoryLibOptDxe ARM AARCH64: fix thinko in SetMem##
Ard Biesheuvel [Thu, 22 Sep 2016 08:52:00 +0000 (09:52 +0100)]
MdePkg/BaseMemoryLibOptDxe ARM AARCH64: fix thinko in SetMem##

The new InternalMemSetMem##() implementations for ARM and AARCH64 in
BaseMemoryLibOptDxe fail to take into account that the 'length' argument
is not in bytes, but in number of items to be copied. So multiply by the
item size before proceeding.

Reported-by: Laszlo Ersek <lersek@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
5 years agoSecurityPkg Tcg2Pei: Fix GCC build failure caused by 5919a9600e07
Star Zeng [Fri, 23 Sep 2016 02:04:05 +0000 (10:04 +0800)]
SecurityPkg Tcg2Pei: Fix GCC build failure caused by 5919a9600e07

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Chao B Zhang <chao.b.zhang@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>
5 years agoShellPkg: Remove current working dir path ".;" from 'path' variable
Tapan Shah [Wed, 21 Sep 2016 21:30:15 +0000 (14:30 -0700)]
ShellPkg: Remove current working dir path ".;" from 'path' variable

As per ECR 1349, latest UEFI Shell 2.2 specification has removed current working directory
path ".;" from a default 'path' environment variable as current working directory always
search first in system.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Tapan Shah <tapandshah@hpe.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
5 years agoShellPkg: Expand special output file to include "NULL" and case insensitive
Tapan Shah [Thu, 22 Sep 2016 19:12:47 +0000 (12:12 -0700)]
ShellPkg: Expand special output file to include "NULL" and case insensitive

As per ECR 1349 change in UEFI Shell Specification 2.2, expanding
a special output file name to include "NULL". Previously it only
supported "NUL" as a special output file and it was case sensitive.
With this change both "NUL" and "NULL" are special output file and
checked as case insensitive.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Tapan Shah <tapandshah@hpe.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
5 years agoShellPkg: Add Persistent Memory support in 'memmap' command
Tapan Shah [Thu, 22 Sep 2016 20:16:18 +0000 (13:16 -0700)]
ShellPkg: Add Persistent Memory support in 'memmap' command

As per ECR 1416, latest UEFI Shell 2.2 Specification has added Persistent
Memory support in 'memmap' command.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Tapan Shah <tapandshah@hpe.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
5 years agoShellPkg: Add '-nc' flag support in 'disconnect' command
Tapan Shah [Thu, 22 Sep 2016 19:49:12 +0000 (12:49 -0700)]
ShellPkg: Add '-nc' flag support in 'disconnect' command

As per ECR 1416, latest UEFI Shell 2.2 specification:
Define a behavior where 'disconnect -r' will disconnect drivers
from all devices but it will reconnect all consoles.
If -nc flag is used (e.g. 'disconnect -r -nc') then disconnect drivers
from all devices and don't reconnect consoles.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Tapan Shah <tapandshah@hpe.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
5 years agoOvmfPkg/VirtioGpuDxe: Fix VS toolchain build failure
Dandan Bi [Thu, 22 Sep 2016 01:21:38 +0000 (09:21 +0800)]
OvmfPkg/VirtioGpuDxe: Fix VS toolchain build failure

V2: add the assert codes.

Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
[lersek@redhat.com: fix up subject line]
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
5 years agoSecurityPkg/TPM2: Sync PcrAllocations and PcrMask
Jiewen Yao [Wed, 14 Sep 2016 08:54:50 +0000 (16:54 +0800)]
SecurityPkg/TPM2: Sync PcrAllocations and PcrMask

Current TCG2 implementation will set Tpm2HashMask PCD value according to TPM2
PCR bank. However, there might be misconfiguration in BIOS build phase.
The enhanced logic makes sure that the current PCR allocations, the TPM
supported PCRs, and the PcdTpm2HashMask are all in agreement.

Cc: Chao B Zhang <chao.b.zhang@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
5 years agoSecurityPkg/TPM2: Extract GetSupportedAndActivePcrs to Tpm2CommandLib
Jiewen Yao [Wed, 14 Sep 2016 08:28:12 +0000 (16:28 +0800)]
SecurityPkg/TPM2: Extract GetSupportedAndActivePcrs to Tpm2CommandLib

This patch extracts function Tpm2GetCapabilitySupportedAndActivePcrs()
from drivers and also update Tcg2ExecutePhysicalPresence() to call
Tpm2GetCapabilitySupportedAndActivePcrs() instead of
Tcg2Protocol->GetCapability to query the TPM to determine which
hashing algorithms are supported.

Cc: Chao B Zhang <chao.b.zhang@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
5 years agoSecurityPkg/TPM2: Move CopyDigestListToBuffer() to Tpm2CommandLib
Jiewen Yao [Wed, 14 Sep 2016 02:45:19 +0000 (10:45 +0800)]
SecurityPkg/TPM2: Move CopyDigestListToBuffer() to Tpm2CommandLib

This patch just moves function CopyDigestListToBuffer() from
drivers to library with HashAlgorithmMask parameter added to
make the interface more applicable.

The related function IsHashAlgSupportedInHashAlgorithmMask()
is also moved from drivers to library as internal function.

Cc: Chao B Zhang <chao.b.zhang@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
5 years agoSecurityPkg/TPM2: Move GetDigestListSize() to Tpm2CommandLib
Jiewen Yao [Wed, 14 Sep 2016 02:07:45 +0000 (10:07 +0800)]
SecurityPkg/TPM2: Move GetDigestListSize() to Tpm2CommandLib

This patch just moves function GetDigestListSize() from
drivers to library and no functionality change.

Cc: Chao B Zhang <chao.b.zhang@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
5 years agoSecurityPkg/TPM2: Update function header of GetDigestFromDigestList()
Star Zeng [Tue, 13 Sep 2016 11:12:07 +0000 (19:12 +0800)]
SecurityPkg/TPM2: Update function header of GetDigestFromDigestList()

Update the return status description and use OUT identifier instead of
IN for Digest parameter, no functionality change.

Cc: Chao B Zhang <chao.b.zhang@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: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
5 years agoSecurityPkg/TPM2: Move GetDigestFromDigestList() to Tpm2CommandLib
Jiewen Yao [Tue, 13 Sep 2016 11:05:08 +0000 (19:05 +0800)]
SecurityPkg/TPM2: Move GetDigestFromDigestList() to Tpm2CommandLib

This patch just moves function Tpm2GetDigestFromDigestList() from
drivers to library as GetDigestFromDigestList() and no functionality change.

Cc: Chao B Zhang <chao.b.zhang@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
5 years agoSecurityPkg/TPM2: Move Tpm2PcrAllocateBanks() to Tpm2CommandLib
Jiewen Yao [Tue, 13 Sep 2016 10:43:30 +0000 (18:43 +0800)]
SecurityPkg/TPM2: Move Tpm2PcrAllocateBanks() to Tpm2CommandLib

This patch just moves function Tpm2CommandAllocPcr() from
DxeTcg2PhysicalPresenceLib.c to Tpm2CommandLib as Tpm2PcrAllocateBanks()
and no functionality change.

Cc: Chao B Zhang <chao.b.zhang@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
5 years agoCryptoPkg: Clean up unreferenced symbol in Cryptest utility.
Qin Long [Wed, 21 Sep 2016 02:17:01 +0000 (10:17 +0800)]
CryptoPkg: Clean up unreferenced symbol in Cryptest utility.

Remove "TSCounterSignature" from TSVerify.c, which is not being
used by anyone.

Cc: Ting Ye <ting.ye@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qin Long <qin.long@intel.com>
Reviewed-by: Ting Ye <ting.ye@intel.com>
5 years agoArmPkg/AsmMacroIoLib: force word alignment for functions
Ard Biesheuvel [Tue, 13 Sep 2016 17:25:14 +0000 (18:25 +0100)]
ArmPkg/AsmMacroIoLib: force word alignment for functions

Without an explicit .align directive, the Clang assembler defaults to
no alignment, which may result in instructions appearing misaligned in
the final executable. So use word alignment in all cases.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
5 years agoArmVirtPkg: move all platforms to MdePkg/ BaseMemoryLib implementations
Ard Biesheuvel [Tue, 13 Sep 2016 15:36:23 +0000 (16:36 +0100)]
ArmVirtPkg: move all platforms to MdePkg/ BaseMemoryLib implementations

The BaseMemoryLibStm implementation under ArmPkg/ is being deprecated,
in favor of the generic versions under MdePkg, now that ARM and AARCH64
support has been added to both the generic C version (BaseMemoryLib) and
the accelerated version (BaseMemoryLibOptDxe). The latter uses unaligned
accesses and special cache maintenance instructions, and can therefore
not be used when the MMU is off.

So move to BaseMemoryLibOptDxe for the DXE phase and later, and to the
generic BaseMemoryLib before that.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
5 years agoMdePkg/BaseMemoryLibOptDxe ARM|AARCH64: implement accelerated GUID functions
Ard Biesheuvel [Fri, 16 Sep 2016 10:25:52 +0000 (11:25 +0100)]
MdePkg/BaseMemoryLibOptDxe ARM|AARCH64: implement accelerated GUID functions

As reported by Vishal, CompareGuid() is a hotspot, and switching from
BaseMemoryLibStm in ArmPkg/ to BaseMemoryLibOptDxe causes a noticeable
performance regression due to the fact that BaseMemoryLibOptDxe uses
unaligned accessors explicitly to implement CompareGuid() and the related
functions.

Since BaseMemoryLibOptDxe on ARM and AARCH64 can only be used in contexts
where unaligned accesses are allowed, reimplement these functions for ARM
and AARCH64 specifically, using wide accessors that can tolerate any
misalignment.

Reported-by: "Oliyil Kunnil, Vishal" <vishalo@qti.qualcomm.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
5 years agoMdePkg/BaseMemoryLibOptDxe ARM: fix arithmetic bugs in CompareMem()
Ard Biesheuvel [Tue, 13 Sep 2016 17:22:33 +0000 (18:22 +0100)]
MdePkg/BaseMemoryLibOptDxe ARM: fix arithmetic bugs in CompareMem()

Fix two bugs:
- Erroneous shift of 2 in a bytes to bits conversion.
- Use reverse subtract rather than negate for value that is subsequently
  used as operand #2 in a shift operation.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
5 years agoUefiCpuPkg/SecCore: SecPlatformInformation(2) are optional PPIs
Jeff Fan [Tue, 20 Sep 2016 08:17:26 +0000 (16:17 +0800)]
UefiCpuPkg/SecCore: SecPlatformInformation(2) are optional PPIs

Currently, this is ASSERT() if neither SecPlatformInformation2 nor
SecPlatformInformation PPIs are found. This is not correct. Per PI specification
both of them are optional PPI. Platform may not install them.

Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
5 years agoUefiCpuPkg/SecCore: Fix comment typo
Jeff Fan [Tue, 20 Sep 2016 08:08:28 +0000 (16:08 +0800)]
UefiCpuPkg/SecCore: Fix comment typo

Revert SecPlatformInformation2 and SecPlatformInformation in two comment blocks.
And correct the words.

Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
5 years agoQuarkPlatformPkg/PlatformSecLib: Fix stack pointer issue in Flat32.S
Jeff Fan [Tue, 20 Sep 2016 08:03:18 +0000 (16:03 +0800)]
QuarkPlatformPkg/PlatformSecLib: Fix stack pointer issue in Flat32.S

ESP should be set to top of eSRAM range that aligns with Flat32.asm. Because CPU
BIST data will be located at top of STACK, this issue leads Platform Sec Lib
cannot get the correct CPU BIST information.

This fix is to address below issue:
  https://tianocore.acgmultimedia.com/show_bug.cgi?id=123

Cc: Steven Shi <Steven.shi@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Kelly Steele <kelly.steele@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
5 years agoMdeModulePkg/XhciPei:1ms delay before access MMIO reg during reset
Feng Tian [Wed, 14 Sep 2016 01:48:40 +0000 (09:48 +0800)]
MdeModulePkg/XhciPei:1ms delay before access MMIO reg during reset

Some XHCI host controllers require to have extra 1ms delay before
accessing any MMIO register during HC reset.

As this delay is not defined by XHCI spec, we use this workaround
to fix the issue.

Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
5 years agoMdeModulePkg/XhciDxe:1ms delay before access MMIO reg during reset
Feng Tian [Wed, 14 Sep 2016 01:36:11 +0000 (09:36 +0800)]
MdeModulePkg/XhciDxe:1ms delay before access MMIO reg during reset

Some XHCI host controllers require to have extra 1ms delay before
accessing any MMIO register during HC reset.

As this delay is not defined by XHCI spec, we use this workaround
to fix the issue.

Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
5 years agoBaseTools: Update toolsetup.bat to set PYTHONPATH env to run python source
Liming Gao [Mon, 12 Sep 2016 07:28:47 +0000 (15:28 +0800)]
BaseTools: Update toolsetup.bat to set PYTHONPATH env to run python source

When python tool exe doesn't exist, toolsetup.bat will set up PYTHONPATH,
and set python tool dos script directory into system PATH.

Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Erik Bjorge <erik.c.bjorge@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>
5 years agoBaseTools: Update Python Makefile not to depend on PYTHON_FREEZER_PATH
Liming Gao [Mon, 12 Sep 2016 07:25:07 +0000 (15:25 +0800)]
BaseTools: Update Python Makefile not to depend on PYTHON_FREEZER_PATH

If PYTHON_FREEZER_PATH is not set, Python tools will not be freeze.

Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Erik Bjorge <erik.c.bjorge@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>
5 years agoBaseTools: Update python tool to call external tools with shell true mode
Liming Gao [Mon, 12 Sep 2016 07:22:49 +0000 (15:22 +0800)]
BaseTools: Update python tool to call external tools with shell true mode

Python tool may run from source as the dos batch files. So, update python
code to call external tools with shell true mode.

Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Erik Bjorge <erik.c.bjorge@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>
5 years agoBaseTools: Add Windows batch files to run python tool from Source
Liming Gao [Mon, 12 Sep 2016 07:19:37 +0000 (15:19 +0800)]
BaseTools: Add Windows batch files to run python tool from Source

Add 13 windows batch files for every python tool.

Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Erik Bjorge <erik.c.bjorge@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>
5 years agoMdeModulePkg PCD: Update PCD database structure definition to match BaseTools
Star Zeng [Wed, 31 Aug 2016 06:47:36 +0000 (14:47 +0800)]
MdeModulePkg PCD: Update PCD database structure definition to match BaseTools

To follow PI1.4a, BaseTools has be updated to fix artificial limitation of
SkuId range.

This patch is to update PCD database structure definition to match BaseTools.

Note: The source code and BaseTools need to be upgraded at the same time,
and if they are not upgraded at the same time, build error like below will
be triggered to help user identify the problem.

"Please make sure the version of PCD PEIM Service and the generated
PCD PEI Database match."

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: Liming Gao <liming.gao@intel.com>
5 years agoBaseTools: Follow PI1.4a to fix artificial limitation of PCD SkuId range
Yonghong Zhu [Thu, 1 Sep 2016 06:36:24 +0000 (14:36 +0800)]
BaseTools: Follow PI1.4a to fix artificial limitation of PCD SkuId range

Current BaseTools follow previous PI spec to use UINT8 for SkuId, to
follow PI1.4a, BaseTools need to be updated to fix artificial limitation
of PCD SkuId range.

This patch is to update BaseTools to use UINT64 for SkuId, since the
PCD database structure needs to be naturally aligned, the PCD database
structure layout is adjusted to keep the natural alignment and version
is updated to 6.

Note: As the PCD database structure layout is adjusted, the structure
definition in MdeModulePkg/Include/Guid/PcdDataBaseSignatureGuid.h and
PCD drivers also need to be updated. That means the source code and
BaseTools need to be upgraded at the same time, and if they are not
upgraded at the same time, build error like below will be triggered
to help user identify the problem.

"Please make sure the version of PCD PEIM Service and the generated
PCD PEI Database match."

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>
5 years agoIntelFsp2Pkg: Align #Pragma in UPD header files to rest of EDK2 Pkgs
Satya Yarlagadda [Sat, 17 Sep 2016 03:24:49 +0000 (11:24 +0800)]
IntelFsp2Pkg: Align #Pragma in UPD header files to rest of EDK2 Pkgs

Changed the GenCfgOpt.py script to insert pragma pack(1) instead of
pragma pack (push, 1) in the upd header files generated during fsp build.
This is to align with rest of the EDKII pkgs pragma pack usage.

Also, this scripts generates UnusedUpdSpace for UPD address gaps.
Currently it uses UIN16/UINT32/UINT64 for 2/4/8 bytes instead of UINT8[],
thus causing upd space waste to have Natural Alignment. Hence changed the
script to use UINT8[] for any unusedUpd fields above 1 byte.

Cc: Maurice Ma <maurice.ma@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Giri P Mudusuru <giri.p.mudusuru@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Satya Yarlagadda <satya.p.yarlagadda@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>
5 years agoNetworkPkg: Correct the DNS token return status by RCODE
Jiaxin Wu [Wed, 14 Sep 2016 06:43:45 +0000 (14:43 +0800)]
NetworkPkg: Correct the DNS token return status by RCODE

When HostNameToIp() and GeneralLookUp() are called with a invalid
host name, RCODE (4 bit field is set as part of responses) error
will returned in packet to identify the domain name referenced in
the query does not exist. So, EFI_NOT_FOUND should be returned
directly.

Current implementation only check the RCODE in successful condition.
Need update the code for more error check according to RFC 1035 4.1.1
section.

Cc: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Ye Ting <ting.ye@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Tested-by: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>
Reviewed-by: Sriram Subramanian <sriram-s@hpe.com>
5 years agoArmVirtPkg/HighMemDxe: move to FDT client protocol
Ard Biesheuvel [Thu, 15 Sep 2016 13:23:11 +0000 (14:23 +0100)]
ArmVirtPkg/HighMemDxe: move to FDT client protocol

Use the FDT client protocol rather than parsing the DT directly using
fdtlib. While we're at it, update the code so it deals correctly with
memory nodes that describe multiple disjoint regions in their "reg"
properties, and make the code work with #address-cells/#size-cells
properties of <1> as well as <2>.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
5 years agoArmVirtPkg/FdtClientDxe: add methods to iterate over memory nodes
Ard Biesheuvel [Thu, 15 Sep 2016 12:33:23 +0000 (13:33 +0100)]
ArmVirtPkg/FdtClientDxe: add methods to iterate over memory nodes

Add high level methods to iterate over all 'reg' properties of all DT
nodes whose device_type properties have the value "memory". Since we are
modifying the FdtClient protocol, update the protocol and the only existing
implementation at the same time.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
5 years agoArmVirtPkg/FdtClientDxe: report address and size cell count directly
Ard Biesheuvel [Thu, 15 Sep 2016 13:15:14 +0000 (14:15 +0100)]
ArmVirtPkg/FdtClientDxe: report address and size cell count directly

The FDT client protocol methods dealing with "reg" properties return
the size of a "reg" element. Currently, we have hardcoded this as '8',
since #address-cells == #size-cells == 2 in most cases. However, for
different values, have a single 'reg' element size is not unambiguous,
since - however unlikely - if #address-cells != #size-cells, we do not
know which is which.

So before adding more methods to the protocol, fix up this oversight.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
5 years agoArmVirtPkg/FdtClientDxe: fix check for size of "reg" properties
Ard Biesheuvel [Thu, 15 Sep 2016 12:48:15 +0000 (13:48 +0100)]
ArmVirtPkg/FdtClientDxe: fix check for size of "reg" properties

Currently, the code in FdtClientDxe assumes #address-cells/#size-cells
values of <2>. Since DT "reg" properties always consist of <base, size>
tuples, this means the size of the entire property should always be a
multiple of 16 bytes (i.e, 4 * sizeof(UINT32), not 8. So fix this.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
5 years agoBaseTools: Fix the bug to handle the read-only file
Yonghong Zhu [Wed, 14 Sep 2016 05:59:01 +0000 (13:59 +0800)]
BaseTools: Fix the bug to handle the read-only file

change the 'r+b' to 'rb' for some file's open, since these files we only
read it and no need to write. It can fix the bug that the file's attribute
had been set to read-only.

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>
5 years agoIntelFrameworkPkg/FrameworkSpecConformance.txt: Update the URL
Yonghong Zhu [Wed, 14 Sep 2016 05:36:07 +0000 (13:36 +0800)]
IntelFrameworkPkg/FrameworkSpecConformance.txt: Update the URL

Update the URL since http://edk2.tianocore.org is not valid

Cc: Liming Gao <liming.gao@intel.com>
Cc: Jeff Fan <jeff.fan@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>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
5 years agoedksetup.sh: update the URL in edksetup.sh
Yonghong Zhu [Wed, 14 Sep 2016 05:27:06 +0000 (13:27 +0800)]
edksetup.sh: update the URL in edksetup.sh

Update the URL since http://edk2.tianocore.org is not valid

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>
5 years agoArmPkg/DefaultExceptionHandlerLib: improve formatting of backtrace
Ard Biesheuvel [Fri, 9 Sep 2016 17:58:56 +0000 (18:58 +0100)]
ArmPkg/DefaultExceptionHandlerLib: improve formatting of backtrace

Implement the backtrace formattting suggested by Andrew, i.e.,

  IRQ Exception at 0x000000005BE182B0
  PC 0x00005BE182B0 (0x00005BE14000+0x000042B0) [ 0] ArmCpuDxe.dll
  PC 0x00005BE15770 (0x00005BE14000+0x00001770) [ 0] ArmCpuDxe.dll
  PC 0x00005EF08CC8 (0x00005EEEB000+0x0001DCC8) [ 1] DxeCore.dll
  PC 0x00005EF09008 (0x00005EEEB000+0x0001E008) [ 1] DxeCore.dll
  PC 0x00005EEF6ACC (0x00005EEEB000+0x0000BACC) [ 1] DxeCore.dll
  PC 0x00005EF0963C (0x00005EEEB000+0x0001E63C) [ 1] DxeCore.dll
  PC 0x00005EF09A38 (0x00005EEEB000+0x0001EA38) [ 1] DxeCore.dll
  PC 0x00005EF01560 (0x00005EEEB000+0x00016560) [ 1] DxeCore.dll
  PC 0x00005EF02FB4 (0x00005EEEB000+0x00017FB4) [ 1] DxeCore.dll
  PC 0x00005EF03098 (0x00005EEEB000+0x00018098) [ 1] DxeCore.dll
  PC 0x00005EF0460C (0x00005EEEB000+0x0001960C) [ 1] DxeCore.dll
  PC 0x00005EF005C4 (0x00005EEEB000+0x000155C4) [ 1] DxeCore.dll
  PC 0x00005EF00360 (0x00005EEEB000+0x00015360) [ 1] DxeCore.dll
  PC 0x00005EF003C8 (0x00005EEEB000+0x000153C8) [ 1] DxeCore.dll
  PC 0x00005EF128D0 (0x00005EEEB000+0x000278D0) [ 1] DxeCore.dll
  PC 0x00005EF12930 (0x00005EEEB000+0x00027930) [ 1] DxeCore.dll
  PC 0x00005EEEF594 (0x00005EEEB000+0x00004594) [ 1] DxeCore.dll
  PC 0x00005EF0CF18 (0x00005EEEB000+0x00021F18) [ 1] DxeCore.dll
  PC 0x00005EF1A310 (0x00005EEEB000+0x0002F310) [ 1] DxeCore.dll
  PC 0x00005EEF1808 (0x00005EEEB000+0x00006808) [ 1] DxeCore.dll
  PC 0x00005EEF1E48 (0x00005EEEB000+0x00006E48) [ 1] DxeCore.dll
  PC 0x00005EF0A838 (0x00005EEEB000+0x0001F838) [ 1] DxeCore.dll
  PC 0x00005EEED70C (0x00005EEEB000+0x0000270C) [ 1] DxeCore.dll
  PC 0x00005EEEC93C (0x00005EEEB000+0x0000193C) [ 1] DxeCore.dll
  PC 0x00005EEEC024 (0x00005EEEB000+0x00001024) [ 1] DxeCore.dll

  [ 0] /home/ard/build/edk2/Build/ArmVirtQemu-AARCH64/DEBUG_GCC5/AARCH64/ArmPkg/Drivers/CpuDxe/CpuDxe/DEBUG/ArmCpuDxe.dll
  [ 1] /home/ard/build/edk2/Build/ArmVirtQemu-AARCH64/DEBUG_GCC5/AARCH64/MdeModulePkg/Core/Dxe/DxeMain/DEBUG/DxeCore.dll

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
5 years agoVlv2TbltDevicePkg:Signal End of Dxe Event.
lushifex [Thu, 1 Sep 2016 05:02:55 +0000 (13:02 +0800)]
Vlv2TbltDevicePkg:Signal End of Dxe Event.

According to PI spec,DxeSmmReadyToLock protocol is published immediately after signaling of the End of Dxe Event.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: lushifex <shifeix.a.lu@intel.com>
5 years agoUefiCpuPkg/SecCore: Re-install SEC platform information(2) PPI
Jeff Fan [Fri, 9 Sep 2016 07:14:32 +0000 (15:14 +0800)]
UefiCpuPkg/SecCore: Re-install SEC platform information(2) PPI

In SecTemporaryRamDone(), we will build one privated GUIDed-HOB to save CPU BIST
Data and re-install SEC platform information(2) PPI. Then other PEI drivers
could get CPU BIST data from the private GUIDed-HOB by new installed PPI.

Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Cc: Giri P Mudusuru <giri.p.mudusuru@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Feng Tian <feng.tian@Intel.com>
5 years agoUefiCpuPkg/SecCore: Abstract worker function GetBistFromHob()
Jeff Fan [Fri, 9 Sep 2016 07:08:56 +0000 (15:08 +0800)]
UefiCpuPkg/SecCore: Abstract worker function GetBistFromHob()

Abstract one worker function to get CPU BIST from the GUIDed-HOB. Add
SecPlatformInformationBist() and SecPlatformInformation2Bist() to invoke
GetBistFromHob(). Add in/out for parameter in function header.

Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Cc: Giri P Mudusuru <giri.p.mudusuru@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Feng Tian <feng.tian@Intel.com>