]> git.proxmox.com Git - mirror_edk2.git/log
mirror_edk2.git
8 years agoMdePkg: Add GIC version to ACPI 5.1/6 definitions
Samer El-Haj-Mahmoud [Wed, 16 Dec 2015 00:55:29 +0000 (00:55 +0000)]
MdePkg: Add GIC version to ACPI 5.1/6 definitions

The GicVersion field is defined in ACPI 5.1 and 6.0

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: "Samer El-Haj-Mahmoud" <elhaj@hpe.com>
Reviewed-by: "Yao, Jiewen" <jiewen.yao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19288 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoQuarkPlatformPkg: Add new package for Galileo boards
Michael Kinney [Tue, 15 Dec 2015 19:23:57 +0000 (19:23 +0000)]
QuarkPlatformPkg: Add new package for Galileo boards

Changes for V4
==============
1) Move delete of QuarkSocPkg\QuarkNorthCluster\Binary\QuarkMicrocode
   from QuarkPlatformPkg commit to QuarkSocPkg commit
2) Fix incorrect license header in PlatformSecLibModStrs.uni

Changes for V3
==============
1) Set PcdResetOnMemoryTypeInformationChange FALSE in QuarkMin.dsc
   This is required because QuarkMin.dsc uses the emulated variable
   driver that does not preserve any non-volatile UEFI variables
   across reset.  If the condition is met where the memory type
   information variable needs to be updated, then the system will reset
   every time the UEFI Shell is run.  By setting this PCD to FALSE,
   then reset action is disabled.
2) Move one binary file to QuarkSocBinPkg
3) Change RMU.bin FILE statements to INF statement in DSC FD region
   to be compatible with PACKAGES_PATH search for QuarkSocBinPkg

Changes for V2
==============
1) Use new generic PCI serial driver PciSioSerialDxe in MdeModulePkg
2) Configure PcdPciSerialParameters for PCI serial driver for Quark
3) Use new MtrrLib API to reduce time to set MTRRs for all DRAM
4) Convert all UNI files to utf-8
5) Replace tabs with spaces and remove trailing spaces
6) Add License.txt

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Acked-by: Jordan Justen <jordan.l.justen@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19287 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoQuarkSocPkg: Add new package for Quark SoC X1000
Michael Kinney [Tue, 15 Dec 2015 19:22:23 +0000 (19:22 +0000)]
QuarkSocPkg: Add new package for Quark SoC X1000

Changes for V4
==============
1) Remove Unicode character from C source file
2) Move delete of QuarkSocPkg\QuarkNorthCluster\Binary\QuarkMicrocode
   from QuarkPlatformPkg commit to QuarkSocPkg commit

Changes for V2
==============
1) Sync with new APIs in SmmCpuFeaturesLib class
2) Use new generic PCI serial driver PciSioSerialDxe in MdeModulePkg
3) Remove PCI serial driver from QuarkSocPkg
4) Apply optimizations to MtrrLib from MtrrLib in UefiCpuPkg
5) Convert all UNI files to utf-8
6) Replace tabs with spaces and remove trailing spaces
7) Add License.txt

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Acked-by: Jordan Justen <jordan.l.justen@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19286 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoArmPkg/ArmV7Mmu: prefer non shareable memory on non-coherent hardware
Ard Biesheuvel [Tue, 15 Dec 2015 17:31:56 +0000 (17:31 +0000)]
ArmPkg/ArmV7Mmu: prefer non shareable memory on non-coherent hardware

Commit SVN r18778 made all mappings of normal memory (inner) shareable,
even on hardware that implements shareability as uncached accesses.
The original concerns that prompted the change, regarding coherent DMA
and virt guests migrating between CPUs, do not apply to such hardware,
so revert to the original behavior in that case.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19285 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoBaseTools ARM: add CLANG35 support
Ard Biesheuvel [Tue, 15 Dec 2015 15:02:24 +0000 (15:02 +0000)]
BaseTools ARM: add CLANG35 support

This extends the existing CLANG35 toolchain definition with support for
building for the ARM architecture. In order to be able to reuse the existing
ARM GCC definitions as much as possible, the following changes have been
made to the existing ARM GCC support:
- the -mapcs option has been removed; it is a no-op under Thumb (our default)
  and we use AAPCS (-mabi=aapcs) anyway
- the -mword-relocations option has been moved from GCC_ARM_CC_FLAGS to
  the GCC4x specific option: CLANG does not support it, and uses '-mllvm
  -marm-use-movt=0' instead.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19284 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoArmPkg/ArmSoftfloatLib: restrict -fno-tree-vrp option to GCC46 and GCC47
Ard Biesheuvel [Tue, 15 Dec 2015 15:02:16 +0000 (15:02 +0000)]
ArmPkg/ArmSoftfloatLib: restrict -fno-tree-vrp option to GCC46 and GCC47

The -fno-tree-vrp option is not required for GCC 4.8 or later, and is not
supported by CLANG. So restrict its use to GCC 4.6 and 4.7, which are the
oldest versions we support for ARM.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19283 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoArmPkg/ArmV7Lib: add CLANG alternative for FPEXC access
Ard Biesheuvel [Tue, 15 Dec 2015 15:02:07 +0000 (15:02 +0000)]
ArmPkg/ArmV7Lib: add CLANG alternative for FPEXC access

The open coded access to co-processor #10 to set FPEXC is not supported
by the CLANG assembler, but the architecturally correct VMSR instruction
is not supported by older binutils. So keep the former unless __clang__
is defined.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19282 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoArmPkg/CompilerIntrinsicsLib: add GCC version of __aeabi_memset()
Ard Biesheuvel [Tue, 15 Dec 2015 15:01:58 +0000 (15:01 +0000)]
ArmPkg/CompilerIntrinsicsLib: add GCC version of __aeabi_memset()

CLANG for ARM may emit calls to __aeabi_memset(), which is subtly different
from the default memset() [arguments 2 and 3 are reversed]

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19281 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoArmPkg: use unified asm syntax for CLANG
Ard Biesheuvel [Tue, 15 Dec 2015 15:01:42 +0000 (15:01 +0000)]
ArmPkg: use unified asm syntax for CLANG

The CLANG assembler does not support the legacy, non-unified assembler syntax,
i.e., it does not support the reordering of the condition suffixes with the
increment/decrement before/after or byte/word suffixes, and it does not
recognize the 'empty descending' (ED) suffix at all. So move to the unified
syntax, and replace 'empty descending' with 'decrement after' or 'increment
before' as appropriate.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19280 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoArmVExpressPkg/ArmVExpress-FVP-AArch64: run GICv3 in v3 mode
Ard Biesheuvel [Tue, 15 Dec 2015 13:08:56 +0000 (13:08 +0000)]
ArmVExpressPkg/ArmVExpress-FVP-AArch64: run GICv3 in v3 mode

After fixing ArmGicEnableDistributor() in a previous patch, there is no
longer a reason to run the GICv3 in v2 mode, so remove the PCD override.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19275 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoArmPkg/ArmGic: fix bug in GICv3 distributor configuration
Ard Biesheuvel [Tue, 15 Dec 2015 13:08:48 +0000 (13:08 +0000)]
ArmPkg/ArmGic: fix bug in GICv3 distributor configuration

In the function ArmGicEnableDistributor (), the Affinity Routing Enable
(ARE) bit, which essentially defines whether the GIC runs in v2 or v3
mode, is inadvertently cleared when enabling the GIC distributor if it
is running in v3 mode. So fix that.

Reported-by: Supreeth Venkatesh <Supreeth.Venkatesh@arm.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19274 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoArmPkg/CpuDxe: drop ARMv4 exception handling code
Ard Biesheuvel [Tue, 15 Dec 2015 09:56:04 +0000 (09:56 +0000)]
ArmPkg/CpuDxe: drop ARMv4 exception handling code

Since we do not support anything below ARMv7, let's promote the ARMv6
exception handling code in CpuDxe to the only version we provide for
ARM. This means we can drop the unused ARMv4 version.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19273 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdePkg: Add Ipmi2.0 definitions head file.
Daocheng Bu [Tue, 15 Dec 2015 08:41:25 +0000 (08:41 +0000)]
MdePkg: Add Ipmi2.0 definitions head file.

Re-add Ipmi2.0 definitions header files based on Ipmi category:
App, Storage and etc.
In V3, the file name has been changed for short.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Daocheng Bu <daocheng.bu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19272 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg: Add NULL pointer check for RegularExpressionDxe.
Qiu Shumin [Tue, 15 Dec 2015 08:40:55 +0000 (08:40 +0000)]
MdeModulePkg: Add NULL pointer check for RegularExpressionDxe.

Refine code by adding NULL pointer check to avoid potential NULL pointer dereferenced.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19271 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg: Improved SetupBrowser handling to failed GOTO callback.
Cecil Sheng [Tue, 15 Dec 2015 05:53:46 +0000 (05:53 +0000)]
MdeModulePkg: Improved SetupBrowser handling to failed GOTO callback.

On a failed REF_OP callback, all changed fields in the Selection should be restored.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Cecil Sheng <cecil.sheng@hpe.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19268 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoRollback change r19245 because it missed one change.
Cecil Sheng [Tue, 15 Dec 2015 05:49:14 +0000 (05:49 +0000)]
Rollback change r19245 because it missed one change.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Cecil Sheng <cecil.sheng@hpe.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19267 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg UfsPassThru: ASSERT if params are NULL in SignalCallerEvent
Hao Wu [Tue, 15 Dec 2015 05:43:08 +0000 (05:43 +0000)]
MdeModulePkg UfsPassThru: ASSERT if params are NULL in SignalCallerEvent

In function SignalCallerEvent(), 'Private' and 'TransReq' are dereferenced
before NULL checking.

Since the function assumes that both 'Private' and 'TransReq' passed in
are not NULL pointer, this commit will add an ASSERT to make sure the
above assumption is satisfied.

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>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19266 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoVlv2TbltDevicePkg: Convert all .uni files to utf-8
Jordan Justen [Tue, 15 Dec 2015 04:59:37 +0000 (04:59 +0000)]
Vlv2TbltDevicePkg: Convert all .uni files to utf-8

To convert these files I ran:

$ python3 BaseTools/Scripts/ConvertUni.py Vlv2TbltDevicePkg

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19265 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoUefiCpuPkg: Convert all .uni files to utf-8
Jordan Justen [Tue, 15 Dec 2015 04:59:14 +0000 (04:59 +0000)]
UefiCpuPkg: Convert all .uni files to utf-8

To convert these files I ran:

$ python3 BaseTools/Scripts/ConvertUni.py UefiCpuPkg

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19264 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoSourceLevelDebugPkg: Convert all .uni files to utf-8
Jordan Justen [Tue, 15 Dec 2015 04:58:48 +0000 (04:58 +0000)]
SourceLevelDebugPkg: Convert all .uni files to utf-8

To convert these files I ran:

$ python3 BaseTools/Scripts/ConvertUni.py SourceLevelDebugPkg

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19263 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoSecurityPkg: Convert all .uni files to utf-8
Jordan Justen [Tue, 15 Dec 2015 04:58:32 +0000 (04:58 +0000)]
SecurityPkg: Convert all .uni files to utf-8

To convert these files I ran:

$ python3 BaseTools/Scripts/ConvertUni.py SecurityPkg

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19262 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoPerformancePkg: Convert all .uni files to utf-8
Jordan Justen [Tue, 15 Dec 2015 04:57:45 +0000 (04:57 +0000)]
PerformancePkg: Convert all .uni files to utf-8

To convert these files I ran:

$ python3 BaseTools/Scripts/ConvertUni.py PerformancePkg

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19261 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoPcAtChipsetPkg: Convert all .uni files to utf-8
Jordan Justen [Tue, 15 Dec 2015 04:57:25 +0000 (04:57 +0000)]
PcAtChipsetPkg: Convert all .uni files to utf-8

To convert these files I ran:

$ python3 BaseTools/Scripts/ConvertUni.py PcAtChipsetPkg

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19260 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoNt32Pkg: Convert all .uni files to utf-8
Jordan Justen [Tue, 15 Dec 2015 04:57:08 +0000 (04:57 +0000)]
Nt32Pkg: Convert all .uni files to utf-8

To convert these files I ran:

$ python3 BaseTools/Scripts/ConvertUni.py Nt32Pkg

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19259 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoNetworkPkg: Convert all .uni files to utf-8
Jordan Justen [Tue, 15 Dec 2015 04:56:57 +0000 (04:56 +0000)]
NetworkPkg: Convert all .uni files to utf-8

To convert these files I ran:

$ python3 BaseTools/Scripts/ConvertUni.py NetworkPkg

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19258 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg: Convert all .uni files to utf-8
Jordan Justen [Tue, 15 Dec 2015 04:56:23 +0000 (04:56 +0000)]
MdeModulePkg: Convert all .uni files to utf-8

To convert these files I ran:

$ python3 BaseTools/Scripts/ConvertUni.py MdeModulePkg

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19257 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdePkg: Convert all .uni files to utf-8
Jordan Justen [Tue, 15 Dec 2015 04:53:50 +0000 (04:53 +0000)]
MdePkg: Convert all .uni files to utf-8

To convert these files I ran:

$ python3 BaseTools/Scripts/ConvertUni.py MdePkg

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19256 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoIntelFrameworkPkg: Convert all .uni files to utf-8
Jordan Justen [Tue, 15 Dec 2015 04:52:47 +0000 (04:52 +0000)]
IntelFrameworkPkg: Convert all .uni files to utf-8

To convert these files I ran:

$ python3 BaseTools/Scripts/ConvertUni.py IntelFrameworkPkg

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19255 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoIntelFrameworkModulePkg: Convert all .uni files to utf-8
Jordan Justen [Tue, 15 Dec 2015 04:52:33 +0000 (04:52 +0000)]
IntelFrameworkModulePkg: Convert all .uni files to utf-8

To convert these files I ran:

$ python3 BaseTools/Scripts/ConvertUni.py IntelFrameworkModulePkg

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19254 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoEmulatorPkg: Convert all .uni files to utf-8
Jordan Justen [Tue, 15 Dec 2015 04:51:49 +0000 (04:51 +0000)]
EmulatorPkg: Convert all .uni files to utf-8

To convert these files I ran:

$ python3 BaseTools/Scripts/ConvertUni.py EmulatorPkg

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19253 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoEmbeddedPkg: Convert all .uni files to utf-8
Jordan Justen [Tue, 15 Dec 2015 04:51:40 +0000 (04:51 +0000)]
EmbeddedPkg: Convert all .uni files to utf-8

To convert these files I ran:

$ python3 BaseTools/Scripts/ConvertUni.py EmbeddedPkg

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19252 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoDuetPkg: Convert all .uni files to utf-8
Jordan Justen [Tue, 15 Dec 2015 04:51:33 +0000 (04:51 +0000)]
DuetPkg: Convert all .uni files to utf-8

To convert these files I ran:

$ python3 BaseTools/Scripts/ConvertUni.py DuetPkg

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19251 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoCryptoPkg: Convert all .uni files to utf-8
Jordan Justen [Tue, 15 Dec 2015 04:51:26 +0000 (04:51 +0000)]
CryptoPkg: Convert all .uni files to utf-8

To convert these files I ran:

$ python3 BaseTools/Scripts/ConvertUni.py CryptoPkg

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Qin Long <qin.long@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19250 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoArmPlatformPkg: Convert all .uni files to utf-8
Jordan Justen [Tue, 15 Dec 2015 04:51:08 +0000 (04:51 +0000)]
ArmPlatformPkg: Convert all .uni files to utf-8

To convert these files I ran:

$ python3 BaseTools/Scripts/ConvertUni.py ArmPlatformPkg

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19249 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoArmPkg: Convert all .uni files to utf-8
Jordan Justen [Tue, 15 Dec 2015 04:50:58 +0000 (04:50 +0000)]
ArmPkg: Convert all .uni files to utf-8

To convert these files I ran:

$ python3 BaseTools/Scripts/ConvertUni.py ArmPkg

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19248 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoBaseTools/Scripts: Add ConvertUni.py script
Jordan Justen [Tue, 15 Dec 2015 04:50:50 +0000 (04:50 +0000)]
BaseTools/Scripts: Add ConvertUni.py script

This script uses python codecs to convert .uni string files between
the utf-16 and utf-8 formats.

The advantages of utf-8 data:
 * Generally smaller files
 * More commonly supported by editors
 * Not treated as binary data in patch files

The script was tested on MdePkg with both python 2.7 and python 3.4.
It was able to convert all MdePkg .uni files between utf-8 and utf-16
multiple times always producing the same files for each format.

v2:
 * Rename ConvertUtf16ToUtf8.py to ConvertUni.py
 * Also support utf-8 to utf-16 conversion (with --utf-16)

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19247 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoFix >4G issue on IDT not restored correctly.
Yao, Jiewen [Tue, 15 Dec 2015 04:27:00 +0000 (04:27 +0000)]
Fix >4G issue on IDT not restored correctly.

Idtr might be changed inside of FSP. 32bit FSP only knows the <4G address.
If IDTR.Base is >4G, FSP can not handle. So we need save/restore IDTR here.
Interrupt is already disabled here, so it is safety to update IDTR.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com>
Reviewed-by: "Ma, Maurice" <maurice.ma@intel.com>
Reviewed-by: "Mudusuru, Giri P" <giri.p.mudusuru@intel.com>
Reviewed-by: "Yarlagadda, Satya P" <satya.p.yarlagadda@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19246 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg: Improved SetupBrowser handling to failed GOTO callback.
Cecil Sheng [Tue, 15 Dec 2015 02:53:34 +0000 (02:53 +0000)]
MdeModulePkg: Improved SetupBrowser handling to failed GOTO callback.

On a failed REF_OP callback, all changed fields in the Selection should be restored.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Cecil Sheng <cecil.sheng@hpe.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19245 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoArmPlatformPkg/Sec: fix return_from_exception code and comment
Ard Biesheuvel [Mon, 14 Dec 2015 16:08:27 +0000 (16:08 +0000)]
ArmPlatformPkg/Sec: fix return_from_exception code and comment

The return_from_exception implementation in Sec/Helper.S (the GCC
version) deviates from the RVCT version, in a way that suggests that
both may have been broken at some point, and that they weren't fixed
in the same way nor at the same time.

So bring the GCC version in line with the RVCT version, and at the
same time, deobfuscate the comment.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19244 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoArmPlatformPkg/RTSM: use declared PPI rather than module local var
Ard Biesheuvel [Mon, 14 Dec 2015 13:00:30 +0000 (13:00 +0000)]
ArmPlatformPkg/RTSM: use declared PPI rather than module local var

We can refer to gArmMpCoreInfoPpiGuid directly if we declare it under
[Ppis] in the library's .inf so there is no need to copy it into a
module local variable.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19243 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoArmPlatformPkg/CTA9x4: use declared PPI rather than module local var
Ard Biesheuvel [Mon, 14 Dec 2015 13:00:21 +0000 (13:00 +0000)]
ArmPlatformPkg/CTA9x4: use declared PPI rather than module local var

We can refer to gArmMpCoreInfoPpiGuid directly if we declare it under
[Ppis] in the library's .inf so there is no need to copy it into a
module local variable.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19242 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoArmPlatformPkg/CTA15-A7: use declared PPI rather than module local var
Ard Biesheuvel [Mon, 14 Dec 2015 13:00:12 +0000 (13:00 +0000)]
ArmPlatformPkg/CTA15-A7: use declared PPI rather than module local var

We can refer to gArmMpCoreInfoPpiGuid directly if we declare it under
[Ppis] in the library's .inf so there is no need to copy it into a
module local variable.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19241 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoArmPlatformPkg/ArmJunoLib: use declared PPI rather than module local var
Ard Biesheuvel [Mon, 14 Dec 2015 13:00:03 +0000 (13:00 +0000)]
ArmPlatformPkg/ArmJunoLib: use declared PPI rather than module local var

We can refer to gArmMpCoreInfoPpiGuid directly if we declare it under
[Ppis] in the library's .inf so there is no need to copy it into a
module local variable.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19240 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoArmPlatformPkg/ArmPlatformLibNull: use declared PPI rather than module local var
Ard Biesheuvel [Mon, 14 Dec 2015 12:59:52 +0000 (12:59 +0000)]
ArmPlatformPkg/ArmPlatformLibNull: use declared PPI rather than module local var

We can refer to gArmMpCoreInfoPpiGuid directly if we declare it under
[Ppis] in the library's .inf so there is no need to copy it into a
module local variable.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19239 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoBaseTools/Ecc: Fix a bug to report fake issue
Hess Chen [Mon, 14 Dec 2015 08:08:21 +0000 (08:08 +0000)]
BaseTools/Ecc: Fix a bug to report fake issue

Fix a bug to ignore the lib ins defined in [components] section but also listed in SkipDir

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hess Chen <hesheng.chen@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19238 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoArmVirtPkg RVCT: build DXE_RUNTIME_DRIVER modules with 4 KB alignment
Ard Biesheuvel [Mon, 14 Dec 2015 07:56:19 +0000 (07:56 +0000)]
ArmVirtPkg RVCT: build DXE_RUNTIME_DRIVER modules with 4 KB alignment

This adds the RVCT armlink command line switches to build modules of type
DXE_RUNTIME_DRIVER with 4 KB PE/COFF section alignment, allowing the OS
to apply stricter permissions to the .text and .data sections.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Laszlo Ersek <lersek@redhat.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19237 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoBaseTools/GenFw RVCT: fix relocation processing of PT_DYNAMIC sections
Ard Biesheuvel [Mon, 14 Dec 2015 07:56:02 +0000 (07:56 +0000)]
BaseTools/GenFw RVCT: fix relocation processing of PT_DYNAMIC sections

Unlike GNU ld, which can be instructed to emit symbol based static
relocations into fully linked binaries using the --emit-relocs command
line switch, the RVCT armlink tool can only emit dynamic relocations
into the PT_DYNAMIC segment.

This has two consequences
. we can only identify absolute relocations, so there is no way to fix
  up relative relocations between sections, or check their validity in
  the PE/COFF layout
. the r_offset fields of the PT_DYNAMIC DT_REL entries are relative
  either to the base of the image or to any of its segments but *not* to
  the base of the input section that contains the location they refer
  to, and converting them to PE/COFF image offsets is non-trivial unless
  the sections are laid out in the same way in the ELF and PE/COFF
  versions of the binary.

There is really only one way to deal with this, and that is to require
that the ELF and PE/COFF versions of the binary are identical in memory.
So enforce that in the code.

Also, fix the utterly broken relocation fixup code that dereferences
ELF32_R_SYM(r_info) both as a 1-based program header index and a 0-based
section header index. If this code ever produced working binaries, it
was purely by chance.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19236 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoBaseTools RVCT: use scatter file to enforce minimum section alignment
Ard Biesheuvel [Mon, 14 Dec 2015 07:55:46 +0000 (07:55 +0000)]
BaseTools RVCT: use scatter file to enforce minimum section alignment

Up until SVN r18540, GenFw created invalid PE/COFF binaries for the ARM
architecture, by allowing PE/COFF .data sections to appear at offsets
that were not aligned to the global PE/COFF section alignment. The
reason for this was that the relocation metadata emitted by RVCT's
armlink only contains dynamic absolute relocations, so it is impossible
to recalculate relative relocations between .text and .data, and so the
relative offset between the two needs to be preserved.

Since r18540, we do align .data to the PE/COFF section alignment,
resulting in potentially corrupt PE/COFF binaries unless .data happens
to appear at a 32-byte aligned offset. So let's introduce a RVCT scatter
file that sets this alignment for the ELF .data section (and subsequent
.bss section).

At the same time, set the start offset to 0x220 bytes (which is the size
of our 32-bit PE/COFF header) so that the memory layouts are identical
between ELF and PE/COFF. Also add a 4 KB aligned version that can be
used to build DXE_RUNTIME_DRIVER modules with runtime memory protection
enabled.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Eugene Cohen <eugene@hp.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19235 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdePkg/BaseIoLibIntrinsic: Add EBC support
Michael Kinney [Mon, 14 Dec 2015 06:11:17 +0000 (06:11 +0000)]
MdePkg/BaseIoLibIntrinsic: Add EBC support

The EBC instruction set supports memory and MMIO access, but not
I/O port access.  Add EBC support to BaseIoLibIntrinsic that
generates an ASSERT() if the IoReadXX()/IoWriteXX() APIs are used.
This matches the implementation for other CPU types that do not
support I/O port access.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19234 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoShellPkg/Mm: Fix build warnings
Michael Kinney [Mon, 14 Dec 2015 06:03:58 +0000 (06:03 +0000)]
ShellPkg/Mm: Fix build warnings

Fix build warnings for potentially uninitialized local variables
in the functions ShellMmLocateIoProtocol() and ShellCommandRunMm()
in the Shell implementation of the 'mm' command.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19233 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg/PciSioSerialDxe: Fix compiler warnings
Michael Kinney [Mon, 14 Dec 2015 05:29:02 +0000 (05:29 +0000)]
MdeModulePkg/PciSioSerialDxe: Fix compiler warnings

Add missing braces in module global mControllerDevicePathTemplate.
Initialize ControllerNumber and ContainsControllerNode in
SerialControllerDriverStart() to address warning for potential use
before initialization warning.
Move initialization of local SerialIo earlier in
SerialControllerDriverStart() to address warning for potential use
before initialization warning.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19232 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdePkg: backout Ipmi2.0 definitions header file.
Daocheng Bu [Mon, 14 Dec 2015 03:52:26 +0000 (03:52 +0000)]
MdePkg: backout Ipmi2.0 definitions header file.

The file name is too long and with "Definitions" word
that is duplicated meanings for the header file.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Daocheng Bu <daocheng.bu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19231 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdePkg: Add 3 macro defined in latest TPM2 specification.
Yao, Jiewen [Mon, 14 Dec 2015 00:52:49 +0000 (00:52 +0000)]
MdePkg: Add 3 macro defined in latest TPM2 specification.

Add 3 macro to TPM_RH Constants, which is in latest TPM2 spec.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com>
Reviewed-by: "Zhang, Chao B" <chao.b.zhang@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19230 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoShellPkg: Initialize the local pointer to avoid potential suspicious dereference.
Qiu Shumin [Sun, 13 Dec 2015 08:44:49 +0000 (08:44 +0000)]
ShellPkg: Initialize the local pointer to avoid potential suspicious dereference.

1. Initialize the local pointer 'HandleBuffer'.
2. When 'LocateHandleBuffer' return error 'HandleBuffer' is expected unchanged, add code make sure this.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19229 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoShellPkg/Shell - Fix ASSERT() when FvSimpleFileSystemDxe is used
Michael Kinney [Sat, 12 Dec 2015 19:28:21 +0000 (19:28 +0000)]
ShellPkg/Shell - Fix ASSERT() when FvSimpleFileSystemDxe is used

When the FvSimpleFileSystemDxe module is included in a platform,
Simple File System Protocols are produced for firmware volumes(FV)
that do not have the same style device paths as file systems with
file names.  The ShellPkg has an assumption that the device path
contains device path nodes of type MEDIA_FILEPATH_DP and generates
an ASSERT() if any other device path nodes are encountered.  This
change removes the ASSERT() condition and instead returns NULL that
means EfiShellGetFilePathFromDevicePath() can not convert the
device path nodes that represent the file path to a Unicode string.

Cc: Jaben Carsey <jaben.carsey@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19228 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoUefiCpuPkg/UefiCpuPkg.uni: Fix one typo
Jeff Fan [Fri, 11 Dec 2015 08:06:38 +0000 (08:06 +0000)]
UefiCpuPkg/UefiCpuPkg.uni: Fix one typo

'.' should be '_'.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Shumin Qiu <shumin.qiu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19226 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg: Convert HiiDatabaseDxe ConfigRouting ASSERT to return an error
Eugene Cohen [Fri, 11 Dec 2015 03:07:59 +0000 (03:07 +0000)]
MdeModulePkg: Convert HiiDatabaseDxe ConfigRouting ASSERT to return an error

This should just return an error and not assert.  We hit this when testing with a client that was trying to access the old IP4_CONFIG on firmware implementing IP4_CONFIG2.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eugene Cohen <eugene@hp.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19219 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoCryptoPkg/OpensslLib: upgrade OpenSSL version to 1.0.2e
Qin Long [Fri, 11 Dec 2015 02:29:05 +0000 (02:29 +0000)]
CryptoPkg/OpensslLib: upgrade OpenSSL version to 1.0.2e

OpenSSL has released version 1.0.2e with security fixes.
Upgrade the supported OpenSSL version in CryptoPkg/OpensslLib
from 1.0.2d to 1.0.2e.
(Note: This is based on Ard's previous patch with extra fix
       https://rt.openssl.org/Ticket/Display.html?id=4175)

Contributed-under: TianoCore Contribution Agreement 1.0
Singed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Qin Long <qin.long@intel.com>
Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19218 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg ScsiBusDxe: Fix caller event may nerver be signaled
Hao Wu [Fri, 11 Dec 2015 01:59:09 +0000 (01:59 +0000)]
MdeModulePkg ScsiBusDxe: Fix caller event may nerver be signaled

For function ScsiExecuteSCSICommand(), when the 'Event' parameter is not
NULL but the target SCSI device does not support non-blocking I/O, it will
execute a blocking I/O operation instead.

However, after the SCSI operation is done, the 'Event' is not signaled to
inform the caller.

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>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19217 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg UfsPassThruDxe: Add Non-blocking I/O Support
Hao Wu [Fri, 11 Dec 2015 01:58:45 +0000 (01:58 +0000)]
MdeModulePkg UfsPassThruDxe: Add Non-blocking I/O Support

Previously, UfsPassThruPassThru function does not handle the 'Event'
parameter and blocking read/write operations are always executed.

This commit enables non-blocking read/write feature for UFS devices.

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>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19216 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg ScsiDiskDxe: Add BlockIO2 Support
Hao Wu [Fri, 11 Dec 2015 01:58:15 +0000 (01:58 +0000)]
MdeModulePkg ScsiDiskDxe: Add BlockIO2 Support

Together with EFI_BLOCK_IO_PROTOCOL, EFI_BLOCK_IO2_PROTOCOL is installed
as well in ScsiDiskDxe.

Block I/O 2 functions are implemented:
Reset
ReadBlocksEx
WriteBlocksEx
FlushBlocksEx

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>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19215 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdePkg UefiScsiLib: Add non-blocking support for SCSI Read/Write command
Hao Wu [Fri, 11 Dec 2015 01:57:41 +0000 (01:57 +0000)]
MdePkg UefiScsiLib: Add non-blocking support for SCSI Read/Write command

Four new functions are added to UefiScsiLib:
ScsiRead10CommandEx
ScsiWrite10CommandEx
ScsiRead16CommandEx
ScsiWrite16CommandEx

They support both blocking and non-blocking SCSI Read/Write operation
depending on the optional parameter 'Event' passed to those APIs.

When 'Event' is NULL, these four functions will call the non-EX version
couterparts to execute blocking SCSI I/O. When 'Event' is not NULL,
non-blocking I/O operation is executed.

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>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19214 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoArmPlatformPkg: Fix stack switch bug after commit 7945b29
Heyi Guo [Thu, 10 Dec 2015 16:07:03 +0000 (16:07 +0000)]
ArmPlatformPkg: Fix stack switch bug after commit 7945b29

This is the complementary patch for the commit 7945b29, which strictly
aligns temporary heap size and temporary stack size, but does not do
the same thing when switching stack and heap to permanent memory, and
then it may cause fatal data corruption like PHIT HOB lost and stack
pointer unaligned.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Heyi Guo <heyi.guo@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19213 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoShellPkg: Fix ifconfig hang issue with incomplete parameters
Jiaxin Wu [Thu, 10 Dec 2015 10:59:29 +0000 (10:59 +0000)]
ShellPkg: Fix ifconfig hang issue with incomplete parameters

This patch is used to fix ifconfig hang issue with incomplete
parameters. In addition, some error related output information
is added to increase the interactivity.

Cc: Leekha Shaveta <shaveta@freescale.com>
Cc: Carsey Jaben <jaben.carsey@intel.com>
Cc: Ye Ting <ting.ye@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Tested-by: Leekha Shaveta <shaveta@freescale.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19212 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoUefiCpuPkg/MtrrLib:Initialize local variables before use them
Jeff Fan [Thu, 10 Dec 2015 07:10:13 +0000 (07:10 +0000)]
UefiCpuPkg/MtrrLib:Initialize local variables before use them

Cc: Shumin Qiu <shumin.qiu@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: Shumin Qiu <shumin.qiu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19183 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoUefiCpuPkg/UefiCpuPkg.uni: Add PcdCpuNumberOfReservedVariableMtrrs
Jeff Fan [Thu, 10 Dec 2015 07:09:45 +0000 (07:09 +0000)]
UefiCpuPkg/UefiCpuPkg.uni: Add PcdCpuNumberOfReservedVariableMtrrs

Cc: Shumin Qiu <shumin.qiu@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: Shumin Qiu <shumin.qiu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19182 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoShellPkg/mm: Fix mm to support multiple root bridge platform
Ruiyu Ni [Thu, 10 Dec 2015 04:18:35 +0000 (04:18 +0000)]
ShellPkg/mm: Fix mm to support multiple root bridge platform

In multiple root bridge platforms, different root bridges may
share the same segment but occupy different range of buses,
or may occupy different segments.
The fix is to find the correct root bridge IO instance by
comparing not only the segment but also the bus ranges.
It tries to access the MMIO and IO in the following order:
PciRootBridgeIo, CpuIo and direct IO.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19181 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoShellPkg/mm: Fix the help message to align to implementation and spec
Ruiyu Ni [Thu, 10 Dec 2015 04:17:59 +0000 (04:17 +0000)]
ShellPkg/mm: Fix the help message to align to implementation and spec

The implementation is already aligned to spec.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19180 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg: Add PciSioSerialDxe driver
Ruiyu Ni [Thu, 10 Dec 2015 02:47:16 +0000 (02:47 +0000)]
MdeModulePkg: Add PciSioSerialDxe driver

PciSioSerialDxe driver can manages UARTs on a SIO chip or a PCI/PCIE
card.
It manages the SIO instance whose last device path node is a ACPI
device path and the HID in the ACPI device path node equals to
EISA_PNP_ID (0x501).
It also manages the PCI IO instance whose class code is 7/0/2 (16550
UART). But when proper value is set to PcdPciSerialParameters, the
driver can also manage non-standard PCI serial cards by matching
the Vendor ID and Device ID specified in PcdPciSerialParameters.
The PCI BAR index, IO/MMIO offset, register stride, clock rate can
also be specified through the same PCD.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19179 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoNetworkPkg: Fix the potential NULL pointer dereferenced issue
Jiaxin Wu [Thu, 10 Dec 2015 01:44:56 +0000 (01:44 +0000)]
NetworkPkg: Fix the potential NULL pointer dereferenced issue

This patch is used to fix the potential NULL pointer dereferenced
in function 'ParseDnsResponse'.

Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Zhang Lubo <lubo.zhang@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Zhang Lubo <lubo.zhang@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19178 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoShellPkg: Make 'dh' support showing all spec defined protocols.
Jaben Carsey [Wed, 9 Dec 2015 23:08:07 +0000 (23:08 +0000)]
ShellPkg: Make 'dh' support showing all spec defined protocols.

When using 'dh' to dump all protocols installed on a handle, some of
them are shown as 'UnknownDevice'.

Device patch make 'dh' support all spec defined protocols.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Samer El-Haj-Mahmoud <samer.el-haj-mahmoud@hpe.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19177 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoShellPkg: Convert all .uni files to utf-8
Jordan Justen [Wed, 9 Dec 2015 23:07:58 +0000 (23:07 +0000)]
ShellPkg: Convert all .uni files to utf-8

To convert these files I ran:

$ python3 BaseTools/Scripts/ConvertUni.py ShellPkg

Cc: Jaben Carsey <jaben.carsey@intel.com>
Cc: Shumin Qiu <shumin.qiu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19176 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdePkg: Restore SetupMode macro definition
Chao Zhang [Wed, 9 Dec 2015 01:27:38 +0000 (01:27 +0000)]
MdePkg: Restore SetupMode macro definition

Restore SetupMode macro definition to keep backward compatibility. No current module is referencing them now.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chao Zhang <chao.b.zhang@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19175 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoArmPkg: update InvalidateInstructionCacheRange to flush only to PoU
Eugene Cohen [Tue, 8 Dec 2015 15:58:53 +0000 (15:58 +0000)]
ArmPkg: update InvalidateInstructionCacheRange to flush only to PoU

This patch updates the ArmPkg variant of InvalidateInstructionCacheRange to
flush the data cache only to the point of unification (PoU). This improves
performance and also allows invalidation in scenarios where it would be
inappropriate to flush to the point of coherency (like when executing code
from L2 configured as cache-as-ram).

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eugene Cohen <eugene@hp.com>
Added AARCH64 and ARM/GCC implementations of the above.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Eugene Cohen <eugene@hp.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19174 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoArmPlatformPkg/ArmVExpress-CTA15-A7: remove stale ArmPlatformGlobalVariable PCD
Ard Biesheuvel [Tue, 8 Dec 2015 14:16:30 +0000 (14:16 +0000)]
ArmPlatformPkg/ArmVExpress-CTA15-A7: remove stale ArmPlatformGlobalVariable PCD

Now that we removed the complete ArmPlatformGlobalVariable implementation,
remove stale PCD references to it from ArmVExpress-CTA15-A7.dsc

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19173 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoArmPkg/PrePeiCore: use explicit UINTN cast in VOID* arithmetic
Ard Biesheuvel [Tue, 8 Dec 2015 14:15:14 +0000 (14:15 +0000)]
ArmPkg/PrePeiCore: use explicit UINTN cast in VOID* arithmetic

RVCT does not like the arithmetic involving a VOID* pointer that was
introduced in SVN r19163, so use explicit casts instead.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19172 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoDeviceManagerLib: Update copyright, use BSD license instead of Intel license.
Eric Dong [Tue, 8 Dec 2015 13:49:40 +0000 (13:49 +0000)]
DeviceManagerLib: Update copyright, use BSD license instead of Intel license.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19171 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoBootMaintenanceManagerLib: Update copyright, use BSD license instead of Intel license.
Eric Dong [Tue, 8 Dec 2015 13:49:15 +0000 (13:49 +0000)]
BootMaintenanceManagerLib: Update copyright, use BSD license instead of Intel license.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19170 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoFileExplorerLib: Update copyright, use BSD license instead of Intel license.
Eric Dong [Tue, 8 Dec 2015 13:48:35 +0000 (13:48 +0000)]
FileExplorerLib: Update copyright, use BSD license instead of Intel license.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19169 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoBootManagerLib: Update copyright, use BSD license instead of Intel license.
Eric Dong [Tue, 8 Dec 2015 13:47:23 +0000 (13:47 +0000)]
BootManagerLib: Update copyright, use BSD license instead of Intel license.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19168 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg: Use PcdSet##S to replace PcdSet##
Dandan Bi [Tue, 8 Dec 2015 08:03:42 +0000 (08:03 +0000)]
MdeModulePkg: Use PcdSet##S to replace PcdSet##

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Qiu Shumin <shumin.qiu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19166 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoUefiCpuPkg/CpuMpPei: Add missing point at function header
Jeff Fan [Tue, 8 Dec 2015 07:51:29 +0000 (07:51 +0000)]
UefiCpuPkg/CpuMpPei: Add missing point at function header

Cc: Qiu Shumin <shumin.qiu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Qiu Shumin <shumin.qiu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19165 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoBaseTools GCC: avoid the use of COMMON symbols
Ard Biesheuvel [Tue, 8 Dec 2015 07:40:12 +0000 (07:40 +0000)]
BaseTools GCC: avoid the use of COMMON symbols

The default behavior of the GCC compiler is to emit uninitialized globals
with external linkage into a COMMON section, where duplicate definitions
are merged. This may result in unexpected behavior, since global variables
defined under the same name in different C files may not refer to the same
logical data item.

For instance, the definitions of EFI_EVENT mVirtualAddressChangeEvent that
[used to] appear in the following files:

  CryptoPkg/Library/BaseCryptLib/SysCall/RuntimeMemAllocation.c
  MdeModulePkg/Universal/Variable/RuntimeDxe/VariableDxe.c

will be folded into a single instance of the variable when the latter
module includes the former library, which can lead to unexpected results.

Even if some may argue that there are legal uses for COMMON allocation, the
high modularity of EDK2 combined with the low level of awareness of the
intracicies surrounding common allocation and the generally poor EDK2
developer discipline regarding the use of the STATIC keyword* make a strong
case for disabling it by default, and re-enabling it explicitly for packages
that depend on it.

So prevent GCC from emitting variables into the COMMON section, by passing
-fno-common to the compiler, and discarding the section in the GNU ld linker
script.

* Any function or variable that is only referenced from the translation unit
  that defines it could be made STATIC. This does not only prevent issues
  like the above, it also allows the compiler to generate better code, e.g.,
  drop out of line function definitions after inlining all invocations or
  perform constant propagation on variables.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19164 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoArmPkg/PrePeiCore: adhere to architectural stack alignment requirement
Ard Biesheuvel [Tue, 8 Dec 2015 07:35:30 +0000 (07:35 +0000)]
ArmPkg/PrePeiCore: adhere to architectural stack alignment requirement

Instead of using fuzzy arithmetic with a hardcoded stack alignment value
of 0x4, use the symbolic constant CPU_STACK_ALIGNMENT (which is at least
8 bytes, btw) to round the temporary stack base and size.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19163 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoUefiCpuPkg/MtrrLib: Add MtrrSetMemoryAttributeInMtrrSettings()
Michael Kinney [Tue, 8 Dec 2015 05:26:26 +0000 (05:26 +0000)]
UefiCpuPkg/MtrrLib: Add MtrrSetMemoryAttributeInMtrrSettings()

Add new API MtrrSetMemoryAttributeInMtrrSettings() in MtrrLib. Platform could
use this API to set MTRR setting into local MTRR settings buffer instead of
MTRRs. At last, platform could use MtrrSetAllMtrrs() to set the MTRR settings
into MTRRs totally. It could improve MTRRs programming performance obviously,
specially when platform is going to program a set of MTRRs.

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: Michael Kinney <michael.d.kinney@intel.com>
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19162 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoUefiCpuPkg/MtrrLib: Add MtrrDebugPrintAllMtrrsWorker()
Michael Kinney [Tue, 8 Dec 2015 05:25:48 +0000 (05:25 +0000)]
UefiCpuPkg/MtrrLib: Add MtrrDebugPrintAllMtrrsWorker()

MtrrDebugPrintAllMtrrsWorker() provides the capability to dump the MTRR setting
from MTRRs or the input MTRR settings buffer.

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: Michael Kinney <michael.d.kinney@intel.com>
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19161 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoUefiCpuPkg/MtrrLib: Add worker functions to access MTRRs or variable
Michael Kinney [Tue, 8 Dec 2015 05:25:21 +0000 (05:25 +0000)]
UefiCpuPkg/MtrrLib: Add worker functions to access MTRRs or variable

Add worker functions that could access MTRRs or MTRR settings in input buffer.

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: Michael Kinney <michael.d.kinney@intel.com>
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19160 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoUefiCpuPkg/MtrrLib: Print MTRR settings when set fixed/variable MTRRs
Michael Kinney [Tue, 8 Dec 2015 05:24:48 +0000 (05:24 +0000)]
UefiCpuPkg/MtrrLib: Print MTRR settings when set fixed/variable MTRRs

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: Michael Kinney <michael.d.kinney@intel.com>
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19159 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoUefiCpuPkg/MtrrLib: Reduce hardware init when program variable MTRRs
Michael Kinney [Tue, 8 Dec 2015 05:24:18 +0000 (05:24 +0000)]
UefiCpuPkg/MtrrLib: Reduce hardware init when program variable MTRRs

When MtrrSetMemoryAttribute() programs variable MTRRs, it may disable/enable
cache and disable/enable MTRRs several times. This updating tries to do
operation in local variable and does the hardware initialization one time only.

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: Michael Kinney <michael.d.kinney@intel.com>
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19158 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoUefiCpuPkg/MtrrLib: Reduce hardware init when program fixed MTRRs
Michael Kinney [Tue, 8 Dec 2015 05:23:44 +0000 (05:23 +0000)]
UefiCpuPkg/MtrrLib: Reduce hardware init when program fixed MTRRs

When MtrrSetMemoryAttribute() programs fixed MTRRs, it may disable/enable cache
and disable/enable MTRRs several times. This updating tries to do operation in
local variable and does the hardware initialization one time only.

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: Michael Kinney <michael.d.kinney@intel.com>
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19157 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoUefiCpuPkg/MtrrLib: Add MtrrGetMemoryAttributeInVariableMtrrWorker ()
Michael Kinney [Tue, 8 Dec 2015 05:23:13 +0000 (05:23 +0000)]
UefiCpuPkg/MtrrLib: Add MtrrGetMemoryAttributeInVariableMtrrWorker ()

Add function to shadow the content of variable MTRRs into an internal array:
VariableMtrr. And used MtrrGetMemoryAttributeInVariableMtrrWorker() in other
functions.

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: Michael Kinney <michael.d.kinney@intel.com>
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19156 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoUefiCpuPkg/MtrrLib: Make use of worker functions to get MTRRs count
Michael Kinney [Tue, 8 Dec 2015 05:22:42 +0000 (05:22 +0000)]
UefiCpuPkg/MtrrLib: Make use of worker functions to get MTRRs count

Try to make use of worker functions to get MTRRs count. It could avoid invoking
IsMtrrSupported() for many times.

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: Michael Kinney <michael.d.kinney@intel.com>
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19155 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoUefiCpuPkg/MtrrLib: Adjust functions order
Michael Kinney [Tue, 8 Dec 2015 05:22:01 +0000 (05:22 +0000)]
UefiCpuPkg/MtrrLib: Adjust functions order

Only adjust functions order and there is no any real functionality impact.

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: Michael Kinney <michael.d.kinney@intel.com>
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19154 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoUefiCpuPkg/MtrrLib: Add worker functions not invoke IsMtrrSupported()
Michael Kinney [Tue, 8 Dec 2015 05:21:24 +0000 (05:21 +0000)]
UefiCpuPkg/MtrrLib: Add worker functions not invoke IsMtrrSupported()

Abstract some worker functions not to invoke IsMtrrSupported(). They could be
used by other functions to reduce the number of invoking times on
IsMtrrSupported().

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: Michael Kinney <michael.d.kinney@intel.com>
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19153 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoUefiCpuPkg/MtrrLib: Fix some typo and clean up code format
Michael Kinney [Tue, 8 Dec 2015 05:20:44 +0000 (05:20 +0000)]
UefiCpuPkg/MtrrLib: Fix some typo and clean up code format

Fixed some typo. Removed some trailing spaces and TAB key. Clean up code format.

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: Michael Kinney <michael.d.kinney@intel.com>
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19152 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoUefiCpuPkg/MtrrLib: Add PCD PcdCpuNumberOfReservedVariableMtrrs
Jeff Fan [Tue, 8 Dec 2015 05:19:34 +0000 (05:19 +0000)]
UefiCpuPkg/MtrrLib: Add PCD PcdCpuNumberOfReservedVariableMtrrs

Current MtrrLib reserves 2 variable MTRRs for some legacy OS boot (CSM boots)
may require some MTRRs to be reserved for OS use. But UEFI OS boot will not use
MTRRs.

Per Scott's suggestion in
link: http://article.gmane.org/gmane.comp.bios.edk2.devel/4099
Add one PCD PcdCpuNumberOfReservedVariableMtrrs to specify the number of
variable MTRRs reserved for OS use. Setting its default value to 2 is for
back-compatibility.

Cc: Scott Duplichan <scott@notabs.org>
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>
Suggested-by: Scott Duplichan <scott@notabs.org>
Reviewed-by: Feng Tian <feng.tian@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19151 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoRevert the change in r19143 for BUILDRULEORDER.
Yonghong Zhu [Tue, 8 Dec 2015 03:06:41 +0000 (03:06 +0000)]
Revert the change in r19143 for BUILDRULEORDER.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19150 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoShellPkg: Refine the code to reduce time cost of 'map -r'
Qiu Shumin [Tue, 8 Dec 2015 02:00:16 +0000 (02:00 +0000)]
ShellPkg: Refine the code to reduce time cost of 'map -r'

In some platform 'map -r' may cost more than 1 min. This patch filter the target handles by
BlockIO and SimpleFileSystem protocol to reduce the time cost.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19149 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoArmPkg/BdsLib: Send RemainingDevicePath to PXE Load File protocol
Heyi Guo [Mon, 7 Dec 2015 16:51:35 +0000 (16:51 +0000)]
ArmPkg/BdsLib: Send RemainingDevicePath to PXE Load File protocol

Load File protocol requires remaining device path rather than whole
device path. For PXE, it actually requires end node device path only,
or else invalid parameter will be returned directly.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Heyi Guo <heyi.guo@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19148 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoCryptoPkg/OpensslLib: comment out unused code
Ard Biesheuvel [Mon, 7 Dec 2015 09:22:21 +0000 (09:22 +0000)]
CryptoPkg/OpensslLib: comment out unused code

This comments out the pqueue and ts_* source files from the OpensslLib
build, since they have no users.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Qin Long <qin.long@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19147 6f19259b-4bc3-4df7-8a09-765794883524