]> git.proxmox.com Git - mirror_edk2.git/log
mirror_edk2.git
7 years agoSecurityPkg: AuthVariableLib: Cache UserPhysicalPresent in AuthVariableLib
Zhang, Chao B [Mon, 27 Jun 2016 03:10:07 +0000 (11:10 +0800)]
SecurityPkg: AuthVariableLib: Cache UserPhysicalPresent in AuthVariableLib

AuthVariableLib is updated to cache the UserPhysicalPresent state to global variable. This avoids calling PlatformSecureLib during runtime and makes PhysicalPresent state consistent during one boot.

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: Star Zeng <star.zeng@intel.com>
7 years agoIntelFsp2Pkg-BaseFspCommonLib: Add funtion to return the reset required status
Yarlagadda, Satya P [Fri, 24 Jun 2016 02:38:02 +0000 (10:38 +0800)]
IntelFsp2Pkg-BaseFspCommonLib: Add funtion to return the reset required status

Added new funtion in FSPCommonLib to update the FSP API return status with
the requested return status and return the control to the boot loader.

Cc: Giri P Mudusuru <giri.p.mudusuru@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: Giri P Mudusuru <giri.p.mudusuru@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
7 years agoMdeModulePkg/SetupBrowser: Fix the typo in the comment
Gary Lin [Fri, 24 Jun 2016 09:40:28 +0000 (17:40 +0800)]
MdeModulePkg/SetupBrowser: Fix the typo in the comment

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gary Lin <glin@suse.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
7 years agoEdkCompatibilityPkg: Fix the typo in the comment
Gary Lin [Fri, 24 Jun 2016 09:40:29 +0000 (17:40 +0800)]
EdkCompatibilityPkg: Fix the typo in the comment

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gary Lin <glin@suse.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoMdeModulePkg PiDxeS3BootScriptLib: Use a specific name for mSmst
Star Zeng [Fri, 24 Jun 2016 04:34:59 +0000 (12:34 +0800)]
MdeModulePkg PiDxeS3BootScriptLib: Use a specific name for mSmst

When a driver also uses a same name, there will be a link error:
one or more multiply defined symbols found.
Use a specific name for mSmst to avoid the link error.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
7 years agoMdeModulePkg/UefiBootManagerLib: Fix data in MemoryTypeInformation
Sunny Wang [Thu, 23 Jun 2016 07:45:00 +0000 (15:45 +0800)]
MdeModulePkg/UefiBootManagerLib: Fix data in MemoryTypeInformation

After booting a large-size ISO RAM disk (HTTP boot option pointing to
a ISO file) and reboot system, system will possibly run into the
following ASSERT because the BDS core code doesn't consider the
case that Memory page management (Page.c) would possibly NOT update
current memory usage statistics(CurrentMemoryTypeInformation) if
system allocates a memory buffer with a large number of pages.
ASSERT [DxeCore] u:\MdeModulePkg\Core\Dxe\Gcd\Gcd.c(2273):
Length >= MinimalMemorySizeNeeded

The BDS code block for skipping counting reserved memory occupied
by RAM Disk didn't consider the Memory page management's behavior
mentioned above, which caused that the
CurrentMemoryTypeInformation[Index1].NumberOfPages will be updated
to a "very big value" because RamDiskSizeInPages is bigger than
CurrentMemoryTypeInformation[Index1].NumberOfPages. For example,
NumberOfPages is 0x9000 (current use) and RamDiskSizeInPages is
0xC0000 (ISO image size). The result will become a very big value
0xFFF49000.

Therefore, we need to add a check to prevent BDS core code updating
wrong data (very big value) to MemoryTypeInformation variable. This
code change is a improvement for fixing this issue for most cases.
There is still a corner case even when the memory bins don't include
the RAM disk memory, the memory used by all other modules exceeds
RamDiskSizeInPages. Ray will send the other patch to fix this corner
case.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Sunny Wang <sunnywang@hpe.com>
Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com>
Reviewed-by: Ruiyu Ni <Ruiyu.ni@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
7 years agoNetworkPkg: Avoid potential NULL pointer dereference
Jiaxin Wu [Fri, 24 Jun 2016 07:19:44 +0000 (15:19 +0800)]
NetworkPkg: Avoid potential NULL pointer dereference

The commit of 6b16c9e7 removes ASSERT and use error handling
in IpSecDxe driver, but may cause the potential NULL pointer
dereference. So, this patch is used to avoid NULL pointer
dereference.

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>
7 years agoMdeModulePkg: SdMmc: Add delay before eMMC reset
Joe Zhou [Wed, 22 Jun 2016 15:09:11 +0000 (23:09 +0800)]
MdeModulePkg: SdMmc: Add delay before eMMC reset

This delay is necessary for eMMC reset to working properly.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Joe Zhou <shjzhou@marvell.com>
Signed-off-by: Marcin Wojtas <mw@semihalf.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
7 years agoMdeModulePkg: SdMmc: Fix parameters order in EmmcSwitch functions call
Joe Zhou [Wed, 22 Jun 2016 15:09:10 +0000 (23:09 +0800)]
MdeModulePkg: SdMmc: Fix parameters order in EmmcSwitch functions call

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Joe Zhou <shjzhou@marvell.com>
Signed-off-by: Jan Dabros <jsd@semihalf.com>
Signed-off-by: Marcin Wojtas <mw@semihalf.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
7 years agoArmPkg/ArmGicV3Dxe: configure all interrupts as non-secure Group-1
Ard Biesheuvel [Wed, 22 Jun 2016 14:23:57 +0000 (16:23 +0200)]
ArmPkg/ArmGicV3Dxe: configure all interrupts as non-secure Group-1

Reassign all interrupts to non-secure Group-1 if the GIC has its DS
(Disable Security) bit set. In this case, it is safe to assume that we
own the GIC, and that no other firmware has performed any configuration
yet, which means it is up to us to reconfigure the interrupts so they
can be taken by the non-secure firmware.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
7 years agoArmVirtPkg: add FDF definition for empty varstore
Ard Biesheuvel [Tue, 21 Jun 2016 10:23:43 +0000 (12:23 +0200)]
ArmVirtPkg: add FDF definition for empty varstore

Similar to how OVMF implements this, add a FD definition for the varstore
firmware volume and the FTW areas. The template was taken from the file
OvmfPkg/VarStore.fdf.inc, and subsequently modified to accommodate the
differences in NOR flash layout. This affects the FvLength, Checksum and
BlockMap[0] fields in the FV header, the Size field of the varstore header,
and the Crc and WriteQueueSize fields of the FTW header. The event log
region is not used by ArmVirtQemu, so it has been omitted.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
7 years agoMdeModulePkg: Remove NORETURN for PeiCore() and DxeMain() function
Liming Gao [Wed, 22 Jun 2016 07:23:47 +0000 (15:23 +0800)]
MdeModulePkg: Remove NORETURN for PeiCore() and DxeMain() function

PeiCore EntryPoint library _ModuleEntryPoint() will call PeiCore(), then call
CpuDeadLoop (). When NORETURN is added for PeiCore(), MSVC compiler will report
warning C4702: unreachable code for CpuDeadLoop (). And, the warning is treated
as error and cause build break. DxeMain() has the similar issue.

edk2 uses EntryPoint library to wrap every module entry point function except
for SEC. The module entry point is still called by _ModuleEntryPoint(). So,
there will be negative impact to add NORETURN for the module entry point.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
7 years agoMdeModulePkg: Fix the wrong IpSb->State update
Jiaxin Wu [Wed, 22 Jun 2016 09:49:43 +0000 (17:49 +0800)]
MdeModulePkg: Fix the wrong IpSb->State update

This patch is used to fix the wrong IpSb->State update issue.

Issue reproduce steps:
1 .First PXE boot, then boot to shell;
2. ifconfig -s eth0 dhcp (Success);
3. Reboot and do PXE, then boot to shell;
4. ifconfig -s eth0 dhcp (Platform failed to get IP address no matter
   how many times retried.)

Root cause:
On step3 reboot, policy is DHCP (Changed by step2). So, Ip4Dxe driver
will try to get one IP address from DHCP server automatically. Before
it get the IP address successfully, the IpSb->State will be always in
IP4_SERVICE_STARTED status until the Instance->Dhcp4Event is triggered,
then it can be changed to IP4_SERVICE_CONFIGED. But the DHCP process
will be interrupted by PXE boot, which will change the policy to static,
and the Instance->Dhcp4Event will be also closed directly. However,
current implementation doesn't update the IpSb->State to
IP4_SERVICE_UNSTARTED status in such case. So, failure happened.

Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Ryan Harkin <ryan.harkin@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Tested-by: Ryan Harkin <ryan.harkin@linaro.org>
7 years agoMdeModulePkg/Bds: Do not boot to UI again when BootNext points to UI
Ruiyu Ni [Tue, 21 Jun 2016 05:04:31 +0000 (13:04 +0800)]
MdeModulePkg/Bds: Do not boot to UI again when BootNext points to UI

Per UEFI spec the successful returning of boot option triggers boot
to UI. But when the BootNext just points to UI, it causes confusing.
So the patch avoids booting to UI again when the BootNext points to
UI.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Amy Chan <amy.chan@intel.com>
7 years agoNetworkPkg: Refine codes related to Dhcpv4 and Dhcpv6 configuration.
Zhang Lubo [Wed, 22 Jun 2016 02:25:21 +0000 (10:25 +0800)]
NetworkPkg: Refine codes related to Dhcpv4 and Dhcpv6 configuration.

v2:
*Since we have redefined the name of arch types in Dhcp.h for http boot,
it need to change corresponding codes.

Add a new head file Dhcp.h in Mde/Include/IndustryStandard, normalize the
universal option numbers and other network number tags.

Cc: Sriram Subramanian <sriram-s@hpe.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Wu Jiaxin <jiaxin.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <lubo.zhang@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
7 years agoMedmodulePkg: Refine codes related to Dhcpv4 and Dhcpv6 configuration.
Zhang Lubo [Wed, 22 Jun 2016 02:25:00 +0000 (10:25 +0800)]
MedmodulePkg: Refine codes related to Dhcpv4 and Dhcpv6 configuration.

Add a new head file Dhcp.h in Mde/Include/IndustryStandard, normalize the
universal option numbers and other network number tags.

Cc: Sriram Subramanian <sriram-s@hpe.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Wu Jiaxin <jiaxin.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <lubo.zhang@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
7 years agoMdePkg: Refine codes related to Dhcpv4 and Dhcpv6 configuration.
Zhang Lubo [Wed, 22 Jun 2016 02:24:33 +0000 (10:24 +0800)]
MdePkg: Refine codes related to Dhcpv4 and Dhcpv6 configuration.

v2:
*add some new arch types for PXE boot.
refine the definition of arch types for http boot

Add a new head file Dhcp.h in Mde/Include/IndustryStandard, normalize the
universal option numbers and other network number tags.

Cc: Sriram Subramanian <sriram-s@hpe.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Wu Jiaxin <jiaxin.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <lubo.zhang@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
7 years agoNetworkPkg: Replace ASSERT with error handling in Http boot and IScsi
Zhang Lubo [Tue, 21 Jun 2016 06:40:28 +0000 (14:40 +0800)]
NetworkPkg: Replace ASSERT with error handling in Http boot and IScsi

v2:
*Fix some memory leak issue.

This patch is used to replace ASSERT with error handling in Http boot
Driver and IScsi driver.

Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Wu Jiaxin <jiaxin.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <lubo.zhang@intel.com>
Reviewed-By: Wu Jiaxin <jiaxin.wu@intel.com>
7 years agoArmPlatformPkg/NorFlashAuthenticatedDxe: remove this obsolete module
Ard Biesheuvel [Tue, 21 Jun 2016 10:17:34 +0000 (12:17 +0200)]
ArmPlatformPkg/NorFlashAuthenticatedDxe: remove this obsolete module

This module is now identical in functionality to NorFlashDxe, and is no
longer used, so remove it altogether.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
7 years agoArmVirtPkg/ArmVirtQemu: switch secure boot build to NorFlashDxe
Ard Biesheuvel [Tue, 21 Jun 2016 10:14:41 +0000 (12:14 +0200)]
ArmVirtPkg/ArmVirtQemu: switch secure boot build to NorFlashDxe

There is no longer a reason to use a different implementation of
NorFlashDxe for secure boot builds now that the varstore FV header can
carry either gEfiVariableGuid or gEfiAuthenticatedVariableGuid, and the
dependent code has been updated to deal with that. So move the secure
boot capable builds to the common NorFlashDxe.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
7 years agoArmPlatformPkg/NorFlashDxe: accept both non-secure and secure varstore GUIDs
Ard Biesheuvel [Tue, 21 Jun 2016 09:57:48 +0000 (11:57 +0200)]
ArmPlatformPkg/NorFlashDxe: accept both non-secure and secure varstore GUIDs

Now that the generic Variable Runtime DXE code no longer distinguishes
between gEfiVariableGuid and gEfiAuthenticatedVariableGuid in the varstore
FV header, we can relax the check in the NOR flash driver to accept either
GUID regardless of whether we are running a secure boot capable build or not.

This also means we can always use gEfiAuthenticatedVariableGuid when we
encounter an empty NOR flash that needs to be initialized before use. So
remove the mNorFlashVariableGuid global from the shared code and from both
versions of NorFlashDxe.inf. This essentially collapses the two drivers into
a single one, which means we can remove NorFlashAuthenticatedDxe entirely
in a subsequent patch.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
7 years agoMdedulePkg: AtaAtapiPassThru: Remove polling on PxCMD.FR flag setting
Jan D?bro? [Tue, 21 Jun 2016 00:37:06 +0000 (08:37 +0800)]
MdedulePkg: AtaAtapiPassThru: Remove polling on PxCMD.FR flag setting

It is enough to set PxCMD.FRE bit, which cause HBA to post received FISes
into the FIS receive area. According to AHCI Specification, only polling on
PxCMD.FRE to be cleared is necessary, when it is needeed to stop FIS engine
(eg. in order to change PxCMD.FB address).

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jan Dabros <jsd@semihalf.com>
Signed-off-by: Marcin Wojtas <mw@semihalf.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
7 years agoRevert "MdeModulePkg/Bds: Do not boot to UI again when BootNext points to UI"
Ruiyu Ni [Wed, 22 Jun 2016 06:00:41 +0000 (14:00 +0800)]
Revert "MdeModulePkg/Bds: Do not boot to UI again when BootNext points to UI"

This reverts commit dd85dd0731e971c5782fb94b2cbac8669b33312b.

7 years agoMdePkg/PCI: Add missing PCI/PCIE definitions
Ruiyu Ni [Fri, 27 May 2016 13:43:45 +0000 (21:43 +0800)]
MdePkg/PCI: Add missing PCI/PCIE definitions

The definitions are required by certain platform initialization
code.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Jeff Fan <jeff.fan@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Reviewed-by: Amy Chan <amy.chan@intel.com>
7 years agoMdeModulePkg/Bds: Do not boot to UI again when BootNext points to UI
Ruiyu Ni [Tue, 21 Jun 2016 05:04:31 +0000 (13:04 +0800)]
MdeModulePkg/Bds: Do not boot to UI again when BootNext points to UI

Per UEFI spec the successful returning of boot option triggers boot
to UI. But when the BootNext just points to UI, it causes confusing.
So the patch avoids booting to UI again when the BootNext points to
UI.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Amy Chan <amy.chan@intel.com>
7 years agoMdePkg: Fix 'cd ..\..' go up only 1 level.
Qiu Shumin [Tue, 21 Jun 2016 08:18:56 +0000 (16:18 +0800)]
MdePkg: Fix 'cd ..\..' go up only 1 level.

When we try to cd up two levels using the "../.." notation we
only go up one level. This patch fix this bug.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoUefiCpuPkg/SecMain: Decorate phase-transition function with NORETURN.
Marvin H?user [Sun, 19 Jun 2016 01:31:58 +0000 (09:31 +0800)]
UefiCpuPkg/SecMain: Decorate phase-transition function with NORETURN.

This patch adds the NORETURN attribute to the function that transfers
to the PEI phase, along with an UNREACHABLE() call at the end to
avoid false warnings.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Marvin Haeuser <Marvin.Haeuser@outlook.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoMdeModulePkg/Core: Decorate phase-transition functions with NORETURN.
Marvin H?user [Sun, 19 Jun 2016 01:31:16 +0000 (09:31 +0800)]
MdeModulePkg/Core: Decorate phase-transition functions with NORETURN.

This patch adds the NORETURN attribute to functions that transfer to
other phases, along with an UNREACHABLE() call at the end to avoid
false warnings.
DxeIpl has been excluded as its main function returns a status.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Marvin Haeuser <Marvin.Haeuser@outlook.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoMdePkg/DebugLib: Flag post-_ASSERT() as unreachable for analyzers.
Marvin H?user [Sun, 19 Jun 2016 01:29:39 +0000 (09:29 +0800)]
MdePkg/DebugLib: Flag post-_ASSERT() as unreachable for analyzers.

When a variable is compared to NULL as part of an ASSERT() call, the
code implies that the variable may be NULL. Certain Static Analyzers,
such as the Clang Static Analyzer, then issue false warnings for any
untested access of that pointer, even though that defeats the
intention behind ASSERT(). This patch flags the position after
_ASSERT() as unreachable for Static Analyzers to indicate that if the
variable is NULL, execution cannot pass.
As the ANALYZER-prefixed version is used, the executables will not
have any code stripped during compilation.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Marvin Haeuser <Marvin.Haeuser@outlook.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoMdePkg: Add NORETURN attribute and UNREACHABLE() macro.
Marvin H?user [Sun, 19 Jun 2016 01:28:51 +0000 (09:28 +0800)]
MdePkg: Add NORETURN attribute and UNREACHABLE() macro.

The NORETURN attribute informs compilers and analyzers that the flagged
function cannot return. This may improve the quality of the optimizations.

The UNREACHABLE() macro informs compilers and analyzers that its position
cannot be reached, for example eliminating implicit returns.
It is recommended to be used together with the NORETURN attribute to prevent
warnings regarding the function flagged as 'noreturn' returning.

The ANALYZER-prefixed versions have the same effects, but exclude compilers.
They may be used to surpress warnings of static analyzers, such as possible
dereferencing of a NULL pointer when dereferencing it after having checked it
via ASSERT().

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Marvin Haeuser <Marvin.Haeuser@outlook.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
7 years agoMdeModulePkg CapsulePei: Validate capsule integrity by memory resource hob
Star Zeng [Tue, 26 Apr 2016 04:52:42 +0000 (12:52 +0800)]
MdeModulePkg CapsulePei: Validate capsule integrity by memory resource hob

Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
7 years agoMdeModulePkg CapsulePei: Fix some typos
Star Zeng [Tue, 26 Apr 2016 01:18:39 +0000 (09:18 +0800)]
MdeModulePkg CapsulePei: Fix some typos

Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
7 years agoShellPkg/UefiHandleParsing: Show handle's loaded image device path
Ruiyu Ni [Thu, 16 Jun 2016 06:33:10 +0000 (14:33 +0800)]
ShellPkg/UefiHandleParsing: Show handle's loaded image device path

The patch fixed a bug in UefiHandleParsingLib to show handle's loaded
image device path.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
7 years agoVlv2TbltDevicePkg: Fixed build error issue.
Lu, ShifeiX A [Tue, 14 Jun 2016 08:27:15 +0000 (16:27 +0800)]
Vlv2TbltDevicePkg: Fixed build error issue.

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 agoNetworkPkg: Replace ASSERT with error handling in DnsDxe
Jiaxin Wu [Fri, 17 Jun 2016 06:26:48 +0000 (14:26 +0800)]
NetworkPkg: Replace ASSERT with error handling in DnsDxe

v2:
* Use goto to simplify code logic.

This patch is used to replace ASSERT with error handling in
DnsDxe driver.

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 agoNetworkPkg: Remove ASSERT and use error handling in IpSecDxe
Jiaxin Wu [Fri, 17 Jun 2016 03:59:47 +0000 (11:59 +0800)]
NetworkPkg: Remove ASSERT and use error handling in IpSecDxe

This patch is used to refine the code by removing ASSERT and
using error handling in IpSecDxe driver.

Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Zhang Lubo <lubo.zhang@intel.com>
Cc: Yao Jiewen <jiewen.yao@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 agoMdePkg: Indicate UnicodeStrToAsciiStr/AsciiStrToUnicodeStr to be deprecated
Star Zeng [Wed, 15 Jun 2016 08:22:34 +0000 (16:22 +0800)]
MdePkg: Indicate UnicodeStrToAsciiStr/AsciiStrToUnicodeStr to be deprecated

Cc: Jiewen Yao <jiewen.yao@intel.com>
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: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
7 years agoIntelFrameworkModulePkg: Replace UnicodeStrToAsciiStr/AsciiStrToUnicodeStr
Star Zeng [Wed, 15 Jun 2016 05:40:46 +0000 (13:40 +0800)]
IntelFrameworkModulePkg: Replace UnicodeStrToAsciiStr/AsciiStrToUnicodeStr

It is the follow up of 3ab41b7a325ca11a12b42f5ad1661c4b6791cb49
to replace UnicodeStrToAsciiStr/AsciiStrToUnicodeStr with
UnicodeStrToAsciiStrS/AsciiStrToUnicodeStrS.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jeff Fan <jeff.fan@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
7 years agoShellPkg: Replace UnicodeStrToAsciiStr/AsciiStrToUnicodeStr
Star Zeng [Wed, 15 Jun 2016 05:39:13 +0000 (13:39 +0800)]
ShellPkg: Replace UnicodeStrToAsciiStr/AsciiStrToUnicodeStr

It is the follow up of 3ab41b7a325ca11a12b42f5ad1661c4b6791cb49
to replace UnicodeStrToAsciiStr/AsciiStrToUnicodeStr with
UnicodeStrToAsciiStrS/AsciiStrToUnicodeStrS.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jaben Carsey <jaben.carsey@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
7 years agoSecurityPkg: Replace UnicodeStrToAsciiStr/AsciiStrToUnicodeStr
Star Zeng [Wed, 15 Jun 2016 05:38:56 +0000 (13:38 +0800)]
SecurityPkg: Replace UnicodeStrToAsciiStr/AsciiStrToUnicodeStr

It is the follow up of 3ab41b7a325ca11a12b42f5ad1661c4b6791cb49
to replace UnicodeStrToAsciiStr/AsciiStrToUnicodeStr with
UnicodeStrToAsciiStrS/AsciiStrToUnicodeStrS.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Chao Zhang <chao.b.zhang@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
7 years agoPerformancePkg: Replace UnicodeStrToAsciiStr/AsciiStrToUnicodeStr
Star Zeng [Wed, 15 Jun 2016 05:38:35 +0000 (13:38 +0800)]
PerformancePkg: Replace UnicodeStrToAsciiStr/AsciiStrToUnicodeStr

It is the follow up of 3ab41b7a325ca11a12b42f5ad1661c4b6791cb49
to replace UnicodeStrToAsciiStr/AsciiStrToUnicodeStr with
UnicodeStrToAsciiStrS/AsciiStrToUnicodeStrS.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Jaben Carsey <jaben.carsey@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
7 years agoNetworkPkg: Replace UnicodeStrToAsciiStr/AsciiStrToUnicodeStr
Star Zeng [Wed, 15 Jun 2016 05:38:03 +0000 (13:38 +0800)]
NetworkPkg: Replace UnicodeStrToAsciiStr/AsciiStrToUnicodeStr

It is the follow up of 3ab41b7a325ca11a12b42f5ad1661c4b6791cb49
to replace UnicodeStrToAsciiStr/AsciiStrToUnicodeStr with
UnicodeStrToAsciiStrS/AsciiStrToUnicodeStrS.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Siyuan Fu <siyuan.fu@intel.com>
Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
7 years agoMdeModulePkg: Replace UnicodeStrToAsciiStr/AsciiStrToUnicodeStr
Star Zeng [Wed, 15 Jun 2016 05:35:14 +0000 (13:35 +0800)]
MdeModulePkg: Replace UnicodeStrToAsciiStr/AsciiStrToUnicodeStr

It is the follow up of 3ab41b7a325ca11a12b42f5ad1661c4b6791cb49
to replace UnicodeStrToAsciiStr/AsciiStrToUnicodeStr with
UnicodeStrToAsciiStrS/AsciiStrToUnicodeStrS.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
7 years agoMdePkg: Replace UnicodeStrToAsciiStr() with UnicodeStrToAsciiStrS()
Star Zeng [Wed, 15 Jun 2016 05:05:00 +0000 (13:05 +0800)]
MdePkg: Replace UnicodeStrToAsciiStr() with UnicodeStrToAsciiStrS()

It is the follow up of 3ab41b7a325ca11a12b42f5ad1661c4b6791cb49
to replace UnicodeStrToAsciiStr/AsciiStrToUnicodeStr with
UnicodeStrToAsciiStrS/AsciiStrToUnicodeStrS.

Cc: Jiewen Yao <jiewen.yao@intel.com>
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: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
7 years agoMdeModulePkg/UiApp: Retrieve the value of language menu
Dandan Bi [Wed, 15 Jun 2016 09:23:57 +0000 (17:23 +0800)]
MdeModulePkg/UiApp: Retrieve the value of language menu

In current UI code, we use oneof opcode without storage for language
menu. If we change the language form A->B, then go to another form and
then go back to the front page, the language menu always shows A. Now
we fix this issue by retrieving the value of oneof opcode(language menu)
when display it.

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/BootManagerUiLib: No need to connect all devices
Dandan Bi [Wed, 15 Jun 2016 07:44:55 +0000 (15:44 +0800)]
MdeModulePkg/BootManagerUiLib: No need to connect all devices

The connect all action has been done in UiApp,
no need to do it when update boot manager form.

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/UiApp: Connect all devices in UiApp if needed
Dandan Bi [Mon, 6 Jun 2016 03:01:55 +0000 (11:01 +0800)]
MdeModulePkg/UiApp: Connect all devices in UiApp if needed

If the connect all action has not been performed before.
We do it in UiApp 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 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>