]> git.proxmox.com Git - mirror_edk2.git/log
mirror_edk2.git
8 years agoArmVirtPkg/ArmVirtQemu: drop ARM BDS and make Intel BDS the default
Ard Biesheuvel [Tue, 4 Aug 2015 18:41:19 +0000 (18:41 +0000)]
ArmVirtPkg/ArmVirtQemu: drop ARM BDS and make Intel BDS the default

ARM BDS support in ArmVirtQemu has been broken since SVN r17969
("ArmPkg/BdsLib: Remove Linux loader from BdsLib") dated July 14th.

Instead of fixing this, let's get rid of the ARM BDS and LinuxLoader
altogether: they violate both the UEFI spec and the arm64 Linux boot
protocol, and lack the level of integration with the QEMU command
line that the Intel BDS has when running under ArmVirtPkg or OvmfPkg.

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

8 years agoIntelFrameworkModulePkg:Refine the code comments in LegacyBootMaintUiLib
Dandan Bi [Tue, 4 Aug 2015 09:13:47 +0000 (09:13 +0000)]
IntelFrameworkModulePkg:Refine the code comments in LegacyBootMaintUiLib

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

8 years agoMdeModulePkg:Refine the code comments in UiApp
Dandan Bi [Tue, 4 Aug 2015 09:11:42 +0000 (09:11 +0000)]
MdeModulePkg:Refine the code comments in UiApp

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

8 years agoMdeModulePkg:Fix the issue that refresh the question fail in DriverSample
Dandan Bi [Tue, 4 Aug 2015 09:09:10 +0000 (09:09 +0000)]
MdeModulePkg:Fix the issue that refresh the question fail in DriverSample

Once the question is refreshed,the processing should happen in the callback function
of EFI_BROWSER_ACTION_RETRIEVE case,rather than EFI_BROWSER_ACTION_CHANGING in DriverSample.

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

8 years agoVlv2TbltDevicePkg: Sync the branch changes to trunk.
Tim He [Tue, 4 Aug 2015 02:55:02 +0000 (02:55 +0000)]
Vlv2TbltDevicePkg: Sync the branch changes to trunk.

Support compatible board, and fixed some bugs.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Tim He <tim.he@intel.com>
Reviewed-by: David Wei <david.wei@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18149 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg DxeCore: Move ProcessLibraryConstructorList()
Star Zeng [Tue, 4 Aug 2015 01:41:48 +0000 (01:41 +0000)]
MdeModulePkg DxeCore: Move ProcessLibraryConstructorList()

to right after CoreInitializeGcdServices().

Why?
Some platforms maybe report both below 4G and above 4G memory resource hob as tested,
then CoreInitializeMemoryServices() will find and add the tested above 4G memory resource hob to memory descriptor for early memory allocation services,
then if ProcessLibraryConstructorList() that has library constructor tries to allocate below 4G memory and will fail.
In fact, the following CoreInitializeGcdServices() will add all the memory resource hob to GCD map,
and add the tested below 4G memory resource hob to memory descriptor,
but it has been too late for ProcessLibraryConstructorList().

Also move below two lines as they are needed to be after
the constructor of DxeCorePerfomanceLib.
  PERF_END   (NULL,"PEI", NULL, 0) ;
  PERF_START (NULL,"DXE", NULL, 0) ;

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

8 years agoMdePkg/UefiDevicePathLib: Fix RAM Disk Device Path To Text Issue
Tapan Shah [Tue, 4 Aug 2015 01:09:49 +0000 (01:09 +0000)]
MdePkg/UefiDevicePathLib: Fix RAM Disk Device Path To Text Issue

Perform Left Shift 32 bits of a 32-bit StartAddr[1] and EndingAddr[1]
instead of Right Shift when displaying 64-bit Start and End Address Value.

StartAddr[1] and EndingAddr[1] are already a 32-bit value and it should
perform left shift 32-bit to generate a complete 64-bit value along with
StartAddr[0] and EndingAddr[0] respectively.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Tapan Shah <tapandshah@hp.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18144 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg:Fix the issue FindQuestionFromProgress in SetupBrowserDxe is broken
Dandan Bi [Mon, 3 Aug 2015 09:44:04 +0000 (09:44 +0000)]
MdeModulePkg:Fix the issue FindQuestionFromProgress in SetupBrowserDxe is broken

If the storage of the question is EFI_HII_VARSTORE_BUFFER/EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER,
in SetupBrowserDxe the configuration stings contain uppercase,but HiiDataBaseDxe generates the
ConfigResp string in lowercase,they mismatch,so FindQuestionFromProgress function is broken.
Now convert the configuration string in SetupBrowserDxe to lowercase to fix this issue.

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

8 years agoBaseTools IA32/X64: Use GccBase.lds instead of gcc*-ld-script
Ard Biesheuvel [Mon, 3 Aug 2015 08:23:59 +0000 (08:23 +0000)]
BaseTools IA32/X64: Use GccBase.lds instead of gcc*-ld-script

These scripts all now have the same contents, so we only need to use
GccBase.lds. Therefore we can delete gcc-4K-align-ld-script,
gcc4.4-ld-script and gcc4.9-ld-script.

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

8 years agoBaseTools AARCH64: remove incremental linker script for 64K alignment
Ard Biesheuvel [Mon, 3 Aug 2015 08:23:36 +0000 (08:23 +0000)]
BaseTools AARCH64: remove incremental linker script for 64K alignment

Now that we moved all users to the unified GCC linker script, remove
the old 64 KB incremental linker script for AARCH64 since it is now
unused.

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

8 years agoArmVirtPkg: move to unified GCC linker script
Ard Biesheuvel [Mon, 3 Aug 2015 08:23:26 +0000 (08:23 +0000)]
ArmVirtPkg: move to unified GCC linker script

Move to the parametrised generic GCC linker script and set 64 KB
alignment, instead of using the AARCH64 specific incremental linker
script for 64 KB alignment which is about to be removed.

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

8 years agoArmPlatformPkg/ArmVExpressPkg: move to unified GCC linker script
Ard Biesheuvel [Mon, 3 Aug 2015 08:23:16 +0000 (08:23 +0000)]
ArmPlatformPkg/ArmVExpressPkg: move to unified GCC linker script

Move to the parametrised generic GCC linker script and set 64 KB
alignment, instead of using the AARCH64 specific incremental linker
script for 64 KB alignment which is about to be removed.

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

8 years agoBaseTools AARCH64: move to unified GCC linker script
Ard Biesheuvel [Mon, 3 Aug 2015 08:23:05 +0000 (08:23 +0000)]
BaseTools AARCH64: move to unified GCC linker script

Drop the GCC AARCH64 specific linker script and use the new
unified one instead.

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

8 years agoBaseTools GCC: move AutoGen.obj contents to .text section
Ard Biesheuvel [Mon, 3 Aug 2015 08:22:50 +0000 (08:22 +0000)]
BaseTools GCC: move AutoGen.obj contents to .text section

All AutoGen.obj files consist of global GUID definitions, fixed
and patchable PCDs and other data that is essentially read-only at
runtime but has not been declared as such for various reasons.

By moving these contents to .text we achieve two things:
- global GUIDs and other data items which must be constant for correct
  program operation can no longer be modified, for instance, when
  running a DXE_RUNTIME_MODULE binary under the OS with the Properties
  Table feature for memory protection enabled;
- the .data section becomes smaller, and may be dropped completely for
  many XIP modules, which reduces wasted FV space if the PE/COFF section
  alignment is large.

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

8 years agoBaseTools GCC: align start of .data to .text alignment
Ard Biesheuvel [Mon, 3 Aug 2015 08:22:39 +0000 (08:22 +0000)]
BaseTools GCC: align start of .data to .text alignment

Now that GenFw honors the ELF section alignment when placing the
PE/COFF sections in the output, the start of the PE/COFF version of
.data will be aligned to the alignment of .text if its alignment is
higher than the default. So duplicate this behavior in the ELF output,
this will make the memory layout of the PE/COFF binary match the
layout of the ELF version more closely.

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

8 years agoBaseTools GCC: add unified GCC linker script for all archs and versions
Ard Biesheuvel [Mon, 3 Aug 2015 08:22:28 +0000 (08:22 +0000)]
BaseTools GCC: add unified GCC linker script for all archs and versions

This unifies all GCC linker scripts into a single parametrised GCC
linker script that can be used for all GCC versions and architectures.

The two parameters that can be set on the linker command line are:
- PECOFF_HEADER_SIZE, this is a build time property of GenFw, but
  its value is different between 32-bit and 64-bit;
- common-page-size, this can be set using -z on the ld command line,
  and controls the value of the COMMONPAGESIZE constant when used in
  a linker script. This value is used for the minimum section alignment.

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

8 years agoBaseTools IA32/X64: get header size and alignment from ld commandline
Ard Biesheuvel [Mon, 3 Aug 2015 08:22:16 +0000 (08:22 +0000)]
BaseTools IA32/X64: get header size and alignment from ld commandline

Instead of hardcoding the values for the PE/COFF header size and the
section alignment, set them on the linker command line. This factors
out these values from the various linker scripts, which will allow us
to unify them in a subsequent patch.

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

8 years agoBaseTools IA32/X64: move .got contents to the PE/COFF .text section
Ard Biesheuvel [Mon, 3 Aug 2015 08:22:00 +0000 (08:22 +0000)]
BaseTools IA32/X64: move .got contents to the PE/COFF .text section

Move the .got contents to the PE/COFF .text section. This should be
a no-op, since we typically don't generate position independent code
(i.e., using -fPIC). But since the GOT contains variable addresses that
are updated at relocation time only, its contents are best kept in .text
to prevent them from being overwritten inadvertently.

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

8 years agoBaseTools IA32/X64: drop redundant alignment from linker script
Ard Biesheuvel [Mon, 3 Aug 2015 08:21:49 +0000 (08:21 +0000)]
BaseTools IA32/X64: drop redundant alignment from linker script

There is no need to pad out the end of a section of the start of
the following section is aligned to the same value. So drop the
redundant ALIGN() statements.

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

8 years agoBaseTools IA32/X64: move .rodata to PE/COFF .text section
Ard Biesheuvel [Mon, 3 Aug 2015 08:21:39 +0000 (08:21 +0000)]
BaseTools IA32/X64: move .rodata to PE/COFF .text section

The .rodata ELF section contains constant non-executable data that
should never be modified by the program itself. Since the risk of
inadvertent modification is typically higher than the risk of
inadvertent execution, it makes sense to put this data in the
R-X .text section rather than in the RW- .data section.
So move it there.

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

8 years agoBaseTools IA32/X64: remove NOP padding from X86/IA32 GCC linker scripts
Ard Biesheuvel [Mon, 3 Aug 2015 08:21:28 +0000 (08:21 +0000)]
BaseTools IA32/X64: remove NOP padding from X86/IA32 GCC linker scripts

The NOP padding in the GCC linker scripts ensures that all empty
regions in the ELF binary are filled with x86 NOP instructions.

There is no upside to doing this: if the CPU ends up executing these
instructions, we have little hope of resuming normal execution of the
program anyway. And having NOP slides in memory only makes it easier
for attackers to launch exploits. So remove them.

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

8 years agoSecurityPkg/Tcg/MemoryOverwriteRequestControlLock: Add missing header file descriptio...
Qiu Shumin [Mon, 3 Aug 2015 07:14:11 +0000 (07:14 +0000)]
SecurityPkg/Tcg/MemoryOverwriteRequestControlLock: Add missing header file description in INF file.

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

8 years agoNt32Pkg: Remove old useless bds platform lib.
Eric Dong [Mon, 3 Aug 2015 05:31:41 +0000 (05:31 +0000)]
Nt32Pkg: Remove old useless bds platform lib.

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

8 years agoNt32Pkg: Do connect all and Refresh boot option action after console is connected.
Eric Dong [Mon, 3 Aug 2015 05:30:25 +0000 (05:30 +0000)]
Nt32Pkg: Do connect all and Refresh boot option action after console is connected.

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

8 years agoFixed GCC49 build fail issue.
Eric Dong [Mon, 3 Aug 2015 03:22:49 +0000 (03:22 +0000)]
Fixed GCC49 build fail issue.

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@18126 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg PeiCore: Add PCD to specify PEIM Shadow
Liming Gao [Mon, 3 Aug 2015 03:18:37 +0000 (03:18 +0000)]
MdeModulePkg PeiCore: Add PCD to specify PEIM Shadow

v2 changelog:
Check CurrentPeimHandle to check the matched PeimHandle.
Add check point to ShadowPeiCore based on PCD.

v1 changelog:
PeiCore LoadImage always shadow itself and PEIM on normal boot after
the physical memory is installed. On the emulator platform, the shadow
may be not necessary. To support such usage, new PCD PcdShadowPeimOnBoot
is introduced to specify whether loads PEIM in memory by default.

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

8 years agoIntelFspPkg: Remove the const condition if statement to refine the code.
Qiu Shumin [Mon, 3 Aug 2015 02:59:55 +0000 (02:59 +0000)]
IntelFspPkg: Remove the const condition if statement to refine the code.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: "Yao, Jiewen" <Jiewen.yao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18124 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoAdd Dual-FSP support (MemoryInitUpd/SiliconInitUpd)
Yao, Jiewen [Sun, 2 Aug 2015 04:02:37 +0000 (04:02 +0000)]
Add Dual-FSP support (MemoryInitUpd/SiliconInitUpd)

Add FspUpdSignatureCheck() API in FspSecPlatformLib, so that FspSecCore can check if UPD data is valid in FSP API.
Add Set/GetFspMemoryInitUpdDataPointer() and Set/GetFspSiliconInitUpdDataPointer() API in FspCommonLib,
 so that core can set this UdpDataPointer and platform code may get UpdDataPointer easily.
Add UpdateMemSiUpdInitOffsetValue function in GenCfgOpt.py tool, so that the MemoryInitUpdOffset and SiUpdInitOffset is recorded.
Add missing EMBED comment in GenCfgOptUserManual.docx

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: "Yao, Jiewen" <Jiewen.Yao@intel.com>
Reviewed-by: "Mudusuru, Giri P" <giri.p.mudusuru@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18123 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoArmVirtPkg: use 'auto' alignment and FIXED placement for XIP modules
Ard Biesheuvel [Fri, 31 Jul 2015 08:24:18 +0000 (08:24 +0000)]
ArmVirtPkg: use 'auto' alignment and FIXED placement for XIP modules

Now that GenFw correctly propagates the minimum alignment of the ELF
input sections to the PE/COFF binary, we can simply select 'auto'
alignment in the FDF Rule section instead of tweaking it by hand.

Also add the FIXED FFS attribute to the module types that may execute
in place. This enables a newly added optimization in GenFfs that strips
redundant padding, preventing excessive waste of FV space if the section
alignment is considerable (i.e., 2 KB or 4 KB)

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

8 years agoUiApp: Move reset menu from Front Page to BMM Page.
Eric Dong [Fri, 31 Jul 2015 02:14:26 +0000 (02:14 +0000)]
UiApp: Move reset menu from Front Page to BMM Page.

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

8 years agoRemove the useless code to fix build failure caused by error depend on IntelFramework...
Eric Dong [Fri, 31 Jul 2015 02:12:54 +0000 (02:12 +0000)]
Remove the useless code to fix build failure caused by error depend on IntelFrameworkModulePkg.

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

8 years agoFixed GCC tool chain build fail.
Eric Dong [Fri, 31 Jul 2015 01:21:50 +0000 (01:21 +0000)]
Fixed GCC tool chain build fail.

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@18119 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoStdLib: Add support for AArch64
Harry Liebel [Thu, 30 Jul 2015 09:51:04 +0000 (09:51 +0000)]
StdLib: Add support for AArch64

- Use some files from ARM version.
- Use NetBSD software floating point library to provide floating point
  operations not handled directly by hardware floating point enabled
  GCC compiler.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Harry Liebel <Harry.Liebel@arm.com>
Reviewed-by: Olivier Martin <Olivier.Martin@arm.com>
Reviewed-by: Daryl McDaniel <edk2-lists@mc2research.org>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18118 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoStdLib/LibC: Provide missing ARM symbols
Harry Liebel [Thu, 30 Jul 2015 09:50:58 +0000 (09:50 +0000)]
StdLib/LibC: Provide missing ARM symbols

Provide missing functionality by using files from LLVM.

Changes made:
- Formatting changes (tabs to spaces, DOS line endings etc).
- Simplified 'int_endianness.h' to work for our case.
- Added LLVM licence to the individual files.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Harry Liebel <Harry.Liebel@arm.com>
Reviewed-by: Olivier Martin <Olivier.Martin@arm.com>
Reviewed-by: Daryl McDaniel <edk2-lists@mc2research.org>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18117 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoStdLib/LibC: Add software floating point library from NetBSD
NetBSD project [Thu, 30 Jul 2015 09:50:51 +0000 (09:50 +0000)]
StdLib/LibC: Add software floating point library from NetBSD

Floating point processing is not supported on ARM for UEFI. In order to
support UEFI applications in AppPkg we use this library to provide the
required functionality.

Changes as compared to the NetBSD version:
- Formatting changes (tabs to spaces, DOS line endings etc).
- Disable exceptions as described in the float_raise() function.
- Disable definition of 'Symbolic Boolean literals' in milieu.h.

Source originally from: NetBSD project
- Source: http://cvsweb.netbsd.org/bsdweb.cgi/?only_with_tag=MAIN
- Licensing and Copyright: http://www.netbsd.org/about/redistribution.html

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Harry Liebel <Harry.Liebel@arm.com>
Reviewed-by: Olivier Martin <Olivier.Martin@arm.com>
Reviewed-by: Daryl McDaniel <edk2-lists@mc2research.org>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18116 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoStdLib: Added BaseStackLib for ARM architectures
Olivier Martin [Thu, 30 Jul 2015 09:50:43 +0000 (09:50 +0000)]
StdLib: Added BaseStackLib for ARM architectures

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <Olivier.Martin@arm.com>
Reviewed-by: Ronald Cron <Ronald.Cron@arm.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Daryl McDaniel <edk2-lists@mc2research.org>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18115 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg: Enhance PciBusDxe to handle high 32bit of MEM64 BAR returns 0
Ruiyu Ni [Thu, 30 Jul 2015 06:40:36 +0000 (06:40 +0000)]
MdeModulePkg: Enhance PciBusDxe to handle high 32bit of MEM64 BAR returns 0

According to the PCI spec, when software writes all-one to BAR for size probing,
the value read back should be 0b1...10...0 after masking the BAR type bits.
But in real world, it's possible that certain device returns 0b0...01...10...0
for MEM64 BAR size probing: some bits in the high 32bit may be 0.
PciBus driver has the code to handle such case. However, it doesn't handle the
case that the high 32bit is totally 0. The patch is to handle the special case.

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

8 years agoEnable NT32 platform to use new UiApp code.
Eric Dong [Thu, 30 Jul 2015 03:45:09 +0000 (03:45 +0000)]
Enable NT32 platform to use new UiApp code.

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

8 years agoLegacy Boot Maintenance UI part code split from IntelFrameworkModulePkg/Universal...
Eric Dong [Thu, 30 Jul 2015 03:43:14 +0000 (03:43 +0000)]
Legacy Boot Maintenance UI part code split from IntelFrameworkModulePkg/Universal/BdsDxe driver.

This is the legacy part of the old BdsDxe driver.

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

8 years agoUiApp code split from IntelFrameworkModulePkg/Universal/BdsDxe driver.
Eric Dong [Thu, 30 Jul 2015 03:41:35 +0000 (03:41 +0000)]
UiApp code split from IntelFrameworkModulePkg/Universal/BdsDxe driver.

This is the UI part of the old BdsDxe driver, also remove the legacy boot option related code.

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

8 years agoArmPlatformPkg: remove obsolete ARM and AARCH64 platforms
Ard Biesheuvel [Wed, 29 Jul 2015 16:17:27 +0000 (16:17 +0000)]
ArmPlatformPkg: remove obsolete ARM and AARCH64 platforms

Remove obsolete ARM and AARCH64 platforms so the maintainers can
focus on the ones that are still supported, which are:
- TC2 (ArmVExpress-CTA15-A7.dsc)
- Foundation model and Fast model emulators (ArmVExpress-FVP-AArch64.dsc)
- Juno (ArmJunoPkg/ArmJuno.dsc)
- Cortex-A15 MPcore RTSM (ArmVExpress-RTSM-A15_MPCore)

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

8 years agoMdeModulePkg/PciBus: Simplify an complex if statement to pass VS2015
Michael D Kinney [Wed, 29 Jul 2015 11:11:56 +0000 (11:11 +0000)]
MdeModulePkg/PciBus: Simplify an complex if statement to pass VS2015

The logic in an if statement in PciIo is too complex and hard to understand
and make VS2015 build failure. The fix simplifies the logic.

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

8 years agoMdeModulePkg/Variable: Fix VS2015 warning about uninitialized local var.
Michael D Kinney [Wed, 29 Jul 2015 11:11:34 +0000 (11:11 +0000)]
MdeModulePkg/Variable: Fix VS2015 warning about uninitialized local var.

This fix is used to solve VS2015 warning "local variable is not initialized before use"

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

8 years agoMdeModulePkg: Fix the issue cannot boot to UEFI Network after reset
Zhang Lubo [Wed, 29 Jul 2015 06:37:48 +0000 (06:37 +0000)]
MdeModulePkg: Fix the issue cannot boot to UEFI Network after reset

DHCP4 service allows only one of its children to be configured
in the active state,If the DHCP4 D.O.R.A started by IP4 auto
configuration and has not been completed, the Dhcp4 state machine
will not be in the right state for the PXE to start a new round
D.O.R.A., so we need to switch it's policy to static.

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

8 years agoVlv2TbltDevicePkg: Exclude CapsuleX64 from IA32 build
Star Zeng [Wed, 29 Jul 2015 05:59:50 +0000 (05:59 +0000)]
Vlv2TbltDevicePkg: Exclude CapsuleX64 from IA32 build

CapsuleX64 is for 64bits capsule data access in PEI phase,
it is only needed for X64 DXE build.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Tim He <tim.he@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18106 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg: Include CapsuleX64 in MdeModulePkg.dsc [Components.X64]
Star Zeng [Wed, 29 Jul 2015 05:58:20 +0000 (05:58 +0000)]
MdeModulePkg: Include CapsuleX64 in MdeModulePkg.dsc [Components.X64]

It was forgotten to be included in MdeModulePkg.dsc when created.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18105 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoNetworkPkg: Fix the issue cannot boot to UEFI Network after reset
Zhang Lubo [Wed, 29 Jul 2015 04:10:09 +0000 (04:10 +0000)]
NetworkPkg: Fix the issue cannot boot to UEFI Network after reset

DHCP4 service allows only one of its children to be configured
in the active state,If the DHCP4 D.O.R.A started by IP4 auto
configuration and has not been completed, the Dhcp4 state machine
will not be in the right state for the PXE to start a new round D.O.R.A.
so we need to switch it's policy to static.

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

8 years agoArmVirtPkg: implement DT-based ArmGicArchLib
Ard Biesheuvel [Tue, 28 Jul 2015 20:45:36 +0000 (20:45 +0000)]
ArmVirtPkg: implement DT-based ArmGicArchLib

Since it is arguably incorrect to infer the GIC revision from CPU
ID and GIC feature registers on platforms that describe the GIC in
the device tree, this implements the library class ArmGicArchLib
tailored for such platforms.

The supported GIC revision is retrieved from the dynamic PCD that
is set based on the GIC DT node.

This means this library can only execute post DXE core, but this is
not a problem for any of the virt platforms.

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>
Tested-by: Leif Lindholm <leif.lindholm@linaro.org>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18102 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoArmVirtPkg: record GIC revision in dynamic PCD
Ard Biesheuvel [Tue, 28 Jul 2015 20:45:25 +0000 (20:45 +0000)]
ArmVirtPkg: record GIC revision in dynamic PCD

In order to allow a ArmGicArchLib to be implemented that returns
the supported GIC revision based on the device tree, add handling
to VirtFdtDxe to record the GIC revision at DT parsing time.

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>
Tested-by: Leif Lindholm <leif.lindholm@linaro.org>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18101 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoArmPkg: cache detected revision in ArmGicArchLib
Ard Biesheuvel [Tue, 28 Jul 2015 20:45:10 +0000 (20:45 +0000)]
ArmPkg: cache detected revision in ArmGicArchLib

Instead of inferring the GIC revision from the CPU id registers
and the presence/availability of the system register interface
upon each invocation, move the logic to a constructor and cache
the result.

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>
Tested-by: Leif Lindholm <leif.lindholm@linaro.org>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18100 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoArmPkg: copy ArmGicArchLib to ArmGicArchSecLib
Ard Biesheuvel [Tue, 28 Jul 2015 20:44:58 +0000 (20:44 +0000)]
ArmPkg: copy ArmGicArchLib to ArmGicArchSecLib

Clone ArmGicArchLib into a SEC phase specific ArmGicArchSecLib
so that we can modify the former in a subsequent patch to cache
the GIC revision in a global variable.

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>
Tested-by: Leif Lindholm <leif.lindholm@linaro.org>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18099 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoArmPkg: split off ArmGicArchLib from ArmGicLib
Ard Biesheuvel [Tue, 28 Jul 2015 20:44:44 +0000 (20:44 +0000)]
ArmPkg: split off ArmGicArchLib from ArmGicLib

The current implementation of ArmGicGetSupportedArchRevision ()
that is used by all ARM platforms is entirely stateless (in order
to support being executed from flash) so it needs to interrogate
the hardware for the supported GIC revision upon each invocation.

However, this statelessness is only needed for SEC type modules;
in all other cases, we could easily determine the GIC revision once,
and store the result in a global variable.

In preparation of having separate early and normal versions, this patch
introduces the ArmGicArchLib library class and default implementation,
and moves the existing ArmGicGetSupportedArchRevision () into it.

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

8 years agoArmPkg: merge ArmGicV[23]Lib.h into ArmGicLib.h
Ard Biesheuvel [Tue, 28 Jul 2015 20:44:27 +0000 (20:44 +0000)]
ArmPkg: merge ArmGicV[23]Lib.h into ArmGicLib.h

Before splitting off ArmGicArchLib and moving it out of
ArmPkg/Drivers/ArmGic into ArmPkg/Library, make sure that the
GIC specific declarations it depends on are not hidden away in
local headers "GicV2/GicV2Lib.h" and "GicV3/GicV3Lib.h".

So merge them with <Library/ArmGicLib.h>. This is entirely
appropriate, since this is not a header that declares a public
interface into ArmGicLib, but defines implementation internals.

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>
Tested-by: Leif Lindholm <leif.lindholm@linaro.org>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18097 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoShellPkg: prevent Close call when Open failed
Jaben Carsey [Tue, 28 Jul 2015 20:22:26 +0000 (20:22 +0000)]
ShellPkg: prevent Close call when Open failed

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Tapan Shah <tapandshah@hp.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18096 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoOvmfPkg: fix conversion specifiers in DEBUG format strings
Laszlo Ersek [Tue, 28 Jul 2015 18:33:23 +0000 (18:33 +0000)]
OvmfPkg: fix conversion specifiers in DEBUG format strings

Cc: Scott Duplichan <scott@notabs.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Reported-by: Scott Duplichan <scott@notabs.org>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Build-tested-by: Scott Duplichan <scott@notabs.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18095 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoFspNotifyDxe need handle >4G memory.
Yao, Jiewen [Tue, 28 Jul 2015 07:26:57 +0000 (07:26 +0000)]
FspNotifyDxe need handle >4G memory.

The FSP API is always 32bit, but FspNotifyDxe might load to >4G memory. In order to make thunk work, we need reload FspNotifyDxe to <4G memory.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: "Yao, Jiewen" <Jiewen.Yao@intel.com>
Reviewed-by: "Mudusuru, Giri P" <giri.p.mudusuru@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18094 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoBug fix in PatchFv.py for GCC build in IntelFspPkg.
Yao, Jiewen [Tue, 28 Jul 2015 07:24:48 +0000 (07:24 +0000)]
Bug fix in PatchFv.py for GCC build in IntelFspPkg.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: "Yao, Jiewen" <Jiewen.Yao@intel.com>
Reviewed-by: "Mudusuru, Giri P" <giri.p.mudusuru@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18093 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoAdd Secure MOR implementation.
Yao, Jiewen [Tue, 28 Jul 2015 07:20:58 +0000 (07:20 +0000)]
Add Secure MOR implementation.

Add a new module MemoryOverwriteRequestControlLock to register VarCheck handler to  enforce MorLock Policy.
Only SMM version is added because MOR is only supported in SMM variable case.

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

8 years agoDowngrade one debug message level in DxeTpm2MeasureBootHandler from EFI_D_ERROR to...
Yao, Jiewen [Tue, 28 Jul 2015 06:58:47 +0000 (06:58 +0000)]
Downgrade one debug message level in DxeTpm2MeasureBootHandler from EFI_D_ERROR to EFI_D_INFO.

No TPM2 is considered as valid case. For example, a platform may only have TPM1.2, without TPM2.0 So this is NOT an ERROR message, but more an INFO message.

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

8 years agoBaseTools: Add a keyword FvNameString in FDF
Yingke Liu [Tue, 28 Jul 2015 05:53:08 +0000 (05:53 +0000)]
BaseTools: Add a keyword FvNameString in FDF

The keyword with value TRUE OR FALSE is used to
indicate whether the FV UI name is included in
FV EXT header as a entry or not.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yingke Liu <yingke.d.liu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18090 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoSecurityPkg: Change TPM MMIO range attribute
Chao Zhang [Tue, 28 Jul 2015 04:49:25 +0000 (04:49 +0000)]
SecurityPkg: Change TPM MMIO range attribute

For TCG spec compliance, Change TPM MMIO range attribute

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

8 years agoMdeModulePkg/UfsPassThru: Fix wrong GLOBAL_REMOVE_IF_UNREFERENCED usage
Feng Tian [Tue, 28 Jul 2015 02:47:52 +0000 (02:47 +0000)]
MdeModulePkg/UfsPassThru: Fix wrong GLOBAL_REMOVE_IF_UNREFERENCED usage

GLOBAL_REMOVE_IF_UNREFERENCED means __declspec(selectany) for MS tool
chain IA32/X64 build.

According to MSDN, "selectany" would tell the compiler that the declared
global data item (variable or object) is a pick-any COMDAT (a packaged
function). At link time, if multiple definitions of a COMDAT are seen,
the linker picks one and discards the rest.

So we have to remove GLOBAL_REMOVE_IF_UNREFERENCED key word from two global
variable's extern definitions of .h file as we have used this keyword in
.c file, otherwise the MS tool chain would pick the definitions in .h file
and treat it as uninitialized data to generate full-0 content for these two
global variables.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18088 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg PiSmmIpl: Use AllocateZeroPool() for FullSmramRanges
Star Zeng [Tue, 28 Jul 2015 02:07:06 +0000 (02:07 +0000)]
MdeModulePkg PiSmmIpl: Use AllocateZeroPool() for FullSmramRanges

to instead of AllocatePool() to ensure the data is clean for
the following consumption.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18087 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoUefiCpuPkg: Add missing PCD usage information in UNI files.
Qiu Shumin [Tue, 28 Jul 2015 01:58:48 +0000 (01:58 +0000)]
UefiCpuPkg: Add missing PCD usage information in UNI files.

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

8 years agoSourceLevelDebugPkg: Add missing PCD usage information in UNI files.
Qiu Shumin [Tue, 28 Jul 2015 01:52:33 +0000 (01:52 +0000)]
SourceLevelDebugPkg: Add missing PCD usage information in UNI files.

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

8 years agoIntelFrameworkModulePkg: Add missing PCD usage information in UNI and DEC files.
Qiu Shumin [Tue, 28 Jul 2015 01:43:09 +0000 (01:43 +0000)]
IntelFrameworkModulePkg: Add missing PCD usage information in UNI and DEC files.

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

8 years agoSecurityPkg: Add missing PCD usage information in UNI files.
Qiu Shumin [Tue, 28 Jul 2015 01:38:14 +0000 (01:38 +0000)]
SecurityPkg: Add missing PCD usage information in UNI files.

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

8 years agoNetworkPkg: Add missing PCD usage information in UNI and DEC files.
Qiu Shumin [Tue, 28 Jul 2015 01:30:47 +0000 (01:30 +0000)]
NetworkPkg: Add missing PCD usage information in UNI and DEC files.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Signed-off-by: Zhang Lubo <lubo.zhang@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18082 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg: Add missing PCD usage information in UNI and DEC files.
Qiu Shumin [Tue, 28 Jul 2015 01:21:33 +0000 (01:21 +0000)]
MdeModulePkg: Add missing PCD usage information in UNI and DEC files.

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

8 years agoBaseTools/GenFv: optimize away redundant padding
Ard Biesheuvel [Mon, 27 Jul 2015 13:50:30 +0000 (13:50 +0000)]
BaseTools/GenFv: optimize away redundant padding

To prevent double padding of XIP modules leading to excessive
waste of FV space, try to adjust existing padding rather than
adding more.

Instead of adding a pad file to the FV to line up an FFS file that
itself may contain padding to line up the payload, try to find a
dedicated padding section inside the FFS, and reduce its size to
place all subsequent aligned FFS section at their respective minimum
alignments.

When using 4 KB section alignment (which is required on AARCH64 in
some cases), this will save 4 KB for each XIP module.

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: Yingke Liu <yingke.d.liu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18080 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoBaseTools: use GUID identifiable section for FFS alignment padding
Ard Biesheuvel [Mon, 27 Jul 2015 13:50:19 +0000 (13:50 +0000)]
BaseTools: use GUID identifiable section for FFS alignment padding

Instead of using an anonymous section of type EFI_SECTION_RAW to pad
out the first aligned FFS section to its required alignment, use a
section with a dedicated GUID if the size of the padding permits it.

This allows for more flexibility when placing such FFS images in a
firmware volume, because we will now be able to remove padding rather
than add more, by shrinking the size of this section instead of
padding out the start of the FFS image to file alignment.

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: Yingke Liu <yingke.d.liu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18079 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoBaseTools/GenFw: move PE/COFF header closer to payload
Ard Biesheuvel [Mon, 27 Jul 2015 13:50:09 +0000 (13:50 +0000)]
BaseTools/GenFw: move PE/COFF header closer to payload

The secondary header (not the DOS header) of a PE/COFF binary
does not reside at a fixed offset. Instead, its offset into the
file is recorded in the DOS header.

This gives us the flexibility to move it, along with the section
headers, to right before the first section if there is considerable
space before it, i.e., when the PE/COFF file alignment is substantially
larger than the size of the header.

Since the PE/COFF to TE conversion replaces everything before the
section headers with a simple TE header, this change removes all
the header padding from such images, leading to smaller files.

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: Yingke Liu <yingke.d.liu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18078 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoBaseTools/GenFw: move .debug contents to .data to save space
Ard Biesheuvel [Mon, 27 Jul 2015 13:49:54 +0000 (13:49 +0000)]
BaseTools/GenFw: move .debug contents to .data to save space

In order to reduce the memory footprint of PE/COFF images when
using large values for the PE/COFF section alignment, move the
contents of the .debug section to data, and point the debug data
directory entry to it. This allows us to drop the .debug section
entirely, as well as any associated rounding. Since our .debug
section only contains the filename of the ELF input image, the
penalty of keeping this data in a non-discardable section is
negligible.

Note that the PE/COFF spec v6.3 explicitly mentions that this is
allowed.

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: Yingke Liu <yingke.d.liu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18077 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg:Add ESC key support in setup browser pop-up message box
Dandan Bi [Mon, 27 Jul 2015 09:49:01 +0000 (09:49 +0000)]
MdeModulePkg:Add ESC key support in setup browser pop-up message box

When load default value or save changes will pop up message box to let user
confirm,Y means confirm and N means ignore,now add Esc key with the
same function of N key.And change the content of pop up message in .uni file,
now will display "Press 'Y' to confirm, 'N'/'ESC' to ignore."

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

8 years agoMdeModulePkg:SetupBrowser output debug message when DisplayEngineDxe is not installed
Dandan Bi [Mon, 27 Jul 2015 09:44:39 +0000 (09:44 +0000)]
MdeModulePkg:SetupBrowser output debug message when DisplayEngineDxe is not installed

Enhance the setupbrowserdxe to output debug message when DisplayEngineDxe is
not installed and this will be easy for user to find the reason why can not
enter Setup page.

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

8 years agoSupport get string from configuration string packages.
Eric Dong [Mon, 27 Jul 2015 07:40:18 +0000 (07:40 +0000)]
Support get string from configuration string packages.

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

8 years agoCorebootPayloadPkgIa32: Don't specify X64 architecture
Jordan Justen [Mon, 27 Jul 2015 06:43:29 +0000 (06:43 +0000)]
CorebootPayloadPkgIa32: Don't specify X64 architecture

CorebootPayloadPkg/CorebootPayloadPkgIa32.dsc doesn't use any X64
modules, so it should not specify the X64 architecture.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Maurice Ma <maurice.ma@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18073 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdePkg: Add missing PCD usage information in UNI files.
Qiu Shumin [Mon, 27 Jul 2015 03:10:37 +0000 (03:10 +0000)]
MdePkg: Add missing PCD usage information in UNI files.

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

8 years agoMdeModulePkg CapsuleRuntimeDxe: Reduce reserved memory consumption
Star Zeng [Mon, 27 Jul 2015 03:05:13 +0000 (03:05 +0000)]
MdeModulePkg CapsuleRuntimeDxe: Reduce reserved memory consumption

Reduce reserved memory consumption by page table buffer,
then OS can have more available memory to use.
Take PhysicalAddressBits = 48 and 2MB page granularity as example,
1:1 Virtual to Physical identity mapping page table buffer needs to be
((512 + 1) * 512 + 1) * 4096 = 1075843072 bytes = 0x40201000 bytes.

The code is updated to only allocate 2 pages (1G page enabled) or
6 pages for 4G page table, and 8 extra pages to handles > 4G request
by page fault.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18070 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg CapsuleX64: Reduce reserved memory consumption
Star Zeng [Mon, 27 Jul 2015 03:04:41 +0000 (03:04 +0000)]
MdeModulePkg CapsuleX64: Reduce reserved memory consumption

We are going to reduce reserved memory consumption by page table buffer,
then OS can have more available memory to use.
Take PhysicalAddressBits = 48 and 2MB page granularity as example,
1:1 Virtual to Physical identity mapping page table buffer needs to be
((512 + 1) * 512 + 1) * 4096 = 1075843072 bytes = 0x40201000 bytes.

The code is updated to build 4G page table by default and only use 8 extra
pages to handles > 4G request by page fault.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18069 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoIntelFrameworkModulePkg AcpiS3SaveDxe: Reduce reserved memory consumption
Star Zeng [Mon, 27 Jul 2015 03:04:03 +0000 (03:04 +0000)]
IntelFrameworkModulePkg AcpiS3SaveDxe: Reduce reserved memory consumption

Reduce reserved memory consumption by page table buffer,
then OS can have more available memory to use.
Take PhysicalAddressBits = 48 and 2MB page granularity as example,
1:1 Virtual to Physical identity mapping page table buffer needs to be
((512 + 1) * 512 + 1) * 4096 = 1075843072 bytes = 0x40201000 bytes.

When BIOS does not support long mode waking vector, only allocate
2 pages (1G page enabled) or 6 pages for 4G page table, and 8 extra
pages to handles > 4G request by page fault.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18068 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg BootScriptExecutorDxe: Reduce reserved memory consumption
Star Zeng [Mon, 27 Jul 2015 03:03:25 +0000 (03:03 +0000)]
MdeModulePkg BootScriptExecutorDxe: Reduce reserved memory consumption

We are going to reduce reserved memory consumption by page table buffer,
then OS can have more available memory to use.
Take PhysicalAddressBits = 48 and 2MB page granularity as example,
1:1 Virtual to Physical identity mapping page table buffer needs to be
((512 + 1) * 512 + 1) * 4096 = 1075843072 bytes = 0x40201000 bytes.

Current BootScriptExecutorDxe handles > 4G request by page fault because
S3ResumePeim only builds 4G page table when long mode waking vector is
not needed, but BootScriptExecutorDxe still assume the page table buffer for
page table is at 1:1 Virtual to Physical identity mapping.

To reduce reserved memory consumption, the code is updated to only use
8 extra pages to handles > 4G request by page fault.
Another, when both BIOS and OS wants long mode waking vector,
S3ResumePei should have established 1:1 Virtual to Physical identity mapping
page table for ACPI spec requirement, so no need to hook page fault handler.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18067 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoNetworkPkg: fix an error lead building crash
fanwang2 [Mon, 27 Jul 2015 02:45:43 +0000 (02:45 +0000)]
NetworkPkg: fix an error lead building crash

Fix an error which leads the building process crashes.

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

8 years agoMdeModulePkg Variable: Read MonotonicCount by ReadUnaligned64()
Star Zeng [Mon, 27 Jul 2015 00:49:00 +0000 (00:49 +0000)]
MdeModulePkg Variable: Read MonotonicCount by ReadUnaligned64()

As variable HEADER_ALIGNMENT = 4, the MonotonicCount in
AUTHENTICATED_VARIABLE_HEADER may be not UINT64 aligned,
so go to use ReadUnaligned64() to ensure read data correctly.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18064 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoStdLib: Do not define memcpy for AARCH64 builds
Scott Duplichan [Sun, 26 Jul 2015 08:07:20 +0000 (08:07 +0000)]
StdLib: Do not define memcpy for AARCH64 builds

For AARCH64, do not define a memcpy function in stdlib because it is
already defined in CompilerIntrinsicsLib.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Scott Duplichan <scott@notabs.org>
Reviewed-by: Daryl McDaniel <edk2-lists@mc2research.org>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18063 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg: Make boot option description unique
Ruiyu Ni [Sun, 26 Jul 2015 08:07:15 +0000 (08:07 +0000)]
MdeModulePkg: Make boot option description unique

When there are multiple network boot options, user will see multiple
"UEFI Network" boot options. It's hard to distinguish them using the
description.
The patch enhances the boot option generation logic to append " 2"
/" 3"/" 4"/... number suffix to the non-first network boot options.
So the 2nd one becomes "UEFI Network 2".

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

8 years agoIntelFrameworkModulePkg: GenericBdsLib: set Status before use
Laszlo Ersek [Sun, 26 Jul 2015 08:06:11 +0000 (08:06 +0000)]
IntelFrameworkModulePkg: GenericBdsLib: set Status before use

The recent patch titled

  IntelFrameworkModulePkg/GenericBdsLib: remove AcpiS3->S3Save() call

has exposed a preexistent bug in the BdsLibBootViaBootOption() function,
and now the IA32 build of OVMF fails with:

  In function 'BdsLibBootViaBootOption':
  error: 'Status' may be used uninitialized in this function

Namely, we have the following (simplified) data flow:

  //
  // Status and ImageHandle both start out uninitialized
  //

  /* ... */
  ImageHandle = BdsExpandUsbShortFormDevicePath (DevicePath);
  /* ... */

  if (ImageHandle == NULL) {
    /* ... */
  }
  if ((ImageHandle == NULL) || (EFI_ERROR(Status))) {
    /* ... */
  */

If BdsExpandUsbShortFormDevicePath() returns a non-NULL value, then the
second "if" statement will check Status without the function having
initialized or assigned it.

When BdsExpandUsbShortFormDevicePath() returns non-NULL, Status should be
EFI_SUCCESS; so let us assign it that value up-front.

Note that the bug existed before the patch

  IntelFrameworkModulePkg/GenericBdsLib: remove AcpiS3->S3Save() call

That is, the bug was not introduced, only exposed, by the patch -- in the
pre-patch state, although the Status variable was set early and
unconditionally, the error code that it may have carried from the failed
gEfiAcpiS3SaveProtocolGuid lookup had nothing to do with the second "if"
statement above.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jeff Fan <jeff.fan@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18061 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMaintainers.txt: Add Daryl's new email address
Jordan Justen [Sun, 26 Jul 2015 08:06:05 +0000 (08:06 +0000)]
Maintainers.txt: Add Daryl's new email address

Cc: Daryl McDaniel <edk2-lists@mc2research.org>
Cc: Jaben Carsey <jaben.carsey@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@18060 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoShellPkg: Fix the ASSERT issue in Shell 'for' loop
Qiu Shumin [Sun, 26 Jul 2015 08:06:01 +0000 (08:06 +0000)]
ShellPkg: Fix the ASSERT issue in Shell 'for' loop

The Length parameter of 'GetNextParameter' is the buffer size in bytes.
While StrnCpys requires user to pass the max number of dest unicode char,
we should convert size in bytes to the number of char.

Cc: Jaben Carsey <jaben.carsey@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
[lersek@redhat.com: updated commit message as requested by Jaben]
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18059 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoBaseTools: Make AutoGen.h array declaration match AutoGen.c definition
Scott Duplichan [Sun, 26 Jul 2015 08:04:10 +0000 (08:04 +0000)]
BaseTools: Make AutoGen.h array declaration match AutoGen.c definition

When a quoted string is used as initialization data in a DEC file PCD
entry, the PCD data type in that entry must be VOID*. The created
AutoGen.c defines the PCD data as UINT8[] or UINT16[], depending on
the string type. The created AutoGen.h, however, declares the PCD data
as VOID*. For a standard compile/link, this works because AutoGen.c
doesn't include AutoGen.h. But when GCC LTO is used, the link time
code generation detects the mismatch and the build fails. This
change makes the AutoGen.h PCD data declaration match the AutoGen.c
definition.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Scott Duplichan <scott@notabs.org>
Reviewed-by: Yingke Liu <yingke.d.liu@intel.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18058 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg: Add old IPv4_DEVICE_PATH support for new IScsiDxe
fanwang2 [Sun, 26 Jul 2015 08:04:04 +0000 (08:04 +0000)]
MdeModulePkg: Add old IPv4_DEVICE_PATH support for new IScsiDxe

GatewayIpAddress and SubnetMask do not exist in old IPv4_DEVICE_PATH, this
will lead new IScsiDxe to error if IPv4_DEVICE_PATH in system is not
updated.

Following UEFI2.5 spec of IPv4_DEVICE_PATH do a check before accessing
fields only defined in new version, add a judgement here to make old
IPv4_DEVICE_PATH and new IScsiDxe can cowork.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: fanwang2 <fan.wang@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
[lersek@redhat.com: rewrapped commit message]
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18057 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoNetworkPkg: Add old IPv4_DEVICE_PATH and IPv6_DEVICE_PATH support
fanwang2 [Sun, 26 Jul 2015 08:03:59 +0000 (08:03 +0000)]
NetworkPkg: Add old IPv4_DEVICE_PATH and IPv6_DEVICE_PATH support

GatewayIpAddress and SubnetMask do not exist in old IPv4_DEVICE_PATH,
IPAddressOrigin, PrefixLength and GatewayIPAddress do not exist in old
IPv6_DEVICE_PATH. This will lead new IScsiDxe to error without updating
IPv4_DEVICE_PATH and IPv6_DEVICE_PATH in system.

Following UEFI2.5 spec of IPv4_DEVICE_PATH do a check before accessing
fields only defined in new version's IPv4_DEVICE_PATH, and revise the same
issue for IPv6_DEVICE_PATH in Iscsi driver.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: fanwang2 <fan.wang@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
[lersek@redhat.com: rewrapped commit message]
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18056 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoSecurityPkg AuthVariableLib: Correct address pointers data
Star Zeng [Sun, 26 Jul 2015 08:03:54 +0000 (08:03 +0000)]
SecurityPkg AuthVariableLib: Correct address pointers data

Originally, the double pointer (VOID **) is not correct for convert
address pointers, and also some address pointers were missing.

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>
[lersek@redhat.com: fix up gcc build failure -- add more (VOID **) casts]
Tested-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18055 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg VariableDxe: Correct address pointers from AuthVariableLib
Star Zeng [Sun, 26 Jul 2015 08:03:50 +0000 (08:03 +0000)]
MdeModulePkg VariableDxe: Correct address pointers from AuthVariableLib

Originally, the double pointer (VOID **) is not correct for convert
address pointers from AuthVariableLib.

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>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18054 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg: Check the case caused by mismatch
Dandan Bi [Sun, 26 Jul 2015 08:03:44 +0000 (08:03 +0000)]
MdeModulePkg: Check the case caused by mismatch

When mismatch happens,there exists one case that exit current
form and display last form.Assert code don't cover this case.
Now add check to handle this situation.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18053 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg: Correct the parameter order in match2 sample opcode
Dandan Bi [Sun, 26 Jul 2015 08:03:40 +0000 (08:03 +0000)]
MdeModulePkg: Correct the parameter order in match2 sample opcode

The first parameter of match2 opcode should be the pattern
and the second one should be the string.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18052 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoShellPkg: Fix bad TimeZone (TZ) conversion.
Andrew Fish [Sun, 26 Jul 2015 08:03:35 +0000 (08:03 +0000)]
ShellPkg: Fix bad TimeZone (TZ) conversion.

EFI_UNSPECIFIED_TIMEZONE means display local time. TZ of 0 is UTC.
Thus EFI_UNSPECIFIED_TIMEZONE means ignore TZ, 0 means UTC. When this code is
fixed to adust file TZ to local TZ you need to preserve
EFI_UNSPECIFIED_TIMEZONE.

FAT always return EFI_UNSPECIFIED_TIMEZONE.
Modern filesystems, HFS+, NTFS, ext3, etc store time in UTC.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Andrew Fish <afish@apple.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18051 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg: Fix the issue EfiPxeBcDhcp() may return wrong status.
Zhang Lubo [Sun, 26 Jul 2015 08:03:30 +0000 (08:03 +0000)]
MdeModulePkg: Fix the issue EfiPxeBcDhcp() may return wrong status.

if the instance of the DHCP4 protocol driver is in the Dhcp4Bound
status that is DHCP configuration has completed, so the Dhcp4->Start
FUNC in the EfiPxcBcDhcp() will return EFI_ALREADY_STARTED status
which lead to EfiPxeBcDhcp FUNC not in correspondence with UEFI spec.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <lubo.zhang@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
[lersek@redhat.com: updated copyright year as Siyuan asked]
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18050 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoNetworkPkg: Fix the issue EfiPxeBcDhcp() may return wrong status.
Zhang Lubo [Sun, 26 Jul 2015 08:03:25 +0000 (08:03 +0000)]
NetworkPkg: Fix the issue EfiPxeBcDhcp() may return wrong status.

if the instance of the EFI DHCP4 protocol driver is in the Dhcp4Bound status
that is DHCP configuration has completed, so the Dhcp4->Start FUNC in
the PxeBcDhcpDora() will return EFI_ALREADY_STARTED status which lead to
EfiPxeBcDhcp FUNC not in correspondence with UEFI spec.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <lubo.zhang@intel.com>
Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
[lersek@redhat.com: updated copyright year as requested by Siyuan]
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18049 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg: Remove TransmitReceive() and ActiveChild dependency
Jiaxin Wu [Sun, 26 Jul 2015 08:03:20 +0000 (08:03 +0000)]
MdeModulePkg: Remove TransmitReceive() and ActiveChild dependency

Fix git 59a8cfd4 (SVN r17869) removes DHCP4.TransmitReceive()and DORA
process dependency, but it updated TransmitReceive() to take the ownership
of DhcpSb->ActiveChild but never release it. This will break the retransmit
and lease time out counter of DORA.
To fix that, TransmitReceive() doesn't need to be the ActiveChild, and the
timer routine should be updated to handle the TransmitReceive specially.

Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Ye Ting <ting.ye@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18048 6f19259b-4bc3-4df7-8a09-765794883524