]> git.proxmox.com Git - mirror_edk2.git/log
mirror_edk2.git
9 years agoUpdate the comments for function 'ConvertPixelFormat' in UefiHandleParsingLib.c to...
Qiu Shumin [Tue, 13 May 2014 01:44:02 +0000 (01:44 +0000)]
Update the comments for function 'ConvertPixelFormat' in UefiHandleParsingLib.c to make it consistent with parameter name.

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

9 years agoUpdate function descriptions of AIP EFI_ADAPTER_INFO_GET_SUPPORTED_TYPES.
Gao, Liming [Mon, 12 May 2014 09:41:58 +0000 (09:41 +0000)]
Update function descriptions of AIP EFI_ADAPTER_INFO_GET_SUPPORTED_TYPES.

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

9 years agoCorrect String language tag.
Gao, Liming [Mon, 12 May 2014 09:39:03 +0000 (09:39 +0000)]
Correct String language tag.

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

9 years agoArmPkg/BdsLib: Fix booting with partial paths
Mark Salter [Thu, 8 May 2014 15:09:27 +0000 (15:09 +0000)]
ArmPkg/BdsLib: Fix booting with partial paths

Boot entries created by efibootmgr may contain a partial device path
to the EFI application to boot. These entries begin with a partition
device path whereas entries created via ARM Boot Manager contain a
full path to the EFI application. The ARM BDS code will fill in the
missing parts of this partial device path as it does for removeable
device paths. This allows the application to be loaded and started.
However, the current code passes the original partial device path to
gBS->LoadImage() and thus LoadImage is unable to find a DeviceHandle
for the path. This means the application being booted cannot find the
boot device from the Loaded Image Protocol structure. In the case of
grub, this prevents the grub config file from being found. This patch
fixes this by making sure the full path is propagated back to the
caller of gBS->LoadImage() so that a proper DeviceHandle gets passed
to the application being booted.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Mark Salter <msalter@redhat.com>
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
Reviewed-By: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15518 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoArmPlatformPkg/BootMonFs: Cache the HW Description address
Brendan Jackman [Thu, 8 May 2014 15:08:39 +0000 (15:08 +0000)]
ArmPlatformPkg/BootMonFs: Cache the HW Description address

This fixes a bug whereby the image description is written over file data when
the file's size is close to a multiple of the block size.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Brendan Jackman <brendan.jackman@arm.com>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15517 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoArmPlatformPkg/BootMonFs: Fix flushing new files
Brendan Jackman [Thu, 8 May 2014 15:06:06 +0000 (15:06 +0000)]
ArmPlatformPkg/BootMonFs: Fix flushing new files

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Brendan Jackman <brendan.jackman@arm.com>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15516 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoArmPlatformPkg/BootMonFs: Fix finding space for new files
Brendan Jackman [Thu, 8 May 2014 15:05:10 +0000 (15:05 +0000)]
ArmPlatformPkg/BootMonFs: Fix finding space for new files

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Brendan Jackman <brendan.jackman@arm.com>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15515 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoArmPlatformPkg/BootMonFs: Don't write file header to media until Flush
Brendan Jackman [Thu, 8 May 2014 15:04:16 +0000 (15:04 +0000)]
ArmPlatformPkg/BootMonFs: Don't write file header to media until Flush

This prevents writing to a garbage location if the file has not been flushed
before, as its BlockStart and BlockEnd are not set.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Brendan Jackman <brendan.jackman@arm.com>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15514 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoArmPlatformPkg/BootMonFs: Fix permission check in SetFileInfo
Brendan Jackman [Thu, 8 May 2014 15:03:05 +0000 (15:03 +0000)]
ArmPlatformPkg/BootMonFs: Fix permission check in SetFileInfo

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Brendan Jackman <brendan.jackman@arm.com>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15513 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoArmPlatformPkg/BootMonFs: Use DiskIO to read image descriptions
Brendan Jackman [Thu, 8 May 2014 15:02:18 +0000 (15:02 +0000)]
ArmPlatformPkg/BootMonFs: Use DiskIO to read image descriptions

Now that NorFlashDxe implements DiskIo directly and at a fine granularity
this significantly improves performance.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Brendan Jackman <brendan.jackman@arm.com>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15512 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoArmPlatformPkg/ArmVExpressPkg: Remove the last 16MB of the 32bit DRAM region
Olivier Martin [Thu, 8 May 2014 15:00:42 +0000 (15:00 +0000)]
ArmPlatformPkg/ArmVExpressPkg: Remove the last 16MB of the 32bit DRAM region

Trusted Firmware will declare this region of DRAM as secure.
There is no way for the non-secure world to access this memory region.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15511 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoARM Packages: Use .8byte instead of .dword for pointers
Brendan Jackman [Thu, 8 May 2014 14:59:50 +0000 (14:59 +0000)]
ARM Packages: Use .8byte instead of .dword for pointers

Clang doesn't recognise .dword

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Brendan Jackman <brendan.jackman@arm.com>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15510 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoARM Packages: Use AND instead of BIC instruction with immediate
Brendan Jackman [Thu, 8 May 2014 14:59:04 +0000 (14:59 +0000)]
ARM Packages: Use AND instead of BIC instruction with immediate

AARCH64 does not have a BIC-with-immediate instruction. GAS assembles it as a
AND with the immediate inverted, but Clang's integrated assembler emits an
error.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Brendan Jackman <brendan.jackman@arm.com>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15509 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoArmPkg/CpuDxe/AArch64: use STUR instruction for signed offset
Brendan Jackman [Thu, 8 May 2014 14:57:51 +0000 (14:57 +0000)]
ArmPkg/CpuDxe/AArch64: use STUR instruction for signed offset

The AARCH64 LDR and STR instructions only support signed offsets for post- and
pre-indexed addressing. For normal signed offset addressing, the mnemonic is
STUR. GNU As automatically assembles STR with signed offset as STUR, but Clang's
integrated assembler doesn't.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Brendan Jackman <brendan.jackman@arm.com>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15508 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoArmPkg/CpuDxe/AArch64/ExceptionSupport.S: Fix immediate syntax
Brendan Jackman [Thu, 8 May 2014 14:56:42 +0000 (14:56 +0000)]
ArmPkg/CpuDxe/AArch64/ExceptionSupport.S: Fix immediate syntax

GNU as assembles instructions without the '#' before immediates. Clang doesn't.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Brendan Jackman <brendan.jackman@arm.com>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15507 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoARM Packages: use GCC_ASM_EXPORT to export functions
Brendan Jackman [Thu, 8 May 2014 14:55:52 +0000 (14:55 +0000)]
ARM Packages: use GCC_ASM_EXPORT to export functions

This ensures the .type directive is used to mark them as function symbols

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Brendan Jackman <brendan.jackman@arm.com>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15506 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoArmLib/AArch64Support.S: remove export of unimplemented function
Brendan Jackman [Thu, 8 May 2014 14:54:46 +0000 (14:54 +0000)]
ArmLib/AArch64Support.S: remove export of unimplemented function

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Brendan Jackman <brendan.jackman@arm.com>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15505 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoARM Packages: Remove GCC filter for AARCH64 assembly files
Brendan Jackman [Thu, 8 May 2014 14:54:11 +0000 (14:54 +0000)]
ARM Packages: Remove GCC filter for AARCH64 assembly files

Some non-GCC toolchain might support the GNU assembly language.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Brendan Jackman <brendan.jackman@arm.com>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15504 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoArmPlatformPkg/Bds: Fix setting kernel command line
Olivier Martin [Thu, 8 May 2014 14:53:02 +0000 (14:53 +0000)]
ArmPlatformPkg/Bds: Fix setting kernel command line

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15503 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoArmPlatformPkg/Drivers/NorFlashDxe: Directly implement DiskIO protocol
Brendan Jackman [Thu, 8 May 2014 14:52:12 +0000 (14:52 +0000)]
ArmPlatformPkg/Drivers/NorFlashDxe: Directly implement DiskIO protocol

This improves performance by accessing NOR with the fine granularity that
the hardware permits, rather than the coarse granularity assumed by DiskIoDxe.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Brendan Jackman <brendan.jackman@arm.com>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15502 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoArmPlatformPkg/ArmVExpressSecLibRTSM: Only use extended name of system registers...
Brendan Jackman [Thu, 8 May 2014 14:50:44 +0000 (14:50 +0000)]
ArmPlatformPkg/ArmVExpressSecLibRTSM: Only use extended name of system registers for GCC

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Brendan Jackman <brendan.jackman@arm.com>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15501 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoArmPlatformPkg/NorFlashDxe: Optimise FVB protocol
Harry Liebel [Thu, 8 May 2014 14:48:55 +0000 (14:48 +0000)]
ArmPlatformPkg/NorFlashDxe: Optimise FVB protocol

- Only read what needs reading, don't read the whole block.
- Don't write back buffers containing no data after an erase.
- Reduce number of NOR erases when writing data. Only erase the block
  when required.

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

9 years agoShellPkg: Add a support to query AdapterInfo protocol for Shell ‘dh’ command.
Tapan Shah [Wed, 7 May 2014 22:38:16 +0000 (22:38 +0000)]
ShellPkg: Add a support to query AdapterInfo protocol for Shell ‘dh’ command.

This patch adds support to display driver handles which has AdapterInfo protocol installed using ‘dh’ command.

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

9 years agoShellBinPkg: Updated ARM and AArch64 EFI Shell binaries
Olivier Martin [Wed, 7 May 2014 12:58:55 +0000 (12:58 +0000)]
ShellBinPkg: Updated ARM and AArch64 EFI Shell binaries

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15498 6f19259b-4bc3-4df7-8a09-765794883524

9 years ago1. Mark the network volatile variables as deprecated in code comments and remove...
Fu Siyuan [Wed, 7 May 2014 06:17:31 +0000 (06:17 +0000)]
1. Mark the network volatile variables as deprecated in code comments and remove related code to set/get these variable.
2. Remove the GetTime() call when receiving Udp4/6 packets.
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye, Ting <ting.ye@intel.com>
Reviewed-by: Wu, Jiaxin <jiaxin.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15497 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoMdeModulePkg/IntelFrameworkModulePkg ACPI: Follow the new UEFI 2.4a spec to return...
Star Zeng [Tue, 6 May 2014 02:11:23 +0000 (02:11 +0000)]
MdeModulePkg/IntelFrameworkModulePkg ACPI: Follow the new UEFI 2.4a spec to return EFI_ACCESS_DENIED for duplicated FADT, FACS or DSDT installation.

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

9 years agoAdd device path node/text conversion for NVMe device path node.
Ruiyu Ni [Mon, 5 May 2014 07:33:21 +0000 (07:33 +0000)]
Add device path node/text conversion for NVMe device path node.

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

9 years agoShellBinPkg: updating the binaries.
Jaben Carsey [Wed, 30 Apr 2014 15:43:58 +0000 (15:43 +0000)]
ShellBinPkg: updating the binaries.

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

9 years agoShellPkg: Patch to enhance the output around GOP protocol
Jaben Carsey [Wed, 30 Apr 2014 15:32:27 +0000 (15:32 +0000)]
ShellPkg: Patch to enhance the output around GOP protocol

This patch adds detailed information from the GOP protocol for commands (i.e. DH), that display details about the protocol.

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

9 years agoMdePkg/UefiScsiLib: Wrong function parameter comments in UefiScsiLib. It should be...
Tian, Feng [Wed, 30 Apr 2014 03:38:05 +0000 (03:38 +0000)]
MdePkg/UefiScsiLib: Wrong function parameter comments in UefiScsiLib. It should be the number of transferred blocks rather than block size.

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

9 years agoMdeModulePkg/ScsiDisk: Using back-off algorithm to dynamically adjust transfer length...
Tian, Feng [Wed, 30 Apr 2014 03:36:14 +0000 (03:36 +0000)]
MdeModulePkg/ScsiDisk: Using back-off algorithm to dynamically adjust transfer length in a single SCSI/ATAPI transfer to reach best device compatibility.

Besides this, the patch also fixed:
1) Wrong return value in SenseDataLength field of packet field of EFI_EXT_SCSI_PASS_THRU protocol, it should reflect real sense data length we got.
2) Wrong logic in ScsiDiskRequestSenseKeys that the logic makes SenseData pointer unaligned compared with BlockIo.Media.IoAlign field.

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

9 years agoConfig Access Protocol return value not follow spec, update code to follow it.
Eric Dong [Mon, 28 Apr 2014 06:53:29 +0000 (06:53 +0000)]
Config Access Protocol return value not follow spec, update code to follow it.

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

9 years agoEarly return when the "BootOrder" variable doesn't exist to avoid SetVariable() retur...
Ruiyu Ni [Mon, 28 Apr 2014 06:30:14 +0000 (06:30 +0000)]
Early return when the "BootOrder" variable doesn't exist to avoid SetVariable() return EFI_NOT_FOUND.

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

9 years agoFix default VENDOR_CLASS in DHCP discover.
Larry Cleeton [Fri, 25 Apr 2014 06:54:56 +0000 (06:54 +0000)]
Fix default VENDOR_CLASS in DHCP discover.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Larry Cleeton <lcleeton@microsoft.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@15488 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoArmPlatformPkg/ArmVExpress-CTA15-A7.fdf: Increased the size of FV after adding the...
Olivier Martin [Thu, 24 Apr 2014 19:31:53 +0000 (19:31 +0000)]
ArmPlatformPkg/ArmVExpress-CTA15-A7.fdf: Increased the size of FV after adding the Lan9118 driver

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15487 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoArmPlatformPkg: Added Lan9118 support
Olivier Martin [Thu, 24 Apr 2014 19:30:11 +0000 (19:30 +0000)]
ArmPlatformPkg: Added Lan9118 support

This is the on board Versatile Express Ethernet controller.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15486 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoEmbeddedPkg: Added Lan9118 Dxe driver
Olivier Martin [Thu, 24 Apr 2014 19:29:11 +0000 (19:29 +0000)]
EmbeddedPkg: Added Lan9118 Dxe driver

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
Signed-off-by: Brendan Jackman <brendan.jackman@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15485 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoEmbeddedPkg/AndroidFastbootTransportTcpDxe: Implemented Android FastBoot over TCP
Brendan Jackman [Thu, 24 Apr 2014 19:27:46 +0000 (19:27 +0000)]
EmbeddedPkg/AndroidFastbootTransportTcpDxe: Implemented Android FastBoot over TCP

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Brendan Jackman <brendan.jackman@arm.com>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15484 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoArmPkg/ArmLib: Fixed AArch64 MMU code when a region overlaps 2 level-3 page tables
Olivier Martin [Thu, 24 Apr 2014 10:37:48 +0000 (10:37 +0000)]
ArmPkg/ArmLib: Fixed AArch64 MMU code when a region overlaps 2 level-3 page tables

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15483 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoCorrect the incorrect string.
Gao, Liming [Thu, 24 Apr 2014 02:19:23 +0000 (02:19 +0000)]
Correct the incorrect string.

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

9 years agoArmPkg/CpuDxe: Restore AArch64 system registers before returning from exception
oliviermartin [Wed, 23 Apr 2014 16:47:13 +0000 (16:47 +0000)]
ArmPkg/CpuDxe: Restore AArch64 system registers before returning from exception

Current EDK2 source code does actually trigger nested interrupted (even if
the PI spec says interrupt should not be nested).
This issue has highlighted the lack of restoring ELR_EL2/ELR_EL1 register.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off: Vijayakumar Subbu <vsubbu@nvidia.com>
Signed-off: Olivier Martin <olivier.martin@arm.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15481 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoFix typo in function name PxeBcFlushStaionIp which should be PxeBcFlushStationIp.
Mauro Faccenda [Wed, 23 Apr 2014 06:25:52 +0000 (06:25 +0000)]
Fix typo in function name PxeBcFlushStaionIp which should be PxeBcFlushStationIp.
Signed-off-by: Mauro Faccenda <faccenda@gmail.com>
Reviewed-by: Ye, Ting <ting.ye@intel.com>
Reviewed-by: Fu, Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15480 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoUpdate code logic to let BDS UI can shows more than one formsets in one HiiHandle.
Eric Dong [Wed, 23 Apr 2014 02:57:25 +0000 (02:57 +0000)]
Update code logic to let BDS UI can shows more than one formsets in one HiiHandle.

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

9 years agoArmPlatformPkg/Bds: Do not print garbage if the command line argument is empty
Olivier Martin [Tue, 22 Apr 2014 10:13:38 +0000 (10:13 +0000)]
ArmPlatformPkg/Bds: Do not print garbage if the command line argument is empty

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15478 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoFix GCC build fail.
Eric Dong [Mon, 21 Apr 2014 02:17:29 +0000 (02:17 +0000)]
Fix GCC 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@15477 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoRefine the check expression result logic.
Eric Dong [Fri, 18 Apr 2014 06:40:13 +0000 (06:40 +0000)]
Refine the check expression result logic.

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

10 years agoEnhance the browser parse opcode logic, skip the opcode which is not defined in UEFI...
Eric Dong [Fri, 18 Apr 2014 03:17:54 +0000 (03:17 +0000)]
Enhance the browser parse opcode logic, skip the opcode which is not defined in UEFI spec.

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

10 years agoStdLib: StdLib/Malloc.c
Paulo Alcantara [Thu, 17 Apr 2014 20:59:50 +0000 (20:59 +0000)]
StdLib: StdLib/Malloc.c
This patch fixes the following warning:
    "expected ‘void **’ but argument is of type ‘struct CPOOL_HEAD **’"

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
Reviewed by: Daryl McDaniel <daryl.mcdaniel@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15474 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoArmPlatformPkg/Bds: Do not free NULL pointer
Olivier Martin [Wed, 16 Apr 2014 09:31:01 +0000 (09:31 +0000)]
ArmPlatformPkg/Bds: Do not free NULL pointer

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15473 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoEmulatorPkg/Unix GCC: Add additional library search paths
Jordan Justen [Tue, 15 Apr 2014 23:53:35 +0000 (23:53 +0000)]
EmulatorPkg/Unix GCC: Add additional library search paths

IA32: add /usr/lib/i386-linux-gnu
X64: add /usr/lib/x86_64-linux-gnu

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

10 years agoEmulatorPkg/Unix GCC: Link to libdl
Jordan Justen [Tue, 15 Apr 2014 23:53:26 +0000 (23:53 +0000)]
EmulatorPkg/Unix GCC: Link to libdl

libdl is used for the dlopen and dlclose calls. We were already
linking to it, but it appears it may have been pulled in automatically
by the linker before.

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

10 years agoEmulatorPkg: Add missing DisplayEngineDxe driver
Andrew Fish [Tue, 15 Apr 2014 23:53:19 +0000 (23:53 +0000)]
EmulatorPkg: Add missing DisplayEngineDxe driver

The BDS depends on the DisplayEngineDxe driver, but this driver was
not added to the EmulatorPkg.

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

10 years agoUpdate question validation logic, move the check pointer from after user input to...
Eric Dong [Tue, 15 Apr 2014 15:38:48 +0000 (15:38 +0000)]
Update question validation logic, move the check pointer from after user input to after finish call the CHANGING callback.

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

10 years agoMdeModulePkg/SecurityPkg: Update TreePei to handle FvInfo2 and update FwVol of PeiCor...
Star Zeng [Tue, 15 Apr 2014 09:19:04 +0000 (09:19 +0000)]
MdeModulePkg/SecurityPkg: Update TreePei to handle FvInfo2 and update FwVol of PeiCore to always install both FvInfo and FvInfo2.

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

10 years agoArmPlatformPkg/ArmVExpressPkg: Update the Runtime Code and Data number of pages
Olivier Martin [Mon, 14 Apr 2014 10:25:08 +0000 (10:25 +0000)]
ArmPlatformPkg/ArmVExpressPkg: Update the Runtime Code and Data number of pages

This information give a hint to reserve some contiguous pages for runtime
regions.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15466 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoCall EFI_BROWSER_ACTION_RETRIEVE for each form instead of only call once before enter...
Eric Dong [Mon, 14 Apr 2014 10:03:00 +0000 (10:03 +0000)]
Call EFI_BROWSER_ACTION_RETRIEVE for each form instead of only call once before enter this formset.

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

10 years agoArmPlatformPkg/ArmVExpressLibRTSM: Added support for the additional 6GB memory of...
Olivier Martin [Mon, 14 Apr 2014 09:04:31 +0000 (09:04 +0000)]
ArmPlatformPkg/ArmVExpressLibRTSM: Added support for the additional 6GB memory of DRAM on Foundation Model

The FVP Foundation model has additional DRAM regions at 0x08_8000_0000.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15464 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoShellPkg: Fix using root of drive
Jaben Carsey [Fri, 11 Apr 2014 19:15:02 +0000 (19:15 +0000)]
ShellPkg: Fix using root of drive

This allows near complete use of drive roots “fs0:” and “fs0:\” as directories and arguments to commands.

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

10 years agoShellPkg: Fix compiler warning 'unused variable'
Harry Liebel [Fri, 11 Apr 2014 17:35:22 +0000 (17:35 +0000)]
ShellPkg: Fix compiler warning 'unused variable'

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

10 years agoArmPlatformPkg/ArmVExpressLibRTSM: Added support for the additional 2GB memory of...
Olivier Martin [Fri, 11 Apr 2014 15:58:54 +0000 (15:58 +0000)]
ArmPlatformPkg/ArmVExpressLibRTSM: Added support for the additional 2GB memory of DRAM on FVP

The FVP Base and Foundation models have additional DRAM regions at
0x08_8000_0000.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15461 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoArmPlatformPkg/ArmVExpressLibRTSM: Removed unused dead code
Olivier Martin [Fri, 11 Apr 2014 15:58:13 +0000 (15:58 +0000)]
ArmPlatformPkg/ArmVExpressLibRTSM: Removed unused dead code

This code is only specific to the ARM Versatile Express hardware board.
There is no concept of logic tile on the FVP model.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15460 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoArmPlatformPkg/Bds: Fix loading Timeout from NV storage
Harry Liebel [Fri, 11 Apr 2014 15:57:06 +0000 (15:57 +0000)]
ArmPlatformPkg/Bds: Fix loading Timeout from NV storage

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

10 years agoArmPlatformPkg/Bds: Do not start all devices when starting an OS loader
Olivier Martin [Fri, 11 Apr 2014 11:02:59 +0000 (11:02 +0000)]
ArmPlatformPkg/Bds: Do not start all devices when starting an OS loader

EFI OS Loader application will be responsible to start their needed drivers.
While other EFI applications (eg: EFI Shell) expect to have all their drivers
started when they run.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15458 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoArmPlatformPkg/Bds: Allow to update EFI application boot entries
Olivier Martin [Fri, 11 Apr 2014 11:01:56 +0000 (11:01 +0000)]
ArmPlatformPkg/Bds: Allow to update EFI application boot entries

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15457 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoArmPlatformPkg: Print arguments for EFI Application
Olivier Martin [Fri, 11 Apr 2014 11:00:47 +0000 (11:00 +0000)]
ArmPlatformPkg: Print arguments for EFI Application

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15456 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoArmPlatformPkg/Bds: Introduced helper function to detect if an Ascii/Unicode string...
Olivier Martin [Fri, 11 Apr 2014 10:59:48 +0000 (10:59 +0000)]
ArmPlatformPkg/Bds: Introduced helper function to detect if an Ascii/Unicode string is printable

Some limitations:
 - it only supports unicode string that use ASCII character (< 0x100)
 - single character ASCII strings are interpreted as Unicode string
 - string cannot be longer than 2 x BOOT_DEVICE_OPTION_MAX (600 bytes)

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15455 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoArmPlatformPkg: Set PcdDefaultBootArgument to an empty unicode string
Olivier Martin [Fri, 11 Apr 2014 10:59:06 +0000 (10:59 +0000)]
ArmPlatformPkg: Set PcdDefaultBootArgument to an empty unicode string

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15454 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoArmPlatformPkg/Bds: Added support to detect if the binary is a EFI image
Olivier Martin [Fri, 11 Apr 2014 10:57:47 +0000 (10:57 +0000)]
ArmPlatformPkg/Bds: Added support to detect if the binary is a EFI image

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15453 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoArmPlatformPkg/Bds: Added support to pass parameters to EFI applications
Olivier Martin [Fri, 11 Apr 2014 10:57:00 +0000 (10:57 +0000)]
ArmPlatformPkg/Bds: Added support to pass parameters to EFI applications

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15452 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoArmPlatformPkg/Bds: Decoupled OptionalData for the EFI application boot entry from...
Olivier Martin [Fri, 11 Apr 2014 10:56:02 +0000 (10:56 +0000)]
ArmPlatformPkg/Bds: Decoupled OptionalData for the EFI application boot entry from the Linux loader

OptionalData for EFI Application does not contain any more specific information about the ArmPlatformPkg/Bds.
OptionalData now only contains the data pass to the EFI application.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15451 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoArmPlatformPkg/Bds: Add support to handle Unicode parameters
Olivier Martin [Fri, 11 Apr 2014 10:55:02 +0000 (10:55 +0000)]
ArmPlatformPkg/Bds: Add support to handle Unicode parameters

Most UEFI applications expect unicode string parameter.
This change is allows to support Ascii or Unicode strings.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15450 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoUpdate logic, only question with interactive attribute should trig the callback function.
Eric Dong [Fri, 11 Apr 2014 06:17:03 +0000 (06:17 +0000)]
Update logic, only question with interactive attribute should trig the callback function.

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

10 years agoSync value for string opcode after call the Callback function.
Eric Dong [Fri, 11 Apr 2014 06:15:57 +0000 (06:15 +0000)]
Sync value for string opcode after call the Callback function.

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

10 years agoMdeModulePkg/UsbMassStorage: Don't send READ_CAPACITY to unsupported usb mass storage...
Tian, Feng [Thu, 10 Apr 2014 02:45:32 +0000 (02:45 +0000)]
MdeModulePkg/UsbMassStorage: Don't send READ_CAPACITY to unsupported usb mass storage type device.

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

10 years agoCheck the pointer before use it.
Eric Dong [Thu, 10 Apr 2014 02:28:01 +0000 (02:28 +0000)]
Check the pointer before use it.

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

10 years agoFix a bug in IP driver that the fragment overlap check may be skipped incorrectly.
Fu Siyuan [Thu, 10 Apr 2014 02:25:49 +0000 (02:25 +0000)]
Fix a bug in IP driver that the fragment overlap check may be skipped incorrectly.
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye, Ting <ting.ye@intel.com>
Reviewed-by: Jin, Eric <eric.jin@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15443 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoArmPlatformPkg/Bds: Check OptionalData is not NULL before accessing it
Olivier Martin [Tue, 8 Apr 2014 18:05:48 +0000 (18:05 +0000)]
ArmPlatformPkg/Bds: Check OptionalData is not NULL before accessing it

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15439 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoArmPlatformPkg/NorFlashDxe: Fixed driver to support UEFI Runtime mode
Olivier Martin [Tue, 8 Apr 2014 18:03:25 +0000 (18:03 +0000)]
ArmPlatformPkg/NorFlashDxe: Fixed driver to support UEFI Runtime mode

- Added the NOR Flash region to the Runtime UEFI Memory Mapped IO
- Caught the gEfiEventVirtualAddressChangeGuid event to fixup the NOR Flash pointers

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15438 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoArmPlatformPkg/NorFlashDxe: Fix coding mistakes that would prevent Runtime mode
Olivier Martin [Tue, 8 Apr 2014 18:02:32 +0000 (18:02 +0000)]
ArmPlatformPkg/NorFlashDxe: Fix coding mistakes that would prevent Runtime mode

- No allocation during Runtime mode (post ExitBootServices())
- Allocate all the persistent data into runtime space
- Do not access BootServices API during Runtime mode

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15437 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoArmPlatformPkg/NorFlashDxe: Declare the driver as a UEFI Runtime driver
Olivier Martin [Tue, 8 Apr 2014 18:01:32 +0000 (18:01 +0000)]
ArmPlatformPkg/NorFlashDxe: Declare the driver as a UEFI Runtime driver

NorFlash driver is required by UEFI Variable services to read/write
Non-Volatile UEFI variables.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15436 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoArmPlatformPkg/PL031RealTimeClock: Fixed driver to support UEFI Runtime Services
Olivier Martin [Tue, 8 Apr 2014 17:59:00 +0000 (17:59 +0000)]
ArmPlatformPkg/PL031RealTimeClock: Fixed driver to support UEFI Runtime Services

- Removed PCD base address from the macro definition. The base address needs to be fixup when the driver runs in UEFI Runtime mode
- Added the PL031 controller memory region to the Runtime UEFI Memory Mapped IO
- Caught the gEfiEventVirtualAddressChangeGuid event to fixup the PL031 Base address

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15435 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoRefine the load form sets process for BrowserCallback function.
Eric Dong [Tue, 8 Apr 2014 06:17:33 +0000 (06:17 +0000)]
Refine the load form sets process for BrowserCallback function.

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

10 years agoOvmfPkg: PlatformPei: protect SEC's GUIDed section handler table thru S3
Laszlo Ersek [Sat, 5 Apr 2014 21:26:09 +0000 (21:26 +0000)]
OvmfPkg: PlatformPei: protect SEC's GUIDed section handler table thru S3

OVMF's SecMain is unique in the sense that it links against the following
two libraries *in combination*:

- IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/
                                               LzmaCustomDecompressLib.inf
- MdePkg/Library/BaseExtractGuidedSectionLib/
                                           BaseExtractGuidedSectionLib.inf

The ExtractGuidedSectionLib library class allows decompressor modules to
register themselves (keyed by GUID) with it, and it allows clients to
decompress file sections with a registered decompressor module that
matches the section's GUID.

BaseExtractGuidedSectionLib is a library instance (of type BASE) for this
library class. It has no constructor function.

LzmaCustomDecompressLib is a compatible decompressor module (of type
BASE). Its section type GUID is

  gLzmaCustomDecompressGuid == EE4E5898-3914-4259-9D6E-DC7BD79403CF

When OVMF's SecMain module starts, the LzmaCustomDecompressLib constructor
function is executed, which registers its LZMA decompressor with the above
GUID, by calling into BaseExtractGuidedSectionLib:

  LzmaDecompressLibConstructor() [GuidedSectionExtraction.c]
    ExtractGuidedSectionRegisterHandlers() [BaseExtractGuidedSectionLib.c]
      GetExtractGuidedSectionHandlerInfo()
        PcdGet64 (PcdGuidedExtractHandlerTableAddress) -- NOTE THIS

Later, during a normal (non-S3) boot, SecMain utilizes this decompressor
to get information about, and to decompress, sections of the OVMF firmware
image:

  SecCoreStartupWithStack() [OvmfPkg/Sec/SecMain.c]
    SecStartupPhase2()
      FindAndReportEntryPoints()
        FindPeiCoreImageBase()
          DecompressMemFvs()
            ExtractGuidedSectionGetInfo() [BaseExtractGuidedSectionLib.c]
            ExtractGuidedSectionDecode() [BaseExtractGuidedSectionLib.c]

Notably, only the extraction depends on full-config-boot; the registration
of LzmaCustomDecompressLib occurs unconditionally in the SecMain EFI
binary, triggered by the library constructor function.

This is where the bug happens. BaseExtractGuidedSectionLib maintains the
table of GUIDed decompressors (section handlers) at a fixed memory
location; selected by PcdGuidedExtractHandlerTableAddress (declared in
MdePkg.dec). The default value of this PCD is 0x1000000 (16 MB).

This causes SecMain to corrupt guest OS memory during S3, leading to
random crashes. Compare the following two memory dumps, the first taken
right before suspending, the second taken right after resuming a RHEL-7
guest:

crash> rd -8 -p 1000000 0x50
1000000: c0 00 08 00 02 00 00 00 00 00 00 00 00 00 00 00  ................
1000010: d0 33 0c 00 00 c9 ff ff c0 10 00 01 00 88 ff ff  .3..............
1000020: 0a 6d 57 32 0f 00 00 00 38 00 00 01 00 88 ff ff  .mW2....8.......
1000030: 00 00 00 00 00 00 00 00 73 69 67 6e 61 6c 6d 6f  ........signalmo
1000040: 64 75 6c 65 2e 73 6f 00 00 00 00 00 00 00 00 00  dule.so.........

vs.

crash> rd -8 -p 1000000 0x50
1000000: 45 47 53 49 01 00 00 00 20 00 00 01 00 00 00 00  EGSI.... .......
1000010: 20 01 00 01 00 00 00 00 a0 01 00 01 00 00 00 00   ...............
1000020: 98 58 4e ee 14 39 59 42 9d 6e dc 7b d7 94 03 cf  .XN..9YB.n.{....
1000030: 00 00 00 00 00 00 00 00 73 69 67 6e 61 6c 6d 6f  ........signalmo
1000040: 64 75 6c 65 2e 73 6f 00 00 00 00 00 00 00 00 00  dule.so.........

The "EGSI" signature corresponds to EXTRACT_HANDLER_INFO_SIGNATURE
declared in
MdePkg/Library/BaseExtractGuidedSectionLib/BaseExtractGuidedSectionLib.c.

Additionally, the gLzmaCustomDecompressGuid (quoted above) is visible at
guest-phys offset 0x1000020.

Fix the problem as follows:
- Carve out 4KB from the 36KB gap that we currently have between

  PcdOvmfLockBoxStorageBase + PcdOvmfLockBoxStorageSize == 8220 KB
  and
  PcdOvmfSecPeiTempRamBase                              == 8256 KB.

- Point PcdGuidedExtractHandlerTableAddress to 8220 KB (0x00807000).

- Cover the area with an EfiACPIMemoryNVS type memalloc HOB, if S3 is
  supported and we're not currently resuming.

The 4KB size that we pick is an upper estimate for
BaseExtractGuidedSectionLib's internal storage size. The latter is
calculated as follows (see GetExtractGuidedSectionHandlerInfo()):

  sizeof(EXTRACT_GUIDED_SECTION_HANDLER_INFO) +         // 32
  PcdMaximumGuidedExtractHandler * (
    sizeof(GUID) +                                      // 16
    sizeof(EXTRACT_GUIDED_SECTION_DECODE_HANDLER) +     //  8
    sizeof(EXTRACT_GUIDED_SECTION_GET_INFO_HANDLER)     //  8
    )

OVMF sets PcdMaximumGuidedExtractHandler to 16 decimal (which is the
MdePkg default too), yielding 32 + 16 * (16 + 8 + 8) == 544 bytes.

Regarding the lifecycle of the new area:

(a) when and how it is initialized after first boot of the VM

  The library linked into SecMain finds that the area lacks the signature.
  It initializes the signature, plus the rest of the structure. This is
  independent of S3 support.

  Consumption of the area is also limited to SEC (but consumption does
  depend on full-config-boot).

(b) how it is protected from memory allocations during DXE

  It is not, in the general case; and we don't need to. Nothing else links
  against BaseExtractGuidedSectionLib; it's OK if DXE overwrites the area.

(c) how it is protected from the OS

  When S3 is enabled, we cover it with AcpiNVS in InitializeRamRegions().

  When S3 is not supported, the range is not protected.

(d) how it is accessed on the S3 resume path

  Examined by the library linked into SecMain. Registrations update the
  table in-place (based on GUID matches).

(e) how it is accessed on the warm reset path

  If S3 is enabled, then the OS won't damage the table (due to (c)), hence
  see (d).

  If S3 is unsupported, then the OS may or may not overwrite the
  signature. (It likely will.) This is identical to the pre-patch status.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-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@15433 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoShellPkg: Fix command-line parsing to start with Argv[0] when comparing passed-in...
Chris Phillips [Fri, 4 Apr 2014 13:45:36 +0000 (13:45 +0000)]
ShellPkg: Fix command-line parsing to start with Argv[0] when comparing passed-in options

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chris Phillips <chrisp@hp.com>
Reviewed-By: Olivier Martin <Olivier.Martin@arm.com>
Reviewed-by: Jaben Carsey <Jaben.carsey@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15432 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoArmPlatformPkg/PrePi: Use the same calculation to declare the stack size as in the...
Olivier Martin [Thu, 3 Apr 2014 20:05:30 +0000 (20:05 +0000)]
ArmPlatformPkg/PrePi: Use the same calculation to declare the stack size as in the entrypoint

The stack size in the entrypoint (ie: $ARCH/ModuleEntryPoint.S) is calculated such as
StackSize = PrimaryCoreStack + (core_count - 1) * SecondaryCoreStack

While we were declaring the stacksize into the stack hob as:
StackSize = PrimaryCoreStack + (cluster * 8) * SecondaryCoreStack

If the number of cluster (ie: PcdClusterCount) were not defined correctly then
the stack size declaration were not correct.
It could cause stack corruption if the allocator allocates memory in this range.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15431 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoArmPlatformPkg/ArmVExpress-FVP-AArch64: Fixed number of cores and cluster for Base...
Olivier Martin [Thu, 3 Apr 2014 20:04:39 +0000 (20:04 +0000)]
ArmPlatformPkg/ArmVExpress-FVP-AArch64: Fixed number of cores and cluster for Base and Foundation models

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15430 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoArmPlatformPkg: Fixed memory leak after calling GetEnvironmentVariable()
Olivier Martin [Wed, 2 Apr 2014 17:33:44 +0000 (17:33 +0000)]
ArmPlatformPkg: Fixed memory leak after calling GetEnvironmentVariable()

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15428 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoArmPkg: Fixed GetEnvironmentVariable() when the UEFI Variable did not exist
Olivier Martin [Wed, 2 Apr 2014 17:32:29 +0000 (17:32 +0000)]
ArmPkg: Fixed GetEnvironmentVariable() when the UEFI Variable did not exist

The function was allocating a buffer for the read value from the UEFI Variable.
But it was returning the pointer of the default value when the variable was
not present.
It could cause error when the default value and the returned value were free
when these addresses were the same (double FreePool on the same address).

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15427 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoAdd missing parameter comment in AddPubKeyInStore()
Dong Guo [Tue, 1 Apr 2014 06:02:10 +0000 (06:02 +0000)]
Add missing parameter comment in AddPubKeyInStore()

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

10 years agoCheck the parameter before use it.
Eric Dong [Tue, 1 Apr 2014 05:55:06 +0000 (05:55 +0000)]
Check the parameter before use it.

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

10 years agoShellPkg: Allow opening of root drive nodes
Jaben Carsey [Mon, 31 Mar 2014 21:06:13 +0000 (21:06 +0000)]
ShellPkg: Allow opening of root drive nodes

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

10 years agoShellPkg: Fix potential memory leak when failing to fully create a structure
Jaben Carsey [Mon, 31 Mar 2014 20:43:04 +0000 (20:43 +0000)]
ShellPkg: Fix potential memory leak when failing to fully create a structure

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

10 years agoOvmfPkg: add a catch-all match for PCI devices in the OpenFirmware path
Paolo Bonzini [Mon, 31 Mar 2014 20:36:23 +0000 (20:36 +0000)]
OvmfPkg: add a catch-all match for PCI devices in the OpenFirmware path

In many cases, the second node in /pci@i0cf8/XYZ@DD,FF node is enough
to match a UEFI device path; a typical cases is a NIC that is assigned
from the host to the guest.  Add a catch-all case for PCI devices, and
reuse it for NICs since it works well for those too.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15422 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoOvmfPkg: non-null PcdLib instance for the CSM VideoDxe
Paolo Bonzini [Mon, 31 Mar 2014 20:36:15 +0000 (20:36 +0000)]
OvmfPkg: non-null PcdLib instance for the CSM VideoDxe

VideoDxe is a UEFI_DRIVER, so it has by default a null instance
of PcdLib.  It accesses two PCDs that are now dynamic
(gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution
and gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution).
Similar to r15362 (OvmfPkg: non-null PcdLib instance for
GraphicsConsoleDxe, 2014-03-22), we need to specify a non-null
instance of PcdLib.

This patch unbreaks the CSM VideoDxe module for OvmfPkg.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-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@15421 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoOvmfPkg: AcpiPlatformDxe: download ACPI tables from QEMU
Laszlo Ersek [Mon, 31 Mar 2014 20:36:06 +0000 (20:36 +0000)]
OvmfPkg: AcpiPlatformDxe: download ACPI tables from QEMU

Recent qemu versions compose all ACPI tables on the host side, according
to the target hardware configuration, and make the tables available to any
guest firmware over fw_cfg.

See version compatibility information below.

The feature moves the burden of keeping ACPI tables up-to-date from boot
firmware to qemu (which is the source of hardware configuration anyway).

This patch adds client code for this feature. Benefits of the
qemu-provided ACPI tables include PCI hotplug for example.

Qemu provides the following three fw_cfg files:
- etc/acpi/rsdp
- etc/acpi/tables
- etc/table-loader

"etc/acpi/rsdp" and "etc/acpi/tables" are similar, they are only kept
separate because they have different allocation requirements in SeaBIOS.

Both of these fw_cfg files contain preformatted ACPI payload.
"etc/acpi/rsdp" contains only the RSDP table, while "etc/acpi/tables"
contains all other tables, concatenated.

The tables in these two fw_cfg files are filled in by qemu, but two kinds
of fields are left incomplete in each table: pointers to other tables, and
checksums (which depend on the pointers).

Qemu initializes each pointer with a relative offset into the fw_cfg file
that contains the pointed-to ACPI table. The final pointer values depend
on where the fw_cfg files, holding the pointed-to ACPI tables, will be
placed in memory by the guest. That is, the pointer fields need to be
"relocated" (incremented) by the base addresses of where "/etc/acpi/rsdp"
and "/etc/acpi/tables" will be placed in guest memory.

This is where the third file, "/etc/table-loader" comes in the picture. It
is a linker/loader script that has several command types:

  One command type instructs the guest to download the other two files.

  Another command type instructs the guest to increment ("absolutize") a
  pointer field (having a relative initial value) in the pointing ACPI
  table, present in some fw_cfg file, with the dynamic base address of the
  same (or another) fw_cfg file, holding the pointed-to ACPI table.

  The third command type instructs the guest to compute checksums over
  ranges and to store them.

In edk2, EFI_ACPI_TABLE_PROTOCOL knows about table relationships -- it
handles linkage automatically when a table is installed. The protocol
takes care of checksumming too. RSDP is installed automatically. Hence we
only need to care about the "etc/acpi/tables" fw_cfg file, determining the
boundaries of each ACPI table inside it, and installing those tables.

Qemu compatibility information:

--------------+---------------------+-------------------------------------
 qemu version | qemu machine type   | effects of the patch
--------------+---------------------+-------------------------------------
 up to 1.6.x  | any pc-i440fx       | None. OVMF's built-in ACPI tables
              |                     | are used.
--------------+---------------------+-------------------------------------
 any          | up to pc-i440fx-1.6 | None. OVMF's built-in ACPI tables
              |                     | are used.
--------------+---------------------+-------------------------------------
 1.7.0        | pc-i440fx-1.7       | Potential guest OS crash, dependent
              | (default for 1.7.0) | on guest RAM size.
              |                     |
              |                     | DO NOT RUN OVMF on the (1.7.0,
              |                     | pc-i440fx-1.7) qemu / machine type
              |                     | combination.
--------------+---------------------+-------------------------------------
 1.7.1        | pc-i440fx-1.7       | OVMF downloads valid ACPI tables
              | (default for 1.7.1) | from qemu and passes them to the
              |                     | guest OS.
--------------+---------------------+-------------------------------------
 2.0.0-rc0    | pc-i440fx-1.7 or    | OVMF downloads valid ACPI tables
              | later               | from qemu and passes them to the
              |                     | guest OS.
 -------------+---------------------+-------------------------------------

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-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@15420 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoOvmfPkg: AcpiS3SaveDxe: do not load if S3 is unsupported/disabled in qemu
Laszlo Ersek [Mon, 31 Mar 2014 20:35:58 +0000 (20:35 +0000)]
OvmfPkg: AcpiS3SaveDxe: do not load if S3 is unsupported/disabled in qemu

The previous patch ensures that the LockBox is protected during DXE (but
the OS can still drop it) if S3 is unsupported or disabled. However, S3
related drivers not only save data in the lockbox, they allocate objects
with Reserved and AcpiNVS memory types too, which the OS can't (must not)
release. This is a waste when S3 is unsupported or disabled.

In OVMF a good "choke point" for these drivers is the entry point of
AcpiS3SaveDxe. The messages of the following commits are relevant to the
data and control flow:

- SVN r15290 (git commit 8f5ca05b)
- SVN r15305 (git commit 5a217a06)
- SVN r15306 (git commit d4ba06df)

Prevent AcpiS3SaveDxe from loading when S3 is unsupported or disabled.
This should keep away (most of the) dependent drivers too.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Matt Fleming <matt.fleming@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15419 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoOvmfPkg: PlatformPei: lifecycle fixes for the LockBox area
Laszlo Ersek [Mon, 31 Mar 2014 20:35:50 +0000 (20:35 +0000)]
OvmfPkg: PlatformPei: lifecycle fixes for the LockBox area

If (mBootMode == BOOT_ON_S3_RESUME) -- that is, we are resuming --, then
the patch has no observable effect.

If (mBootMode != BOOT_ON_S3_RESUME && mS3Supported) -- that is, we are
booting or rebooting, and S3 is supported), then the patch has no
observable effect either.

If (mBootMode != BOOT_ON_S3_RESUME && !mS3Supported) -- that is, we are
booting or rebooting, and S3 is unsupported), then the patch effects the
following two fixes:

- The LockBox storage is reserved from DXE (but not the OS). Drivers in
  DXE may save data in the LockBox regardless of S3 support, potentially
  corrupting any overlapping allocations. Make sure there's no overlap.

- The LockBox storage is cleared. A LockBox inherited across a non-resume
  reboot, populated with well-known GUIDs, breaks drivers that want to
  save entries with those GUIDs.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Matt Fleming <matt.fleming@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15418 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoRemove unused [PcdsDynamic, PcdsDynamicEx] section.
Dong Guo [Mon, 31 Mar 2014 01:54:51 +0000 (01:54 +0000)]
Remove unused [PcdsDynamic, PcdsDynamicEx] section.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dong Guo <guo.dong@intel.com>
Reviewed-by: Fan, Jeff <jeff.fan@intel.com>
Reviewed-by: Ni, Ruiyu <ruiyu.ni@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15416 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoCheck the input file pointer before use it.
Eric Dong [Fri, 28 Mar 2014 05:51:51 +0000 (05:51 +0000)]
Check the input file pointer before use it.

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

10 years agoAdd check to avoid null pointer deference.
Ruiyu Ni [Fri, 28 Mar 2014 02:50:47 +0000 (02:50 +0000)]
Add check to avoid null pointer deference.

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