]> git.proxmox.com Git - mirror_edk2.git/log
mirror_edk2.git
7 years agoArmPlatformPkg: Correct mendacious comments.
Alexei [Wed, 21 Sep 2016 20:33:14 +0000 (21:33 +0100)]
ArmPlatformPkg: Correct mendacious comments.

Correct some obviously incorrect comments that have invalid details for
the returned values.  (Copy /Paste problem?)
There are no functional changes in this commit.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Alexei Fedorov <alexei.fedorov@arm.com>
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
7 years agoArmPlatformPkg: Fix PL011 FIFO size test
Evan Lloyd [Wed, 21 Sep 2016 20:33:13 +0000 (21:33 +0100)]
ArmPlatformPkg: Fix PL011 FIFO size test

This change updates PL011UartInitializePort to compare ReceiveFifoDepth
with the correct hardware FIFO size instead of the constant 32 used
previously.
This corrects a minor bug where a request for a fifo size > 15 and < 32
would not have been honoured on a system with a 16 byte FIFO.

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>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
7 years agoPcAtChipsetPkg AcpiTimerLib: Clear bits [31:24] after reading by IoRead32()
Star Zeng [Wed, 28 Sep 2016 10:17:55 +0000 (18:17 +0800)]
PcAtChipsetPkg AcpiTimerLib: Clear bits [31:24] after reading by IoRead32()

Clear bits [31:24] after reading ACPI timer count by IoRead32(), and also add
comments "Note: The implementation uses the lower 24-bits of the ACPI timer
and is compatible with both 24-bit and 32-bit ACPI timers." in INF.

Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
7 years agoNt32Pkg WinNtSimpleFileSystemDxe: Correct file length.
Dong, Eric [Mon, 10 Oct 2016 08:36:18 +0000 (16:36 +0800)]
Nt32Pkg WinNtSimpleFileSystemDxe: Correct file length.

In GetInfo interface, current code copy real file name buffer
with full path file length. It should use real file name
length. This patch fix this error.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
7 years agoSecurityPkg: SmmTcg2PhysicalPresenceLib: Fix GCC build failure
Zhang, Chao B [Mon, 10 Oct 2016 08:42:01 +0000 (16:42 +0800)]
SecurityPkg: SmmTcg2PhysicalPresenceLib: Fix GCC build failure

GCC is case sensitive. Also add BaseMemoryLib in INF.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chao Zhang <chao.b.zhang@intel.com>
Reviewed-by: Gao Liming <liming.gao@intel.com>
Reviewed-by: Long Qin <qin.long@intel.com>
7 years agoNt32Pkg/PlatformBootManagerLib: Signal the End of DXE Event
Cinnamon Shia [Mon, 3 Oct 2016 09:28:30 +0000 (17:28 +0800)]
Nt32Pkg/PlatformBootManagerLib: Signal the End of DXE Event

From PI spec vol2:
Prior to invoking any UEFI drivers, applications, or connecting consoles,
the platform should signal the event EFI_END_OF_DXE_EVENT_GUID

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Cinnamon Shia <cinnamon.shia@hpe.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
7 years agoMdePkg:Correct the comment for the DEBUG_NET.
Zhang Lubo [Fri, 23 Sep 2016 04:08:46 +0000 (12:08 +0800)]
MdePkg:Correct the comment for the DEBUG_NET.

Generalize the comment for the DEBUG_NET
#define DEBUG_NET  0x00004000  // SNP Driver
to Network IO Driver.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <lubo.zhang@intel.com>
Cc: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>
Cc: Subramanian Sriram <sriram-s@hpe.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Ye Ting <ting.ye@intel.com>
Reviewed-by: Sriram Subramanian <sriram-s@hpe.com>
7 years agoMdeModulePkg:TcpDriver need to use EFI_D_NET for DEBUG maessage.
Zhang Lubo [Fri, 23 Sep 2016 04:01:28 +0000 (12:01 +0800)]
MdeModulePkg:TcpDriver need to use EFI_D_NET for DEBUG maessage.

Tcp driver need to use EFI_D_NET to log DEBUG message,
So it becomes easy to separate/filter out debug messages
from network stack versus generic EFI_D_INFO debugs.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <lubo.zhang@intel.com>
Cc: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>
Cc: Subramanian Sriram <sriram-s@hpe.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Ye Ting <ting.ye@intel.com>
Reviewed-by: Sriram Subramanian <sriram-s@hpe.com>
7 years agoNetworkPkg: TcpDriver use EFI_D_NET for DEBUG maessage.
Zhang Lubo [Fri, 23 Sep 2016 03:55:01 +0000 (11:55 +0800)]
NetworkPkg: TcpDriver use EFI_D_NET for DEBUG maessage.

Tcp driver need to use EFI_D_NET to log DEBUG message,
So it becomes easy to separate/filter out debug messages
from network stack versus generic EFI_D_INFO debugs.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <lubo.zhang@intel.com>
Cc: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>
Cc: Subramanian Sriram <sriram-s@hpe.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Ye Ting <ting.ye@intel.com>
Reviewed-by: Sriram Subramanian <sriram-s@hpe.com>
7 years agoOptionRomPkg: Fix GCC build failure
Bi, Dandan [Thu, 22 Sep 2016 02:51:10 +0000 (10:51 +0800)]
OptionRomPkg: Fix GCC build failure

Remove the variable which is set but not used to pass GCC build.

Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
7 years agoShellPkg/UefiShellNetwork1CommandsLib: Remove unnecessary EFIAPI
Chen A Chen [Thu, 29 Sep 2016 06:55:26 +0000 (14:55 +0800)]
ShellPkg/UefiShellNetwork1CommandsLib: Remove unnecessary EFIAPI

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chen A Chen <chen.a.chen@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Ruiyu Ni <Ruiyu.ni@intel.com>
7 years agoShellPkg/UefiShellLib: Remove unnecessary EFIAPI
Chen A Chen [Thu, 29 Sep 2016 06:54:40 +0000 (14:54 +0800)]
ShellPkg/UefiShellLib: Remove unnecessary EFIAPI

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chen A Chen <chen.a.chen@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Ruiyu Ni <Ruiyu.ni@intel.com>
7 years agoShellPkg/UefiShellCommandLib: Remove unnecessary EFIAPI
Chen A Chen [Thu, 29 Sep 2016 06:53:47 +0000 (14:53 +0800)]
ShellPkg/UefiShellCommandLib: Remove unnecessary EFIAPI

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chen A Chen <chen.a.chen@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Ruiyu Ni <Ruiyu.ni@intel.com>
7 years agoShellPkg/UefiShellBcfgCommandLib: Remove unnecessary EFIAPI
Chen A Chen [Thu, 29 Sep 2016 06:51:57 +0000 (14:51 +0800)]
ShellPkg/UefiShellBcfgCommandLib: Remove unnecessary EFIAPI

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chen A Chen <chen.a.chen@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Ruiyu Ni <Ruiyu.ni@intel.com>
7 years agoShellPkg/UefiShellParsingLib: Remove unnecessary EFIAPI
Chen A Chen [Thu, 29 Sep 2016 06:51:08 +0000 (14:51 +0800)]
ShellPkg/UefiShellParsingLib: Remove unnecessary EFIAPI

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chen A Chen <chen.a.chen@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Ruiyu Ni <Ruiyu.ni@intel.com>
7 years agoShellPkg/UefiShellLevel3CommandsLib: Remove unnecessary EFIAPI
Chen A Chen [Thu, 29 Sep 2016 06:50:01 +0000 (14:50 +0800)]
ShellPkg/UefiShellLevel3CommandsLib: Remove unnecessary EFIAPI

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chen A Chen <chen.a.chen@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Ruiyu Ni <Ruiyu.ni@intel.com>
7 years agoShellPkg/UefiShellLevel2CommandsLib: Remove unnecessary EFIAPI
Chen A Chen [Thu, 29 Sep 2016 06:44:22 +0000 (14:44 +0800)]
ShellPkg/UefiShellLevel2CommandsLib: Remove unnecessary EFIAPI

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chen A Chen <chen.a.chen@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Ruiyu Ni <Ruiyu.ni@intel.com>
7 years agoShellPkg/UefiShellLevel1CommandsLib: Remove unnecessary EFIAPI
Chen A Chen [Thu, 29 Sep 2016 06:43:38 +0000 (14:43 +0800)]
ShellPkg/UefiShellLevel1CommandsLib: Remove unnecessary EFIAPI

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chen A Chen <chen.a.chen@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Ruiyu Ni <Ruiyu.ni@intel.com>
7 years agoShellPkg/UefiShellDriver1CommandsLib: Remove unnecessary EFIAPI
Chen A Chen [Thu, 29 Sep 2016 06:42:39 +0000 (14:42 +0800)]
ShellPkg/UefiShellDriver1CommandsLib: Remove unnecessary EFIAPI

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chen A Chen <chen.a.chen@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Ruiyu Ni <Ruiyu.ni@intel.com>
7 years agoShellPkg/UefiShellDebug1CommandsLib: Remove unnecessary EFIAPI
Chen A Chen [Thu, 29 Sep 2016 06:41:41 +0000 (14:41 +0800)]
ShellPkg/UefiShellDebug1CommandsLib: Remove unnecessary EFIAPI

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chen A Chen <chen.a.chen@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Ruiyu Ni <Ruiyu.ni@intel.com>
7 years agoShellPkg/Application: Remove unnecessary EFIAPI
Chen A Chen [Thu, 29 Sep 2016 07:15:15 +0000 (15:15 +0800)]
ShellPkg/Application: Remove unnecessary EFIAPI

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chen A Chen <chen.a.chen@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Ruiyu Ni <Ruiyu.ni@intel.com>
7 years agoMdeModulePkg/HiiDataBase: Fix NULL deference bug in HiiGetImageInfo
Ruiyu Ni [Fri, 30 Sep 2016 04:29:24 +0000 (12:29 +0800)]
MdeModulePkg/HiiDataBase: Fix NULL deference bug in HiiGetImageInfo

The return value of GetImageIdOrAddress() could be NULL if the
ImageId is invalid. The patch fixes the bug to return EFI_NOT_FOUND
when GetImageIdOrAddress() returns NULL.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoBaseTools Makefile: Enable O2 option for GCC tool chain
Liming Gao [Thu, 29 Sep 2016 07:59:09 +0000 (15:59 +0800)]
BaseTools Makefile: Enable O2 option for GCC tool chain

Enable O2 option to generate fast code for performance improvement.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
7 years agoBaseTools GenVtf: Initialize the return point as NULL
Liming Gao [Thu, 29 Sep 2016 07:58:23 +0000 (15:58 +0800)]
BaseTools GenVtf: Initialize the return point as NULL

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
7 years agoBaseTools Makefile: Enable O2 option to replace Od for VS tool chain
Liming Gao [Wed, 28 Sep 2016 06:18:56 +0000 (14:18 +0800)]
BaseTools Makefile: Enable O2 option to replace Od for VS tool chain

Enable O2 option to generate fast code for performance improvement.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Acked-by: Jordan Justen <jordan.l.justen@intel.com>
7 years agoBaseTools EfiLdrImage: Remove unnecessary exit (0)
Liming Gao [Wed, 28 Sep 2016 06:14:37 +0000 (14:14 +0800)]
BaseTools EfiLdrImage: Remove unnecessary exit (0)

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
7 years agoMdeModulePkg/HiiDataBase: Fix incorrect local variable type
Dandan Bi [Mon, 26 Sep 2016 06:25:33 +0000 (14:25 +0800)]
MdeModulePkg/HiiDataBase: Fix incorrect local variable type

The type of variable "SmallestIdFromFlag" should be BOOLEAN,
this patch fix the incorrect type.

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: Liming Gao <liming.gao@intel.com>
7 years agoMdeModulePkg/CdExpressPei: Fix capsule size mismatch issue.
Jiewen Yao [Fri, 30 Sep 2016 02:42:26 +0000 (10:42 +0800)]
MdeModulePkg/CdExpressPei: Fix capsule size mismatch issue.

Current PeiCdExpress driver will return capsule size to
be block aligned.
It will fail if we check the capsuleImageSize field.

The patch correct the returned capsule size.

Tested-by: Eric Dong <eric.dong@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
7 years agoMdePkg: Fix some typing errors in the header files
Thomas Huth [Mon, 12 Sep 2016 08:35:39 +0000 (01:35 -0700)]
MdePkg: Fix some typing errors in the header files

Correct the typos in some header files of MdePkg.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
7 years agoMdePkg: Fix some typing errors
Thomas Huth [Fri, 9 Sep 2016 20:33:09 +0000 (13:33 -0700)]
MdePkg: Fix some typing errors

Correct the typos in some files of MdePkg.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
7 years agoQuarkPlatformPkg/RecoveryOemHookLib: Remove RecoveryOemHookLib
Michael Kinney [Mon, 3 Oct 2016 18:16:46 +0000 (11:16 -0700)]
QuarkPlatformPkg/RecoveryOemHookLib: Remove RecoveryOemHookLib

Remove the RecoveryOemHookLib class and instance 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>