]> git.proxmox.com Git - mirror_edk2.git/log
mirror_edk2.git
7 years agoVlv2TbltDevicePkg:Change UNIX to DOS format.
lushifex [Tue, 21 Jun 2016 03:02:33 +0000 (11:02 +0800)]
Vlv2TbltDevicePkg:Change UNIX to DOS format.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: lushifex <shifeix.a.lu@intel.com>
Reviewed-by: David Wei <david.wei@intel.com>
7 years agoVlv2DeviceRefCodePkg&Vlv2TbltDevicePkg:Add setup option of LPE Audio.
lushifex [Wed, 8 Jun 2016 06:24:16 +0000 (14:24 +0800)]
Vlv2DeviceRefCodePkg&Vlv2TbltDevicePkg:Add setup option of LPE Audio.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: lushifex <shifeix.a.lu@intel.com>
Reviewed-by: David Wei <david.wei@intel.com>
7 years agoVlv2DeviceRefCodePkg&Vlv2TbltDevicePkg:Convert Mix to DOS.
Lu, ShifeiX A [Tue, 21 Jun 2016 03:05:30 +0000 (11:05 +0800)]
Vlv2DeviceRefCodePkg&Vlv2TbltDevicePkg:Convert Mix to DOS.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: lushifex <shifeix.a.lu@intel.com>
Reviewed-by: David Wei <david.wei@intel.com>
7 years agoMdeModulePkg PCD: Avoid DynamicHii PCD set to override other values
Star Zeng [Thu, 19 May 2016 03:23:41 +0000 (11:23 +0800)]
MdeModulePkg PCD: Avoid DynamicHii PCD set to override other values

When Hii variable is not present and if we try to update a variable offset
with some value, we are creating a new variable by Zeroing all the variable
offsets except the one which we are trying to update.
This will override all the other variable default values which are
programmed as a part of initial PCD definition.

DXE PCD driver could be enhanced to combine the DynamicHii
PCDs(related to same variable) default values and only update the offset
PcdSetXXX want to set, then set the combined values to variable.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoIntelFsp2Pkg: rename GetFspVpdDataPointer() to GetFspCfgRegionDataPointer()
Jiewen Yao [Fri, 17 Jun 2016 09:24:02 +0000 (17:24 +0800)]
IntelFsp2Pkg: rename GetFspVpdDataPointer() to GetFspCfgRegionDataPointer()

FSP2.0 removed VPD concept.
Rename GetFspVpdDataPointer() to GetFspCfgRegionDataPointer() to follow FSP2.0
specification (CfgRegionOffset).

Cc: Giri P Mudusuru <giri.p.mudusuru@intel.com>
Cc: Amy Chan <amy.chan@intel.com>
Cc: Satya Yarlagadda <satya.p.yarlagadda@intel.com>
Cc: Maurice Ma <maurice.ma@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>
Reviewed-by: Amy Chan <amy.chan@intel.com>
7 years agoIntelFsp2WrapperPkg: Add support to handle ResetRequired return Status from FSP.
Jiewen Yao [Fri, 17 Jun 2016 02:38:09 +0000 (10:38 +0800)]
IntelFsp2WrapperPkg: Add support to handle ResetRequired return Status from FSP.

As per FSP 2.0 spec, FSP shall not trigger system reset and instead it
shall return from the FSP API to the BL/Wrapper with the required reset
type. The changes are to handle the ResetRequired return code from FSP
APIs and provide lib interface for platform to trigger the actual reset.

Cc: Giri P Mudusuru <giri.p.mudusuru@intel.com>
Cc: Amy Chan <amy.chan@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Satya Yarlagadda <satya.p.yarlagadda@intel.com>
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>
7 years agoShellPkg/UefiHandleParsingLib.c: Unify EOL and remove trailing space
Ruiyu Ni [Thu, 16 Jun 2016 03:14:40 +0000 (11:14 +0800)]
ShellPkg/UefiHandleParsingLib.c: Unify EOL and remove trailing space

The patch doesn't change any code logic.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
7 years agoShellPkg: Use ".." to indicate device path is partially displayed
Ruiyu Ni [Thu, 16 Jun 2016 03:12:53 +0000 (11:12 +0800)]
ShellPkg: Use ".." to indicate device path is partially displayed

The output of "dh <handle>" originally is like below:
12C: USBIO DevicePath(x0)/Pci(0x14,0x0)/USB(0x6,0x0))

The device path part is very confusing. Use ".." in front of the
partially displayed device path is better and it also aligns to
the example output in Shell spec.
12C: USBIO DevicePath(..)/Pci(0x14,0x0)/USB(0x6,0x0))

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
7 years agoNetworkPkg: Fix unspecified address use case in IpsecConfig
Jiaxin Wu [Wed, 15 Jun 2016 08:23:51 +0000 (16:23 +0800)]
NetworkPkg: Fix unspecified address use case in IpsecConfig

This patch is used to fix unspecified address use case in
ConstructSpdIndexer() function. Indexer->Name for
ConstructSpdIndexer is unspecified, that will be a problem
for UnicodeStrToAsciiStr.

This patch also refine the code by removing ASSERT and user
error handling.

Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Zeng Star <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Zeng Star <star.zeng@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
7 years agoMdePkg: MTftp6: Correct #define value in Mtfp6.h
hegdenag [Thu, 16 Jun 2016 04:50:37 +0000 (12:50 +0800)]
MdePkg: MTftp6: Correct #define value in Mtfp6.h

defined values of EFI_MTFTP6_ERRORCODE_ILLEGAL_OPERATION and
EFI_MTFTP6_ERRORCODE_FILE_ALREADY_EXISTS are the same. This patch
corrects the value of EFI_MTFTP6_ERRORCODE_ILLEGAL_OPERATION to 4.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Sriram Subramanian <sriram-s@hpe.com>
Reviewed-By: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
7 years agoInterFsp2Pkg:Tool: Add user manual for SplitFspBin tool.
Jiewen Yao [Wed, 15 Jun 2016 02:44:43 +0000 (10:44 +0800)]
InterFsp2Pkg:Tool: Add user manual for SplitFspBin tool.

Besides Split FSP binary, we added some more feature to SplitFspBin tool.
Here we add user manual for it to describe all usage.

Cc: Giri P Mudusuru <giri.p.mudusuru@intel.com>
Cc: Maurice Ma <maurice.ma@intel.com>
Cc: Satya P Yarlagadda <satya.p.yarlagadda@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>
Reviewed-by: Maurice Ma <maurice.ma@intel.com>
7 years agoSecurityPkg: SecurityPkg.uni: Update info string for PcdTcgPhysicalPresenceInterfaceVer
Zhang, Chao B [Thu, 16 Jun 2016 06:24:06 +0000 (14:24 +0800)]
SecurityPkg: SecurityPkg.uni: Update info string for PcdTcgPhysicalPresenceInterfaceVer

Update Pcd info string for new added PcdTcgPhysicalPresenceInterfaceVer

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chao Zhang <chao.b.zhang@intel.com>
Reviewed-by: Dandan Bi <dandan.bi@intel.com>
7 years agoSecurityPkg: Tcg2Smm: Fix type casting issue
Zhang, Chao B [Thu, 16 Jun 2016 06:11:49 +0000 (14:11 +0800)]
SecurityPkg: Tcg2Smm: Fix type casting issue

Fix type casting issue introduced by cd64301398876d0b3700f882b3eea12657510a70

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>
7 years agoIntelFsp2WrapperPkg: Add Dymanic PCD capability to PcdFspsBaseAddress
Satya Yarlagadda [Wed, 15 Jun 2016 08:04:17 +0000 (13:34 +0530)]
IntelFsp2WrapperPkg: Add Dymanic PCD capability to PcdFspsBaseAddress

Cc: Giri P Mudusuru <giri.p.mudusuru@intel.com>
Cc: Maurice Ma <maurice.ma@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Satya Yarlagadda <satya.p.yarlagadda@intel.com>
Reviewed by: Maurice Ma <maurice.ma@intel.com>
Reviewed by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed by: Giri P Mudusuru <giri.p.mudusuru@intel.com>

7 years agoSecurityPkg/TcgStorageOpalLib: Avoid using special word in comments
Eric Dong [Tue, 10 May 2016 09:57:00 +0000 (17:57 +0800)]
SecurityPkg/TcgStorageOpalLib: Avoid using special word in comments

Cc: Shumin Qiu <shumin.qiu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Qiu Shumin <shumin.qiu@intel.com>
7 years agoSecurityPkg OpalPasswordDxe: gray out menu instead of suppress it.
Eric Dong [Wed, 25 May 2016 00:28:46 +0000 (08:28 +0800)]
SecurityPkg OpalPasswordDxe: gray out menu instead of suppress it.

For current implementation, if the device is pyrite type, driver
will suppress the "keep user data" option. Base on the feedback
from user, they prefer to keep the menu but gray out it. Now base
on this feedback to update the driver.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
7 years agoIntelSiliconPkg/IgdOpRegion: Add definition for Intel IGD
Jiewen Yao [Thu, 16 Jun 2016 00:42:44 +0000 (08:42 +0800)]
IntelSiliconPkg/IgdOpRegion: Add definition for Intel IGD
 OpRegion.

Add IGD OpRegion definition from Intel Integrated Graphics Device OpRegion
Specification.
at https://01.org/sites/default/files/documentation/acpi_igd_opregion_spec_0.pdf

Previous submission seems appears to be cut off. I do not know why.
Add missing part here.

Cc: Giri P Mudusuru <giri.p.mudusuru@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>
7 years agoArmPkg/ArmLib: avoid cache maintenance in PEIMs when executing in place
Ard Biesheuvel [Thu, 12 May 2016 13:52:59 +0000 (15:52 +0200)]
ArmPkg/ArmLib: avoid cache maintenance in PEIMs when executing in place

On some platforms, performing cache maintenance on regions that are backed
by NOR flash result in SErrors. Since cache maintenance is unnecessary in
that case, create a PEIM specific version that only performs said cache
maintenance in its constructor if the module is shadowed in RAM. To avoid
performing the cache maintenance if the MMU code is not used to begin with,
check that explicitly in the constructor.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Tested-by: Heyi Guo <heyi.guo@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
7 years agoArmPlatformPkg: Fix PL011 Glitches.
Evan Lloyd [Wed, 15 Jun 2016 12:52:43 +0000 (13:52 +0100)]
ArmPlatformPkg: Fix PL011 Glitches.

This change corrects 3 problems in the PL011 driver.
1. The TRM states "The UARTLCR_H, UARTIBRD, and UARTFBRD registers must
   not be changed:...when the UART is enabled"
2. The TRM (3.3.8) describes logic requiring the UART to be disabled and
   flushed before adjusting UARTCR.
3. Several redundant calls get made to PL011UartInitializePort, where
   the characteristics do not change, but updating the registers can
   cause glitches in the output stream.

The parameters are compared to the current state and no action taken if
no change of state is required.
Where an update is required, the specified logic is followed, and the
register updates only made when the UART is disabled.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
Tested-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Ryan Harkin <ryan.harkin@linaro.org>
7 years agoArmVirtPkg/FdtPL011SerialPortLib: Set the PL011 UART clock rate
Evan Lloyd [Wed, 15 Jun 2016 12:52:42 +0000 (13:52 +0100)]
ArmVirtPkg/FdtPL011SerialPortLib: Set the PL011 UART clock rate

The interface to PL011UartInitializePort has changed in
ArmPlatformPkg/Drivers/PL011Uart with the title:
"ArmPlatformPkg: Add support to configure PL011 UART clock"

This patch updates the calls to PL011UartInitializePort(), in line with
that change, adding a parameter value using the PCD previously used
directly by the driver.

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: Laszlo Ersek <lersek@redhat.com>
7 years agoArmPlatformPkg: Add support to configure PL011 UART clock
Evan Lloyd [Wed, 15 Jun 2016 12:52:41 +0000 (13:52 +0100)]
ArmPlatformPkg: Add support to configure PL011 UART clock

On some platforms the UART clock is not the same for all the serial
ports. The PL011 driver must be capable of handling serial ports with
different clock rates, so must not rely on a PCD for the clock rate.

This patch allows the UART clock rate to be passed as a parameter
to PL011UartInitializePort(), which is called from the serial port
library. This patch also contains the corresponding changes in the
serial port library.

The PCD in Drivers/PL011Uart is replaced by an extra parameter for
PL011UartInitializePort.  The PCD is moved to Library/PL011SerialPortLib
to supply the value to pass.

A corresponding patch to ArmVirtPkg is included in the same bundle to
align that with these changes.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
Tested-by: Ryan Harkin <ryan.harkin@linaro.org>
7 years agoArmPlatformPkg: Remove double write in PL011
Evan Lloyd [Wed, 15 Jun 2016 12:52:40 +0000 (13:52 +0100)]
ArmPlatformPkg: Remove double write in PL011

The variable LineControl was initialised to zero, then updated in a
condition.  This change converts that to a write in each branch of the
condition, removing the Write/Read/Modify/Write sequence.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
Tested-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Ryan Harkin <ryan.harkin@linaro.org>
7 years agoArmPlatformPkg: Update PL011 Serial PCDs to Fixed PCDs
Evan Lloyd [Wed, 15 Jun 2016 12:52:39 +0000 (13:52 +0100)]
ArmPlatformPkg: Update PL011 Serial PCDs to Fixed PCDs

The PCDs used in the PL011 UART Driver and Serial Port Library are
inherently "fixed at build".  This change updates the source to use
Fixed PCDs for these values.  This improves clarity and efficiency.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
Tested-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Ryan Harkin <ryan.harkin@linaro.org>
7 years agoArmPlatformPkg: Tidy PL011 UART driver
Evan Lloyd [Wed, 15 Jun 2016 12:52:38 +0000 (13:52 +0100)]
ArmPlatformPkg: Tidy PL011 UART driver

This cosmetic change only tidies things up in preparation for actual
updates. (This reflects responses to a previously submitted patch,
which has been split into several discrete changes.)
There are no functional changes in this commit.
Changes comprise:
  Minor corrections to comment typos.
  Minor formatting mods.
  Expansion of function comments.
  Remove OUT from UartBase parameter.
  Addition of #define for "magic mumbers".

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
Reviewed-by: Ryan Harkin <ryan.harkin@linaro.org>
7 years agoMdeModulePkg/Database: Fix incorrect calculation of baseline in FontPackage
Dandan Bi [Wed, 8 Jun 2016 06:13:36 +0000 (14:13 +0800)]
MdeModulePkg/Database: Fix incorrect calculation of baseline in FontPackage

When adding font package, there exists the case that only have the
EFI_HII_GIBT_GLYPH_DEFAULT or EFI_HII_GIBT_GLYPHS_DEFAULT glyph block
and use the default cell info in font package fixed header. In this
case, we can't get the correct baseline now. This patch is to fix this
issue by recalculating the baseline when the glyph block type is
EFI_HII_GIBT_GLYPH_DEFAULT or EFI_HII_GIBT_GLYPHS_DEFAULT.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoIntelSiliconPkg/IgdOpRegion: Add definition for Intel IGD OpRegion.
Jiewen Yao [Wed, 1 Jun 2016 01:49:42 +0000 (09:49 +0800)]
IntelSiliconPkg/IgdOpRegion: Add definition for Intel IGD OpRegion.

Add IGD OpRegion definition from Intel Integrated Graphics Device OpRegion
Specification.
at https://01.org/sites/default/files/documentation/acpi_igd_opregion_spec_0.pdf

Cc: Giri P Mudusuru <giri.p.mudusuru@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>
7 years agoIntelSiliconPkg: Add initial version.
Jiewen Yao [Wed, 1 Jun 2016 01:48:38 +0000 (09:48 +0800)]
IntelSiliconPkg: Add initial version.

This package will include open source common Intel silicon related modules.

Cc: Giri P Mudusuru <giri.p.mudusuru@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>
7 years agoBaseTools: ignore the binary LIB file in gen_libs
Yonghong Zhu [Mon, 13 Jun 2016 10:00:52 +0000 (18:00 +0800)]
BaseTools: ignore the binary LIB file in gen_libs

For single module build, it would call gen_libs target. then if it use
binary LIB file, it cause build failure.

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 agoNetworkPkg/TcpDxe: Fix GCC build failure
Jiaxin Wu [Tue, 14 Jun 2016 02:41:55 +0000 (10:41 +0800)]
NetworkPkg/TcpDxe: Fix GCC build failure

Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Zhang Lubo <lubo.zhang@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
7 years agoMdeModulePkg/UiApp: Fix the incorrect use of the HiiHandle
Dandan Bi [Wed, 8 Jun 2016 08:46:55 +0000 (16:46 +0800)]
MdeModulePkg/UiApp: Fix the incorrect use of the HiiHandle

In current code, when adding string package, it will return
'gStringPackHandle'. But the code use the 'gHiiHandle' to get
string. It is incorrect. This patch is to fix this issue.

Cc: Eric Dong <eric.dong@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
7 years agoIntelFrameworkModulePkg/LegacyBios: Get SIO data from SIO interface
Ruiyu Ni [Sun, 12 Jun 2016 08:07:34 +0000 (16:07 +0800)]
IntelFrameworkModulePkg/LegacyBios: Get SIO data from SIO interface

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
7 years agoIntelFrameworkModulePkg/LegacyBios: Get COM base from SerialIo parent
Ruiyu Ni [Sun, 12 Jun 2016 07:07:17 +0000 (15:07 +0800)]
IntelFrameworkModulePkg/LegacyBios: Get COM base from SerialIo parent

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
7 years agoIntelFrameworkModulePkg/LegacyBios: Rename local variables
Ruiyu Ni [Sun, 12 Jun 2016 06:58:00 +0000 (14:58 +0800)]
IntelFrameworkModulePkg/LegacyBios: Rename local variables

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
7 years agoIntelFrameworkModulePkg/LegacyBios: return NotFound when IsaIo absent
Ruiyu Ni [Sun, 12 Jun 2016 06:54:02 +0000 (14:54 +0800)]
IntelFrameworkModulePkg/LegacyBios: return NotFound when IsaIo absent

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
7 years agoIntelFrameworkModulePkg/LegacyBios: Get SIO data in separate function
Ruiyu Ni [Sun, 12 Jun 2016 06:45:53 +0000 (14:45 +0800)]
IntelFrameworkModulePkg/LegacyBios: Get SIO data in separate function

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
7 years agoMdeModulePkg DxeS3BootScriptLib: Check (mSmst != NULL) before freeing SMRAM
Star Zeng [Sun, 12 Jun 2016 04:45:09 +0000 (12:45 +0800)]
MdeModulePkg DxeS3BootScriptLib: Check (mSmst != NULL) before freeing SMRAM

There is static scan tool reports BootScriptSave.c:628:'mSmst' is
explicitly dereferenced.

The patch is to check (mSmst != NULL) before freeing SMRAM at
BootScriptSave.c:628.

Cc: Shumin Qiu <shumin.qiu@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: Shumin Qiu <shumin.qiu@intel.com>
7 years agoNetworkPkg: Fix DNS GeneralLookUp failure in some case
Jiaxin Wu [Mon, 6 Jun 2016 05:30:22 +0000 (13:30 +0800)]
NetworkPkg: Fix DNS GeneralLookUp failure in some case

QClass value may be not equal to 1(DNS_CLASS_INET) when
GeneralLookUp query is called. So, remove QClass value check.
Moreover, the 'Identification' and 'Type' filed in Query packet
should not be changed to little endian since the packet maybe
retransmitted while there is any error happened.

Cc: Ye Ting <ting.ye@intel.com>
Cc: Zhang Lubo <lubo.zhang@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Zhang Lubo <lubo.zhang@intel.com>
7 years agoNetworkPkg: Remove TokenEntry from Token list before freed
Jiaxin Wu [Thu, 2 Jun 2016 08:23:16 +0000 (16:23 +0800)]
NetworkPkg: Remove TokenEntry from Token list before freed

TokenEntry should be removed from Token list before freed.
Otherwise, invalid TokenEntry will be existed in Token list.

Cc: Ye Ting <ting.ye@intel.com>
Cc: Zhang Lubo <lubo.zhang@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Zhang Lubo <lubo.zhang@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
7 years agoNetworkPkg: Fix IPv6 boot failure in diff net segment issue
Jiaxin Wu [Thu, 2 Jun 2016 06:50:07 +0000 (14:50 +0800)]
NetworkPkg: Fix IPv6 boot failure in diff net segment issue

This patch is used to fix HTTP IPv6 boot failure in diff net segment
issue. IPv6 gateway address should be registered before DNS query,
otherwise, DNS query will fail.

Cc: Ye Ting <ting.ye@intel.com>
Cc: Zhang Lubo <lubo.zhang@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Zhang Lubo <lubo.zhang@intel.com>
7 years agoNetworkPkg: Handling timeout case in httpboot driver
Jiaxin Wu [Tue, 31 May 2016 14:17:28 +0000 (22:17 +0800)]
NetworkPkg: Handling timeout case in httpboot driver

This patch is used to handle timeout case when downloading
the message. The Status in the token should also be checked
to handle any response error case including timeout case.

Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Zhang Lubo <lubo.zhang@intel.com>
Cc: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>
Cc: Gary Lin <glin@suse.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Gary Lin <glin@suse.com>
Reviewed-by: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Tested-by: Gary Lin <glin@suse.com>
Tested-by: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>
7 years agoNetworkPkg: HttpDxe response/cancel issue fix
Jiaxin Wu [Tue, 31 May 2016 14:17:27 +0000 (22:17 +0800)]
NetworkPkg: HttpDxe response/cancel issue fix

Remove timeout check for http body message receive. It should be handled
in HttpBootDxe driver for http response unblocking implementation. After
timeout removed, the Wrap date should not be freed immediately. Only the
TCP CompletionToken in Wrap date is canceled or signaled, the Wrap date
could be freed.
In addition, Http cancel token is also incorrect. Tcp Cancel should be called
to cancel TCP CompletionToken in Wrap date before close it directly. Otherwise,
some exception behavior may happened.
This patch also refine the coding style for HttpDxe driver.

Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Zhang Lubo <lubo.zhang@intel.com>
Cc: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>
Cc: Gary Lin <glin@suse.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Gary Lin <glin@suse.com>
Reviewed-by: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Tested-by: Gary Lin <glin@suse.com>
Tested-by: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>
7 years agoNetworkPkg: Support TCP Cancel function
Jiaxin Wu [Tue, 31 May 2016 14:17:26 +0000 (22:17 +0800)]
NetworkPkg: Support TCP Cancel function

This path is used to support TCP Cancel function to abort an
asynchronous connection, listen, transmission or receive request.

If any TCP CompletionToken is not signaled, it should not be closed
directly by calling CloseEvent (Still in the TCP TokenList). If not,
any exception behavior may be triggered. We should cancel it by calling
Tcp->Cancel() first. In such a case, TCP Cancel function is
necessary.

Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Zhang Lubo <lubo.zhang@intel.com>
Cc: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>
Cc: Gary Lin <glin@suse.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Gary Lin <glin@suse.com>
Reviewed-by: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Tested-by: Gary Lin <glin@suse.com>
Tested-by: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>
7 years agoSecurityPkg: Tcg2Smm: Enhance TIS interface detection
Zhang, Chao B [Sun, 12 Jun 2016 02:23:16 +0000 (10:23 +0800)]
SecurityPkg: Tcg2Smm: Enhance TIS interface detection

TCG PC Client PTP spec defines that if InterfaceType is defined as TIS1.3. All the other fields of the FIFO Interface Identifier Register are skipped.
http://www.trustedcomputinggroup.org/pc-client-specific-platform-tpm-profile-for-tpm-2-0-v43-150126/

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 agoIntelFrameworkModulePkg: Correct the usage of gPerformanceProtocolGuid in inf
Star Zeng [Wed, 8 Jun 2016 07:16:42 +0000 (15:16 +0800)]
IntelFrameworkModulePkg: Correct the usage of gPerformanceProtocolGuid in inf

Add gPerformanceProtocolGuid in BdsDxe.inf explicitly.
Currently, BdsDxe could build pass as it inherits
gPerformanceProtocolGuid from GenericBdsLib.inf.

Also update the usage of gPerformanceProtocolGuid in GenericBdsLib.inf.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoMdeModulePkg: Correct the usage of gPerformanceProtocolGuid in inf
Star Zeng [Wed, 8 Jun 2016 07:15:03 +0000 (15:15 +0800)]
MdeModulePkg: Correct the usage of gPerformanceProtocolGuid in inf

Add gPerformanceProtocolGuid in BdsDxe.inf explicitly.
Currently, BdsDxe could build pass as it inherits
gPerformanceProtocolGuid from UefiBootManagerLib.inf.

Also update the usage of gPerformanceProtocolGuid in UefiBootManagerLib.inf.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoMdeModulePkg/RamDiskDxe: Add Memory Type selection support in Ramdisk HII
Tapan Shah [Thu, 2 Jun 2016 18:34:10 +0000 (02:34 +0800)]
MdeModulePkg/RamDiskDxe: Add Memory Type selection support in Ramdisk HII

Adding an option in HII menu so user can choose memory type to use when
creating a RAM Disk in system.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Tapan Shah <tapandshah@hpe.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com>
7 years agoMdeModulePkg RamDiskDxe: Do not save 'Size' numeric value by varstore
Hao Wu [Mon, 6 Jun 2016 05:02:52 +0000 (13:02 +0800)]
MdeModulePkg RamDiskDxe: Do not save 'Size' numeric value by varstore

The 'Size' numeric value used when creating a raw RAM disk does not
require a varstore to save its previous value in the create raw RAM disk
HII page.

The expecting behavior is that after a user created a raw RAM disk, the
next time when the create raw RAM disk page is entered, the 'Size' numeric
will be the default value (EFI_PAGE_SIZE).

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Tapan Shah <tapandshah@hpe.com>
7 years agoSecurityPkg: Tcg2Smm: Make TCG2 PP version configurable
Zhang, Chao B [Wed, 8 Jun 2016 07:35:16 +0000 (15:35 +0800)]
SecurityPkg: Tcg2Smm: Make TCG2 PP version configurable

Make TCG2 PP version configurable to meet different request. Current default version is 1.3.
http://www.trustedcomputinggroup.org/physical-presence-interface_1-30_0-52/

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>
7 years agoVlv2TbltDevicePkg:Change flash layout to fix the Fv space is not enough.
lushifex [Wed, 8 Jun 2016 02:22:19 +0000 (10:22 +0800)]
Vlv2TbltDevicePkg:Change flash layout to fix the Fv space is not enough.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: lushifex <shifeix.a.lu@intel.com>
Reviewed-by: David Wei <david.wei@intel.com>
7 years agoVlv2TbltDevicePkg: Convert UNIX to DOS format.
lushifex [Wed, 8 Jun 2016 02:15:48 +0000 (10:15 +0800)]
Vlv2TbltDevicePkg: Convert UNIX to DOS format.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: lushifex <shifeix.a.lu@intel.com>
Reviewed-by: David Wei <david.wei@intel.com>
7 years agoMdeModulePkg: Fix IPv4 UseDefaultAddress failure case.
Jiaxin Wu [Wed, 8 Jun 2016 02:41:39 +0000 (10:41 +0800)]
MdeModulePkg: Fix IPv4 UseDefaultAddress failure case.

This patch is used to update IP4->Configure() to allow the upper layer
modules to obtain a default address by setting UseDefaultAddress to TRUE
when default address is not available yet.

Cc: Ye Ting <ting.ye@intel.com>
Cc: El-Haj-Mahmoud Samer <samer.el-haj-mahmoud@hpe.com>
Cc: Subramanian Sriram <sriram-s@hpe.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Sriram Subramanian <sriram-s@hpe.com>
Tested-by: Sriram Subramanian <sriram-s@hpe.com>
7 years agoSecurityPkg : Tpm12DeviceLibDTpm: Fix TPM12 wrong Response Tag check
Zhang, Chao B [Tue, 7 Jun 2016 02:15:07 +0000 (10:15 +0800)]
SecurityPkg : Tpm12DeviceLibDTpm: Fix TPM12 wrong Response Tag check

TcgDxePassThroughToTpm should be able to handle all TPM12 Command & Response correctly.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chao Zhang <chao.b.zhang@intel.com>
Reviewed-by: Long Qin <qin.long@intel.com>
7 years agoUefiCpuPkg/MtrrLib: Fixed bug if length is less than Fixed-MTRR range
Jeff Fan [Mon, 6 Jun 2016 02:04:11 +0000 (10:04 +0800)]
UefiCpuPkg/MtrrLib: Fixed bug if length is less than Fixed-MTRR range

Currently, if the memory length to be programmed is less than the remaining size
of one Fixed-MTRR supported, RETURN_UNSUPPORTED returned. This is not correct.
This is one regression at 07e889209034ba94bfac9e765b8a50ef344daef2 when we
updated ProgramFixedMtrr() to remove the loop of calculating Fixed-MTRR Mask.

This fix will calculate Right offset in Fixed-MTRR beside left offset. It
supports small length (less than remaining size supported by Fixed-MTRR) to be
programmed.

Cc: Eric Dong <eric.dong@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
7 years agoMdeModulePkg DxeS3BootScriptLib: Revert git commit 058196bbb345
Star Zeng [Mon, 6 Jun 2016 10:27:16 +0000 (18:27 +0800)]
MdeModulePkg DxeS3BootScriptLib: Revert git commit 058196bbb345

With a destructor implemented, the shortcut from 058196bbb345
should be unnecessary.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Suggested-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
7 years agoMdeModulePkg DxeS3BootScriptLib: Add DESTRUCTOR S3BootScriptLibDeinitialize
Star Zeng [Wed, 25 May 2016 05:11:17 +0000 (13:11 +0800)]
MdeModulePkg DxeS3BootScriptLib: Add DESTRUCTOR S3BootScriptLibDeinitialize

PiDxeS3BootScriptLib has a constructor S3BootScriptLibInitialize() that
registers ready-to-lock callback S3BootScriptSmmEventCallBack() and several
more. The library is linked to SMM modules. If the module entry-point
function returns error (because of lack of resources, unsupported,
whatever), the module will be unloaded and the notify callback pointers
will point to undefined memory. On ready-to-lock exception occurs when
calling S3BootScriptSmmEventCallBack(), and probably all the other
callbacks registered by the constructor would also cause exception.

This patch is to implement library Destructor to free the resources
allocated by S3BootScriptLibInitialize() and unregister callbacks.

Cc: Jiewen Yao <jiewen.yao@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: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
7 years agoMdeModulePkg SmmLockBoxSmmLib: Add DESTRUCTOR SmmLockBoxSmmDestructor
Star Zeng [Thu, 26 May 2016 05:21:08 +0000 (13:21 +0800)]
MdeModulePkg SmmLockBoxSmmLib: Add DESTRUCTOR SmmLockBoxSmmDestructor

SmmLockBoxSmmLib is linked to SMM modules. If the module entry-point
function returns error, the module will be unloaded and the global
variables will point to undefined memory.

This patch is to add DESTRUCTOR SmmLockBoxSmmDestructor to uninstall
SmmLockBoxCommunication configuration table if it has been installed
in Constructor.

Cc: Jiewen Yao <jiewen.yao@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: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
7 years agoMdeModulePkg SmmLockBoxSmmLib: Fix typo in SmmLockBoxSmmConstructuor
Star Zeng [Mon, 6 Jun 2016 09:25:43 +0000 (17:25 +0800)]
MdeModulePkg SmmLockBoxSmmLib: Fix typo in SmmLockBoxSmmConstructuor

SmmLockBoxSmmConstructuor should be SmmLockBoxSmmConstructor.

Cc: Jiewen Yao <jiewen.yao@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: Laszlo Ersek <lersek@redhat.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
7 years agoMdeModulePkg/AtaBusDxe: Fix some ATA hard drives cannot be discovered
Cinnamon Shia [Mon, 6 Jun 2016 04:07:58 +0000 (12:07 +0800)]
MdeModulePkg/AtaBusDxe: Fix some ATA hard drives cannot be discovered

If there is no multiplier, the DEV bit of the ATA device register would
always be set. It causes that some ATA hard drives don't response the
ATA identity command sent to them.

Below is the description about DEV bit in ATA spec:
A device is selected when the DEV bit of the Device register is equal to
the device number assigned to the device by means of a Device 0/Device 1
jumper or switch, or use of the CSEL signal.

Below is the description about DEV bit in SATA spec:
When the DEV bit in the Device register is set to one, selecting the
non-existent Device 1, the host adapter shall respond to register reads
and writes as specified for a Device 0 with no Device 1 present, as
defined in the ATA/ATAPI-5 standard.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Cinnamon Shia <cinnamon.shia@hpe.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
7 years agoArmVirtPkg/PlatformBootManagerLib: introduce the progress bar
Laszlo Ersek [Wed, 25 May 2016 12:00:06 +0000 (14:00 +0200)]
ArmVirtPkg/PlatformBootManagerLib: introduce the progress bar

ArmVirtPkg's Platform BDS has never had a progress bar. We can easily add
one, by copying the PlatformBootManagerWaitCallback() function verbatim
from

  Nt32Pkg/Library/PlatformBootManagerLib/PlatformBootManager.c

It can be tested by passing the following option to QEMU (5 seconds):

  -boot menu=on,splash-time=5000

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
7 years agoArmVirtPkg/PlatformBootManagerLib: rebase boot logo display to BootLogoLib
Laszlo Ersek [Wed, 25 May 2016 11:08:15 +0000 (13:08 +0200)]
ArmVirtPkg/PlatformBootManagerLib: rebase boot logo display to BootLogoLib

In the course of porting ArmVirtPkg to the MdeModulePkg BDS, commit
1f73aef50c5e

  ArmVirtPkg/PlatformBootManagerLib: add EnableQuietBoot & DisableQuietBoot

open-coded the EnableQuietBoot() function (and its dependencies / friends)
from IntelFrameworkModulePkg BDS.

This code duplication can be avoided; the functionality is available from
the following three libraries in MdeModulePkg:

- BootLogoLib: provides the BootLogoEnableLogo() function. It does not
  provide the internal ConvertBmpToGopBlt() function -- that one is
  delegated to ImageDecoderLib (function DecodeImage()).

- ImageDecoderLib: a general library that registers decoder plugins for
  specific image formats, and provides the generic DecodeImage() on top.

- BmpImageDecoderLib: one of said decoder plugins, for handling BMP images
  (which is the format of our logo).

In this patch, we revert 1f73aef50c5e, and atomically incorporate the
above libraries. This is inspired by Nt32Pkg commit 859e75c4fc42:

  Nt32Pkg: Use BootLogoLib for logo and progress bar drawing.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
7 years agoOvmfPkg: set SMM stack size to 16KB
Laszlo Ersek [Wed, 1 Jun 2016 17:59:52 +0000 (19:59 +0200)]
OvmfPkg: set SMM stack size to 16KB

The default stack size (from UefiCpuPkg/UefiCpuPkg.dec) is 8KB, which
proved too small (i.e., led to stack overflow) across commit range
98c2d9610506^..f85d3ce2efc2^, during certificate enrollment into "db".

As the edk2 codebase progresses and OVMF keeps including features, the
stack demand constantly fluctuates; double the SMM stack size for good
measure.

Cc: Jeff Fan <jeff.fan@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Ref: http://thread.gmane.org/gmane.comp.bios.edk2.devel/12864
Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1341733
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
7 years agoUefiCpuPkg: change PcdCpuSmmStackGuard default to TRUE
Laszlo Ersek [Wed, 1 Jun 2016 17:23:20 +0000 (19:23 +0200)]
UefiCpuPkg: change PcdCpuSmmStackGuard default to TRUE

This Feature PCD causes PiSmmCpuDxe to catch SMM stack overflow at
runtime, logging a clear error message, and entering a CPU dead loop.
Compared to the chaotic and catastrophic consequences of the stack leaking
into, and corrupting, the SMM page table, a stack guard that is enabled by
default is vastly superior.

We should not require sane platforms to explicitly opt in to this
safeguard; instead, we should require platforms that prefer to live
dangerously to opt out of it.

Stack overflow in SMM might even give rise to security vulnerabilities.

Cc: Jeff Fan <jeff.fan@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Ref: http://thread.gmane.org/gmane.comp.bios.edk2.devel/12864
Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1341733
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
7 years agoMdeModulePkg/HiiDatabase: Remove the incorrect calculation of font baseline
Dandan Bi [Tue, 31 May 2016 09:52:19 +0000 (17:52 +0800)]
MdeModulePkg/HiiDatabase: Remove the incorrect calculation of font baseline

When add Font Package, the cell in EFI_HII_FONT_PACKAGE_HDR
contains the measurement of the widest and tallest characters
in the font. The measurement may be not absolutely correct,
so when use this cell information to calculate the baseline may
cause incorrect result. Besides this calculation is not necessary.
So remove it now.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoMdeModulePkg/HiiDatabase: Preinit background when render string to screen
Dandan Bi [Tue, 31 May 2016 08:44:47 +0000 (16:44 +0800)]
MdeModulePkg/HiiDatabase: Preinit background when render string to screen

When render string to screen, for proportional fonts,
the background color may not set to the whole BltBuffer.
And this will cause incorrect display.
Now initialize the background color to fix this issue.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoMdePkg/BaseLib: Add 2 more safe string functions.
Jiewen Yao [Thu, 2 Jun 2016 14:38:23 +0000 (22:38 +0800)]
MdePkg/BaseLib: Add 2 more safe string functions.

Add UnicodeStrToAsciiStrS() and AsciiStrToUnicodeStrS() API.
These 2 safe version APIs are used to replace UnicodeStrToAsciiStr() and
AsciiStrToUnicodeStr() API.

The safe version string convert APIs use similar check as StrCpyS().

Cc: Liming Gao <Liming.Gao@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao <Jiewen.Yao@intel.com>
Reviewed-by: Liming Gao <Liming.Gao@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
7 years agoMdePkg/Hsti: Fix a memory allocation check issue.
Jiewen Yao [Thu, 2 Jun 2016 08:37:58 +0000 (16:37 +0800)]
MdePkg/Hsti: Fix a memory allocation check issue.

Cc: Liming Gao <Liming.Gao@intel.com>
Cc: Amy Chan <Amy.Chan@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao <Jiewen.Yao@intel.com>
Reviewed-by: Liming Gao <Liming.Gao@intel.com>
Reviewed-by: Amy Chan <Amy.Chan@intel.com>
7 years agoBaseTools: fix the bug to build a compressed ROM image via .INF file
Yonghong Zhu [Fri, 3 Jun 2016 02:01:53 +0000 (10:01 +0800)]
BaseTools: fix the bug to build a compressed ROM image via .INF file

Fix the bug that always use the '-e' as OPTROM_FLAGS even the .INF file
has statement 'PCI_COMPRESS  = TRUE'.

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 agoBaseTools: Add error handling for current_dir is not exist
Yonghong Zhu [Fri, 3 Jun 2016 01:29:06 +0000 (09:29 +0800)]
BaseTools: Add error handling for current_dir is not exist

Add the error handling to cover the case that current_dir is not exist.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoMdeModulePkg:Prevent the BmRepairAllControllers routine in an infinite loop
Gary Li [Fri, 3 Jun 2016 07:21:26 +0000 (15:21 +0800)]
MdeModulePkg:Prevent the BmRepairAllControllers routine in an infinite loop

Prevent the BmRepairAllControllers routine in an infinite loop

Contributed-under: TianoCore Contribution Agreement 1.0

Signed-off-by: Gary Li <garyli@hpe.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoSecurityPkg EsalVariableDxeSal: Use input Global to make code more clear
Star Zeng [Thu, 2 Jun 2016 06:38:03 +0000 (14:38 +0800)]
SecurityPkg EsalVariableDxeSal: Use input Global to make code more clear

SecurityPkg\VariableAuthenticated\EsalVariableDxeSal\Variable.c
AutoUpdateLangVariable()
Global->PlatformLangCodes[VirtualMode] = AllocateRuntimeCopyPool
  (DataSize, Data);
ASSERT (mVariableModuleGlobal->PlatformLangCodes[VirtualMode] != NULL);

The patch is to use Global instead of mVariableModuleGlobal in the
ASSERT (XXX) to make code more clear although mVariableModuleGlobal is
equal to Global actually.

Cc: Chao Zhang <chao.b.zhang@intel.com>
Cc: Amy Chan <amy.chan@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
Reviewed-by: Amy Chan <amy.chan@intel.com>
Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>
7 years agoOvmfPkg/PlatformBootManagerLib: Connect the Xen drivers before loading NvVars
Gary Lin [Wed, 1 Jun 2016 10:26:20 +0000 (18:26 +0800)]
OvmfPkg/PlatformBootManagerLib: Connect the Xen drivers before loading NvVars

When OVMF tried to load the file-based NvVars, it checked all the PCI
instances and connected the drivers to the mass storage device. However,
Xen registered its PCI device with a special class id (0xFF80), so
ConnectRecursivelyIfPciMassStorage() couldn't recognize it and skipped the
driver connecting for Xen PCI devices. In the end, the Xen block device
wasn't initialized until EfiBootManagerConnectAll() was called, and it's
already too late to load NvVars.

This commit connects the Xen drivers in ConnectRecursivelyIfPciMassStorage()
so that Xen can use the file-based NvVars.

v3:
* Introduce XenDetected() to cache the result of Xen detection instead
  of relying on PcdPciDisableBusEnumeration.

v2:
* Cosmetic changes

Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gary Lin <glin@suse.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
7 years agoMdeModulePkg NvmExpressDxe: Fix invalid queue size when creating IO queues
Hao Wu [Wed, 1 Jun 2016 08:32:03 +0000 (16:32 +0800)]
MdeModulePkg NvmExpressDxe: Fix invalid queue size when creating IO queues

The Maximum Queue Entries Supported (MQES) field in the CAP (Controller
Capabilities) register for a NVMe controller restrict the maximum
individual queue size that the controller supports.

The origin code does not check this value and always uses a hardcode value
when creating I/O submission/completion queues for asynchronous
transmission. The hardcode value might be larger than the MQES field, this
will lead to an 'Invalid Queue Size' error when creating I/O
submission/completion queues.

The patch will add checks to make sure proper queue size is passed when
creating I/O submission/completion queues.

Cc: Feng Tian <feng.tian@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Feng Tian <feng.tian@Intel.com>
7 years agoMdePkg: Follow PI1.4a update SmmStartupThisAP() description
Jeff Fan [Wed, 1 Jun 2016 08:21:06 +0000 (16:21 +0800)]
MdePkg: Follow PI1.4a update SmmStartupThisAP() description

Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoMdePkg: Follow PI1.4a update EFI_SEC_PLATFORM_INFORMATION2 description
Jeff Fan [Wed, 1 Jun 2016 08:06:53 +0000 (16:06 +0800)]
MdePkg: Follow PI1.4a update EFI_SEC_PLATFORM_INFORMATION2 description

Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoMdePkg: Follow PI1.4a to update EFI_SMM_SW_REGISTER2 return status
Jeff Fan [Wed, 1 Jun 2016 08:01:07 +0000 (16:01 +0800)]
MdePkg: Follow PI1.4a to update EFI_SMM_SW_REGISTER2 return status

Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoBaseTools: Bash script fix for PosixLike/LzmaF86Compress
Thomas Palmer [Wed, 1 Jun 2016 16:35:39 +0000 (00:35 +0800)]
BaseTools: Bash script fix for PosixLike/LzmaF86Compress

Add missing "done" token needed to complete the for loop. Tested in
Ubuntu 14.04

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Thomas Palmer <thomas.palmer@hpe.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoMdeModulePkg: Fix SNP.Initialize() spec conformance issue
Jiaxin Wu [Thu, 26 May 2016 01:06:04 +0000 (09:06 +0800)]
MdeModulePkg: Fix SNP.Initialize() spec conformance issue

v2:
*Refine the coding style according edk2 community's feedback.

Current SNP UNDI Initialize command does not follow the UEFI Spec
to update the SNP MediaPresent field. The result for the Initialize
command execution check should be:
StatFlags: (1) Monitor the upper two bits (14 & 15) in the field to know
whether the command has been executed by the UNDI (Not started, Queued,
Error, Complete). (2) Check the other field to see if there is an active
connection to this network device (used to update MediaPresent).
StatCode: After command execution completes, either successfully or not,
this field contains the result of the command execution (success or failure).
This patch is used to fix it.

NOTE: If any UNDI driver does not follow the UEFI Spec for the media status
update, it may meet failure with this more conditions check (StatFlags).

Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
7 years agoIntelFsp2Pkg/Tools: Add FSP rebasing function into SplitFspBin tool
Maurice Ma [Fri, 27 May 2016 20:26:28 +0000 (13:26 -0700)]
IntelFsp2Pkg/Tools: Add FSP rebasing function into SplitFspBin tool

Enhanced the SplitFspBin tool in IntelFsp2Pkg to support:
  - Rebase FSP 2.0 components to a different base address
  - Display FSP 2.0 information header

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: Giri P Mudusuru <giri.p.mudusuru@intel.com>
7 years agoIntelFsp2Pkg: Add missing OEM status code defines.
Giri P Mudusuru [Tue, 31 May 2016 19:46:37 +0000 (12:46 -0700)]
IntelFsp2Pkg: Add missing OEM status code defines.

Adding defines from FSP EAS v2.0 section 11.2.2 Oem Status code.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Maurice Ma <maurice.ma@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>
Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
Reviewed-by: Maurice Ma <maurice.ma@intel.com>
7 years agoUefiCpuPkg/CpuMpPei: Consume CpuExceptionHandlerLib
Jeff Fan [Tue, 24 May 2016 13:42:19 +0000 (21:42 +0800)]
UefiCpuPkg/CpuMpPei: Consume CpuExceptionHandlerLib

Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Jiewen Yao <jiewen.yao@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: Feng Tian <feng.tian@intel.com>
7 years agoUefiCpuPkg/ExceptionLib: Import PeiCpuExceptionHandlerLib module
Jeff Fan [Tue, 24 May 2016 13:39:35 +0000 (21:39 +0800)]
UefiCpuPkg/ExceptionLib: Import PeiCpuExceptionHandlerLib module

This module could be linked by CpuMpPei driver to handle reserved vector list
and provide spin lock for BSP/APs to prevent dump message corrupted.

Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Jiewen Yao <jiewen.yao@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: Feng Tian <feng.tian@intel.com>
7 years agoUefiCpuPkg/ExceptionLib: Move global variable location
Jeff Fan [Tue, 24 May 2016 13:35:24 +0000 (21:35 +0800)]
UefiCpuPkg/ExceptionLib: Move global variable location

Move some global variables location from PeiDxeSmmCpuException.c to
DxeCpuException.c and SmmCpuException.c. And remove some un-used global
vairables.

Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Jiewen Yao <jiewen.yao@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: Feng Tian <feng.tian@intel.com>
7 years agoUefiCpuPkg/ExceptionLib: Add CommonExceptionHandlerWorker()
Jeff Fan [Tue, 24 May 2016 13:31:11 +0000 (21:31 +0800)]
UefiCpuPkg/ExceptionLib: Add CommonExceptionHandlerWorker()

Add internal worker function RegisterCpuInterruptHandlerWorker().

Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Jiewen Yao <jiewen.yao@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: Feng Tian <feng.tian@intel.com>
7 years agoUefiCpuPkg/ExceptionLib: Update RegisterCpuInterruptHandlerWorker()
Jeff Fan [Tue, 24 May 2016 13:25:17 +0000 (21:25 +0800)]
UefiCpuPkg/ExceptionLib: Update RegisterCpuInterruptHandlerWorker()

Add parameter CpuExceptionData for RegisterCpuInterruptHandlerWorker().

Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Jiewen Yao <jiewen.yao@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: Feng Tian <feng.tian@intel.com>
7 years agoUefiCpuPkg/ExceptionLib: Update UpdateIdtTable()
Jeff Fan [Tue, 24 May 2016 13:09:22 +0000 (21:09 +0800)]
UefiCpuPkg/ExceptionLib: Update UpdateIdtTable()

Add parameter CpuExceptionData for UpdateIdtTable().

Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Jiewen Yao <jiewen.yao@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: Feng Tian <feng.tian@intel.com>
7 years agoUefiCpuPkg/ExceptionLib: Update InitializeCpuExceptionHandlersWorker
Jeff Fan [Tue, 24 May 2016 13:00:02 +0000 (21:00 +0800)]
UefiCpuPkg/ExceptionLib: Update InitializeCpuExceptionHandlersWorker

Add parameter CpuExceptionData for InitializeCpuExceptionHandlersWorker().

Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Jiewen Yao <jiewen.yao@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: Feng Tian <feng.tian@intel.com>
7 years agoUefiCpuPkg/ExceptionLib: Add EXCEPTION_HANDLER_DATA definition
Jeff Fan [Tue, 24 May 2016 12:21:04 +0000 (20:21 +0800)]
UefiCpuPkg/ExceptionLib: Add EXCEPTION_HANDLER_DATA definition

Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Jiewen Yao <jiewen.yao@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: Feng Tian <feng.tian@intel.com>
7 years agoUefiCpuPkg/ExceptionLib: Rename DxeSmmCpuException.c
Jeff Fan [Tue, 24 May 2016 03:00:17 +0000 (11:00 +0800)]
UefiCpuPkg/ExceptionLib: Rename DxeSmmCpuException.c

Rename DxeSmmCpuException.c to PeiDxeSmmCpuException.c that will be used by
PeiCpuExceptionHandlerLib.

Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Jiewen Yao <jiewen.yao@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: Feng Tian <feng.tian@intel.com>
7 years agoMdeModulePkg/SetupBrowser: Correct the incorrect variable name
Dandan Bi [Fri, 27 May 2016 02:47:58 +0000 (10:47 +0800)]
MdeModulePkg/SetupBrowser: Correct the incorrect variable name

Cc: Eric Dong <eric.dong@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
7 years agoOvmfPkg: raise DXEFV size to 10 MB
Gary Lin [Tue, 31 May 2016 03:41:46 +0000 (11:41 +0800)]
OvmfPkg: raise DXEFV size to 10 MB

We reached the size limit again.
Building OVMF with the following command

$ ./OvmfPkg/build.sh -D SECURE_BOOT_ENABLE -D NETWORK_IP6_ENABLE -D HTTP_BOOT_ENABLE

and it ended up with

GenFds.py...
GenFv: ERROR 3000: Invalid
 : error 7000: Failed to generate FV
  the required fv image size 0x900450 exceeds the set fv image size 0x900000

Since the new UEFI features, such as HTTPS, are coming, we need a
larger DEXFV eventually.

Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gary Lin <glin@suse.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
7 years agoNetworkPkg: Stop the timer before clean IP service.
Fu, Siyuan [Thu, 26 May 2016 01:04:07 +0000 (09:04 +0800)]
NetworkPkg: Stop the timer before clean IP service.

In Ip6CleanService()it first cleaned some resources, then stop the timer .
While before the timer stopped it may try to access some already freed
data, which may generate an exception.
This patch updates the driver to stop the timer event before starting to
clean up the service data.

Cc: Wu Jiaxin <jiaxin.wu@intel.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Subramanian Sriram <sriram-s@hpe.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com>
Reviewed-by: Sriram Subramanian <sriram-s@hpe.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
7 years agoMdeModulePkg: Stop the timer before clean IP service.
Fu, Siyuan [Thu, 26 May 2016 01:04:06 +0000 (09:04 +0800)]
MdeModulePkg: Stop the timer before clean IP service.

In Ip4CleanService()it first cleaned some resources, then stop the timer .
While before the timer stopped it may try to access some already freed
data, which may generate an exception.
This patch updates the driver to stop the timer event before starting to
clean up the service data.

Cc: Wu Jiaxin <jiaxin.wu@intel.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Subramanian Sriram <sriram-s@hpe.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com>
Reviewed-by: Sriram Subramanian <sriram-s@hpe.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
7 years agoMdeModulePkg RamDiskDxe: Fix VS2010 build error
Hao Wu [Fri, 27 May 2016 04:42:36 +0000 (12:42 +0800)]
MdeModulePkg RamDiskDxe: Fix VS2010 build error

Potentially uninitialized local variables 'TableKey' and 'TableHeader'
might be used in functions RamDiskPublishNfit() and RamDiskUnpublishNfit()
in file RamDiskProtocol.c.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Qiu Shumin <shumin.qiu@intel.com>
7 years agoMdeModulePkg/PiSmmIpl: Check order of EndOfDxe and DxeSmmReadyToLock
Jeff Fan [Mon, 23 May 2016 05:44:13 +0000 (13:44 +0800)]
MdeModulePkg/PiSmmIpl: Check order of EndOfDxe and DxeSmmReadyToLock

According to PI specification, EndOfDxe Event should be signaled before
DxeSmmReadyToLock protocol installation. This update is ASSERT if EndOfDxe
Event is not signaled when DxeSmmReadyToLock protocol installed. And do
REPORT_STATUS_CODE() also.

Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Jiewen Yao <jiewen.yao@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>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
7 years agoMdeModulePkg: Allow DxeIpl to load without permanent memory
Cohen, Eugene [Tue, 8 Dec 2015 14:42:52 +0000 (14:42 +0000)]
MdeModulePkg: Allow DxeIpl to load without permanent memory

PI1.4a spec added "For S3 resume boot modes DXE IPL must be
prepared to execute without permanent memory installed and
invoke the S3 resume modules."

To follow PI1.4a spec, this patch is to update DxeIpl and
PeiCore to enable S3 resume from temporary memory.
The normal boot path still enforces the permanent memory
requirement.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eugene Cohen <eugene@hp.com>
Signed-off-by: Star Zeng <star.zeng@intel.com>
Tested-by: Katie Dellaquila <katie.dellaquila@hp.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoCorebootModulePkg/PciHostBridgeLib: Fix PCI 64bit memory BAR size issue
Maurice Ma [Thu, 26 May 2016 22:13:23 +0000 (15:13 -0700)]
CorebootModulePkg/PciHostBridgeLib: Fix PCI 64bit memory BAR size issue

The current PCI 64bit memory BAR size calculation in PciHostBridgeLib
assumes all 32 bits in the upper BAR are fully writable. However,
platform might only support partial address programming, such as 40bit
PCI BAR address. In this case the complement cannot be used for size
calculation.  Instead, the lowest non-zero bit should be used for BAR
size calculation.

Cc: Prince Agyeman <prince.agyeman@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
Reviewed-by: Prince Agyeman <prince.agyeman@intel.com>
7 years agoCorebootModulePkg: Remove unused PCI non-enumeration drivers
Maurice Ma [Thu, 26 May 2016 18:12:46 +0000 (11:12 -0700)]
CorebootModulePkg: Remove unused PCI non-enumeration drivers

CorebootPayloadPkg has switched to use the generic PciBus and
PciHostBridge driver form MdeModulePkg. As a result, the
non-enumeration drivers including PciBusNoEnumerationDxe and
PciRootBridgenoEnumerationDxe need to be removed.

Cc: Prince Agyeman <prince.agyeman@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
Reviewed-by: Prince Agyeman <prince.agyeman@intel.com>
7 years agoIntelFsp2Pkg/Tools: Add BSF bit field support in GenCfgOpt tool
Maurice Ma [Wed, 25 May 2016 18:21:18 +0000 (11:21 -0700)]
IntelFsp2Pkg/Tools: Add BSF bit field support in GenCfgOpt tool

The current GenCfgOpt tool does not generate bit fields in BSF.
This change will allow bit fields to be created in BSF for a specific
FSP UPD item. The argument for the tool is also updated to be in sync
with the old usage model in IntelFspPkg.

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: Jiewen Yao <Jiewen.yao@intel.com>
Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>
7 years agoOvmfPkg/PlatformBootManagerLib: keep the logo after connecting devices
Laszlo Ersek [Wed, 25 May 2016 12:11:14 +0000 (14:11 +0200)]
OvmfPkg/PlatformBootManagerLib: keep the logo after connecting devices

OVMF (unlike ArmVirtPkg) has traditionally cleared the screen after
connecting devices. This is not really necessary, and keeping the logo up
while the progress bar is advancing at the bottom looks great. So don't
clear the screen.

Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
7 years agoOvmfPkg/PlatformBootManagerLib: bring back the progress bar
Laszlo Ersek [Wed, 25 May 2016 12:00:06 +0000 (14:00 +0200)]
OvmfPkg/PlatformBootManagerLib: bring back the progress bar

OVMF's Platform BDS used to have a nice progress bar (with
IntelFrameworkModulePkg BDS). We can restore it by copying the
PlatformBootManagerWaitCallback() function verbatim from

  Nt32Pkg/Library/PlatformBootManagerLib/PlatformBootManager.c

It can be tested by passing the following option to QEMU (5 seconds):

  -boot menu=on,splash-time=5000

Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>