]> git.proxmox.com Git - mirror_edk2.git/log
mirror_edk2.git
10 years agoShellBinPkg: Update binaries
Jaben Carsey [Mon, 23 Sep 2013 14:50:57 +0000 (14:50 +0000)]
ShellBinPkg: Update binaries

from SVN 14706

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

10 years agoMmcDxe Diagnostics: return EFI_UNSUPPORTED for Language other than english
Olivier Martin [Mon, 23 Sep 2013 09:43:51 +0000 (09:43 +0000)]
MmcDxe Diagnostics: return EFI_UNSUPPORTED for Language other than english

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

10 years agoLcdGraphicsOutputDxe: Update FrameBufferSize as per UEFI spec section 11.9
Olivier Martin [Mon, 23 Sep 2013 09:42:53 +0000 (09:42 +0000)]
LcdGraphicsOutputDxe: Update FrameBufferSize as per UEFI spec section 11.9

The shift by 1 on the left was expected. It eases the access to CSSELR and set/way operations
where the cache level field is at the BIT1 position.

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

10 years agoArmPkg/ArmLib: Revert change 'Fixed field shifting in CLIDR_EL1 (AArch64)'
Olivier Martin [Mon, 23 Sep 2013 09:42:05 +0000 (09:42 +0000)]
ArmPkg/ArmLib: Revert change 'Fixed field shifting in CLIDR_EL1 (AArch64)'

The shift by 1 on the left was expected. It eases the access to CSSELR and set/way operations
where the cache level field is at the BIT1 position.

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

10 years agoSemihostFs: Fix check for read-only file or file-open
Olivier Martin [Mon, 23 Sep 2013 09:41:19 +0000 (09:41 +0000)]
SemihostFs: Fix check for read-only file or file-open

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

10 years agoArmPlatformPkg/LcdGraphicsOutputDxe: Call LcdShutdown() on ExitBootServices() if...
Olivier Martin [Mon, 23 Sep 2013 09:40:27 +0000 (09:40 +0000)]
ArmPlatformPkg/LcdGraphicsOutputDxe: Call LcdShutdown() on ExitBootServices() if PcdGopDisableOnExitBootServices

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

10 years agoLcdGraphicsOutputDxe: Fix BltVideoFill for non-32-bit architectures
Olivier Martin [Mon, 23 Sep 2013 09:39:40 +0000 (09:39 +0000)]
LcdGraphicsOutputDxe: Fix BltVideoFill for non-32-bit architectures

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

10 years agoArmPkg/CpuDxe: Fixed the condition that checks if the level-1 descriptor points to...
Olivier Martin [Mon, 23 Sep 2013 09:38:53 +0000 (09:38 +0000)]
ArmPkg/CpuDxe: Fixed the condition that checks if the level-1 descriptor points to a level-2 page table

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

10 years agoEdkShellPkg: Add Aarch64 support
Olivier Martin [Mon, 23 Sep 2013 09:20:03 +0000 (09:20 +0000)]
EdkShellPkg: Add Aarch64 support

* Update the EFI Shell patch to use SVN rev 64 (was rev 61)
* Modify build system to enable compilation targeting Aarch64 platform.
* Modify patch to apply on EdkShell sources to add support for Aarch64.

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

10 years agoMdeModulePkg/NvmExpressDxe: Fix an issue of potential uninitialized local variable
Feng Tian [Mon, 23 Sep 2013 02:10:58 +0000 (02:10 +0000)]
MdeModulePkg/NvmExpressDxe: Fix an issue of potential uninitialized local variable

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

10 years agoAdd missing comments for function parameters.
gdong1 [Mon, 23 Sep 2013 02:00:24 +0000 (02:00 +0000)]
Add missing comments for function parameters.

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

10 years agoresolve TpmMeasurementLib dependency introduced in r14687
jyao1 [Sun, 22 Sep 2013 02:15:16 +0000 (02:15 +0000)]
resolve TpmMeasurementLib dependency introduced in r14687

signed off by: jiewen.yao@intel.com

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

10 years agoResolve GCC build error, where #pragma pack(push[, id], <n>) is not supported.
jyao1 [Sun, 22 Sep 2013 01:56:37 +0000 (01:56 +0000)]
Resolve GCC build error, where #pragma pack(push[, id], <n>) is not supported.

signed off by: jiewen.yao@intel.com

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

10 years agoOvmfPkg: resolve TpmMeasurementLib dependency introduced in r14687
Laszlo Ersek [Sat, 21 Sep 2013 08:18:03 +0000 (08:18 +0000)]
OvmfPkg: resolve TpmMeasurementLib dependency introduced in r14687

(1) OVMF depends on

  MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf

unconditionally.

(2) When OVMF is built with -D SECURE_BOOT_ENABLE, then

  SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.inf

is injected into SecurityStubDxe above.

(3) SVN r14687 ("Add TPM2 implementation.") has made
DxeImageVerificationLib dependent on TpmMeasurementLib.

Currently the last link of the

  OVMF -> SecurityStubDxe -> DxeImageVerificationLib -> TpmMeasurementLib

dependency chain is unresolved:

  build.py...
  /.../OvmfPkg/OvmfPkgX64.dsc(...): error 4000: Instance of library class [TpmMeasurementLib] is not found
  in [/.../SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.inf] [X64]
  consumed by module [/.../MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf]

Let's provide a library instance for TpmMeasurementLib the same way as
"SecurityPkg/SecurityPkg.dsc" does (SVN r13964.)

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

10 years agoShellPkg: Handle pool allocation failure
Sergei Antonov [Fri, 20 Sep 2013 20:10:17 +0000 (20:10 +0000)]
ShellPkg: Handle pool allocation failure

FreePool() will receive NULL if AllocateZeroPool() fails.
So a check for NULL is needed.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Sergei Antonov <saproj@gmail.com>
reviewed-by: jaben carsey <jaben.carsey@gmail.com>

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

10 years agoShellPkg: Handle pool allocation failure
Sergei Antonov [Thu, 19 Sep 2013 17:23:10 +0000 (17:23 +0000)]
ShellPkg: Handle pool allocation failure

If AllocateZeroPool() returns NULL,
GetVariable() will return EFI_BUFFER_TOO_SMALL,
FreePool() will receive NULL.
So check for NULL before FreePool().

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

10 years agoAdd TPM2 implementation.
jyao1 [Wed, 18 Sep 2013 05:31:18 +0000 (05:31 +0000)]
Add TPM2 implementation.

signed off by: jiewen.yao@intel.com
reviewed by: guo.dong@intel.com

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

10 years agoAdd TPM2 related header file.
jyao1 [Wed, 18 Sep 2013 05:29:06 +0000 (05:29 +0000)]
Add TPM2 related header file.
signed off by: jiewen.yao@intel.com
reviewed by: liming.gao@intel.com

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

10 years agoFix a bug in Ip4 driver that Ip4.Transmit() interface may return EFI_INVALID_PARAMETE...
Fu Siyuan [Wed, 18 Sep 2013 02:27:20 +0000 (02:27 +0000)]
Fix a bug in Ip4 driver that Ip4.Transmit() interface may return EFI_INVALID_PARAMETER without restore TPL.
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>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14682 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoMdeModulePkg/AtaAtapiPassThru: To follow UEFI 2.4, updating the implementation of...
Feng Tian [Wed, 18 Sep 2013 02:13:34 +0000 (02:13 +0000)]
MdeModulePkg/AtaAtapiPassThru: To follow UEFI 2.4, updating the implementation of ATA_PASS_THRU.PassThru() to allow sending ATA cmds to ATAPI devices.

Signed-off-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Eric Jin <eric.jin@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14681 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoFix 3 bugs in DiskIoDxe and PartitionDxe drivers introduced in DiskIo2 implementation.
Ruiyu Ni [Tue, 17 Sep 2013 05:11:30 +0000 (05:11 +0000)]
Fix 3 bugs in DiskIoDxe and PartitionDxe drivers introduced in DiskIo2 implementation.
1. DiskIo2 shouldn't signal the event when the *Ex interface returns failure status per the UEFI spec.
2. PartitionDxe should close DiskIo2 protocol when error happens in DriverBindingStart() otherwise Fat driver cannot open the DiskIo2 BY_DRIVER.
3. PartitionDxe should create event using TPL_NOTIFY instead of TPL_CALLBACK otherwise asynchronous FileIo may be blocked.

Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14680 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoRemove the non-ASCII characters in the comments of StatusCodeDataTypeId
Shumin Qiu [Tue, 17 Sep 2013 00:33:25 +0000 (00:33 +0000)]
Remove the non-ASCII characters in the comments of StatusCodeDataTypeId

Signed-off-by: Shumin Qiu <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@14679 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoExport one interface to support 3rd party to change question attribute, such as hide...
Eric Dong [Mon, 16 Sep 2013 09:50:32 +0000 (09:50 +0000)]
Export one interface to support 3rd party to change question attribute, such as hide/gray out.

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

10 years agoArmPkg/ArmLib: Fixed field shifting in CLIDR_EL1 (AArch64)
Olivier Martin [Mon, 16 Sep 2013 09:33:55 +0000 (09:33 +0000)]
ArmPkg/ArmLib: Fixed field shifting in CLIDR_EL1 (AArch64)

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

10 years agoArmPkg/CpuDxe: Fixed attribute setting in GetNextEntryAttribute()
Olivier Martin [Mon, 16 Sep 2013 09:32:59 +0000 (09:32 +0000)]
ArmPkg/CpuDxe: Fixed attribute setting in GetNextEntryAttribute()

The wrong attribute was used to set the 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@14676 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoArmPlatformPkg/MemoryInitPei: AARCH64 fix memory address calculations
Garrett Kirkendall [Mon, 16 Sep 2013 09:29:52 +0000 (09:29 +0000)]
ArmPlatformPkg/MemoryInitPei: AARCH64 fix memory address calculations

At least for AARCH64 currently, SystemMemoryTop and FdTop can overflow
while adding the 32-bit PCDs together.  The resulting value loses the
upper 32-bits.  Cast each of the values to EFI_PHYSICAL_ADDRESS size
before doing the addition to prevent erroneous overflow.  There is currently
no 32-bit platform in EDKII open source that will overflow and this change
would not fix that problem anyway.

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

10 years ago1. Read 32bit CPU Init APIC ID from CPUID leaf B in XAPIC mode.
Jeff Fan [Mon, 16 Sep 2013 08:42:59 +0000 (08:42 +0000)]
1. Read 32bit CPU Init APIC ID from CPUID leaf B in XAPIC mode.
2. Read CPU APIC ID from CPUID leaf B in case CPU Init APIC ID is larger 255 in XAPIC mode.

Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14674 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoRefine question value update logic.
Eric Dong [Mon, 16 Sep 2013 07:57:06 +0000 (07:57 +0000)]
Refine question value update logic.

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

10 years agoCreate PCDs in MdeModulePkg for ACPI table OEM_ID/OEM_TABLE_ID/OEM_REVISION/CREATOR_I...
Star Zeng [Mon, 16 Sep 2013 02:20:52 +0000 (02:20 +0000)]
Create PCDs in MdeModulePkg for ACPI table OEM_ID/OEM_TABLE_ID/OEM_REVISION/CREATOR_ID/CREATOR_REVISION customization.

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

10 years agoMdeModulePkg: Add support for weakly aligned FVs.
Star Zeng [Mon, 16 Sep 2013 01:50:44 +0000 (01:50 +0000)]
MdeModulePkg: Add support for weakly aligned FVs.

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

10 years agoAdd definition for EFI_FIRMWARE_CONTENTS_SIGNED_GUID.
Shumin Qiu [Mon, 16 Sep 2013 01:30:39 +0000 (01:30 +0000)]
Add definition for EFI_FIRMWARE_CONTENTS_SIGNED_GUID.

Signed-off-by: Shumin Qiu <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@14669 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoOvmfPkg: QemuBootOrder: keep some boot options that have not been selected
Laszlo Ersek [Fri, 13 Sep 2013 08:14:57 +0000 (08:14 +0000)]
OvmfPkg: QemuBootOrder: keep some boot options that have not been selected

Some of the active boot options that have not been selected over fw_cfg
should be preserved at the end of the boot order. For now we're adding
back everything that starts with neither PciRoot() nor HD(). This includes
the UEFI shell, memory-mapped from the firmware image.

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

10 years agoOvmfPkg: QemuBootOrder: mark UEFI boot options selected by fw_cfg
Laszlo Ersek [Fri, 13 Sep 2013 08:14:51 +0000 (08:14 +0000)]
OvmfPkg: QemuBootOrder: mark UEFI boot options selected by fw_cfg

This will allow us to identify those UEFI boot options (while keeping
their relative order) that have *not* been selected by fw_cfg.

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

10 years agoOvmfPkg: QemuBootOrder: collect active UEFI boot options in advance
Laszlo Ersek [Fri, 13 Sep 2013 08:14:45 +0000 (08:14 +0000)]
OvmfPkg: QemuBootOrder: collect active UEFI boot options in advance

In preparation for the next patch, collect active UEFI boot options in
advance into a new array. Rebase the current inner loop (the matching
loop) to this array.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Michael Chang <mchang@suse.com>
[jordan.l.justen@intel.com: initialize *ActiveOption for GCC IA32 warning]
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@14666 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoOvmfPkg: QemuBootOrder: expand relative device paths in UEFI boot options
Laszlo Ersek [Fri, 13 Sep 2013 08:14:36 +0000 (08:14 +0000)]
OvmfPkg: QemuBootOrder: expand relative device paths in UEFI boot options

The prefix matching logic in Match()
[OvmfPkg/Library/PlatformBdsLib/QemuBootOrder.c] expects UEFI boot options
to specify full (absolute) device paths. However, partial (relative)
device paths starting with a HD() node are valid for booting. By not
recognizing them, QemuBootOrder.c misses (and deletes) valid boot options
that would otherwise match the user's preference.

Just like BdsLibBootViaBootOption() expands such paths with the
BdsExpandPartitionPartialDevicePathToFull() function for booting, do the
same in QemuBootOrder.c for prefix matching.

This moves the very first call to
BdsExpandPartitionPartialDevicePathToFull() to an earlier point. The
following call tree explains it:

BdsEntry()                                          [IntelFrameworkModulePkg/Universal/BdsDxe/BdsEntry.c]
  PlatformBdsPolicyBehavior()                       [OvmfPkg/Library/PlatformBdsLib/BdsPlatform.c]
    SetBootOrderFromQemu()                          [OvmfPkg/Library/PlatformBdsLib/QemuBootOrder.c]
      Match()                                       [OvmfPkg/Library/PlatformBdsLib/QemuBootOrder.c]
        BdsExpandPartitionPartialDevicePathToFull() [IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c]
  BdsBootDeviceSelect()                             [IntelFrameworkModulePkg/Universal/BdsDxe/BdsEntry.c]
    BdsLibBootViaBootOption()                       [IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c]
      BdsExpandPartitionPartialDevicePathToFull()   [IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c]

This should be fine, for two reasons:

- the new, earlier call is still under BdsEntry(),

- BdsExpandPartitionPartialDevicePathToFull() expects to be called
  repeatedly, even with the same set of HD() device paths. This function
  implements its own caching for device paths, likely for performance
  reasons.

  That fits this patch well because whatever device paths we expand under
  PlatformBdsPolicyBehavior() can be quickly looked up in
  BdsBootDeviceSelect(), so no work (ie.
  BdsLibConnectAllDriversToAllControllers()) should be wasted.

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

10 years agoStdLib: Fix pointer arithmetic issues in the strncasecmp function.
Daryl McDaniel [Fri, 13 Sep 2013 00:46:19 +0000 (00:46 +0000)]
StdLib: Fix pointer arithmetic issues in the strncasecmp function.

The original Linux code tried to be too fancy so the internal pointers got out of sync.
Rewrote the function to at least be more clear.
Regardless, it now works properly.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Daryl McDaniel <daryl.mcdaniel@intel.com>
Reviewed by: matthew.stanbro@intel.com
Reviewed by: erik.c.bjorge@intel.com

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

10 years agoForcing the python27.dll to be executable
lhauch [Thu, 12 Sep 2013 17:59:05 +0000 (17:59 +0000)]
Forcing the python27.dll to be executable

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

10 years agoReturn EFI_WRITE_PROTECTED when setting KEKDefault, PKDefault, dbDefault, dbxDefault...
Fu Siyuan [Thu, 12 Sep 2013 05:31:26 +0000 (05:31 +0000)]
Return EFI_WRITE_PROTECTED when setting KEKDefault, PKDefault, dbDefault, dbxDefault and dbtDefault variable.
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Dong Guo <guo.dong@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14662 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoUpdate the chaining requirements with regards to the Platform Key.
Fu Siyuan [Thu, 12 Sep 2013 05:26:15 +0000 (05:26 +0000)]
Update the chaining requirements with regards to the Platform Key.
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Dong Guo <guo.dong@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14661 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoAdd “VendorKeys” variable for indicating out of band key modification.
Fu Siyuan [Thu, 12 Sep 2013 05:23:28 +0000 (05:23 +0000)]
Add “VendorKeys” variable for indicating out of band key modification.
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Dong Guo <guo.dong@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14660 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoUpdate BGRT image buffer to be stored in EfiBootSerivesData according to ACPI5.0...
Chao Zhang [Thu, 12 Sep 2013 03:27:00 +0000 (03:27 +0000)]
Update BGRT image buffer to be stored in EfiBootSerivesData according to ACPI5.0 spec

Signed-off-by: Chao Zhang <chao.b.zhang@intel.com>
Reviewed-by: Yao Jiewen <jiewen.yao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14659 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoMdeModulePkg/NvmExpressDxe: Fix some bugs
Feng Tian [Wed, 11 Sep 2013 06:57:53 +0000 (06:57 +0000)]
MdeModulePkg/NvmExpressDxe: Fix some bugs

1) The Queue size field in create I/O submission/completion queue cmds is 0-based. the current code is 1-based.
2) a typo on allocated memory page size. it's inconsistent that some places is using 4 pages, but a place is using 6 pages.
3) a typo on PRP/SGL mechanism judgment. should directly use Psdt field rather than Opc field.
4) some platforms may not support UINT64 width access on MMIO register. Fix it to use two 32-bit width access.

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

10 years agoUpdate UpdateCapsule() service return status to follow UEFI2.3.1 D.
Liming Gao [Wed, 11 Sep 2013 05:56:52 +0000 (05:56 +0000)]
Update UpdateCapsule() service return status to follow UEFI2.3.1 D.

Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Elvin Li <elvin.li@intel.com>
Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14656 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoUpdate UpdateCapsule() service return status to follow UEFI2.3.1 D.
Liming Gao [Wed, 11 Sep 2013 05:56:27 +0000 (05:56 +0000)]
Update UpdateCapsule() service return status to follow UEFI2.3.1 D.

Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Elvin Li <elvin.li@intel.com>
Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14655 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoAdd missing SCSI_IO related definitions.
Feng Tian [Wed, 11 Sep 2013 03:33:55 +0000 (03:33 +0000)]
Add missing SCSI_IO related definitions.

Signed-off-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Elvin Li <elvin.li@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14653 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoStdLib: Fix IA32 and X64 build issues.
Daryl McDaniel [Tue, 10 Sep 2013 21:53:28 +0000 (21:53 +0000)]
StdLib: Fix IA32 and X64 build issues.

Building with the Intel Compiler V11 produces the following error:
StdLib\LibC\Containers\Queues\Fifo.c(223): error #186: pointless comparison of unsigned integer with zero
    assert(Count >= 0);

Deleted the assert.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Daryl McDaniel <daryl.mcdaniel@intel.com>
Reviewed by: erik.c.bjorge@intel.com

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

10 years agoStdLib: Fix IPF build issues.
Daryl McDaniel [Tue, 10 Sep 2013 21:47:26 +0000 (21:47 +0000)]
StdLib: Fix IPF build issues.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Daryl McDaniel <daryl.mcdaniel@intel.com>
Reviewed by: erik.c.bjorge@intel.com

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

10 years agoArmPkg/CpuDxe: Exception Handling SP Adjust
Eugene Cohen [Tue, 10 Sep 2013 10:10:56 +0000 (10:10 +0000)]
ArmPkg/CpuDxe: Exception Handling SP Adjust

The exception handling support code appears to adjust the stack pointer in the wrong direction.
It decrements the stack pointer by 0x60, but this should be an increment (add) for the
downward-growing stack.

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

10 years agoThis patch uses dummy routine as NotifyFunction to make sure those 2 APIs provided...
Mars Lin [Thu, 5 Sep 2013 06:12:04 +0000 (06:12 +0000)]
This patch uses dummy routine as NotifyFunction to make sure those 2 APIs provided from library can create event as expected when the caller does not feed in a NotifyFunction. Also, typo is corrected.

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

10 years agoRefine the select language logic.
Eric Dong [Thu, 5 Sep 2013 05:39:57 +0000 (05:39 +0000)]
Refine the select language logic.

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

10 years agoRefine the select language logic.
Eric Dong [Thu, 5 Sep 2013 03:02:14 +0000 (03:02 +0000)]
Refine the select language logic.

Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Jaben Carsey <Jaben.carsey@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14629 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoArmPlatformPkg/patches: Updated BaseTools-Pending-Patches.patch
Olivier Martin [Wed, 4 Sep 2013 10:30:27 +0000 (10:30 +0000)]
ArmPlatformPkg/patches: Updated BaseTools-Pending-Patches.patch

This updated patch contains the patch:
- Fixed calculation of BaseOfCode in GenFw when the first code section is aligned:
    Fixes the calculation of the PE/COFF header attribute .BaseOfCode. when the first ..text. section is aligned.
    In the current code base, the alignment of the first code section is not taken into account for the calculation of BaseOfCode.

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

10 years agoArmPlatformPkg: Update AArch64 models to match the binaries generated by the AArch64...
Olivier Martin [Wed, 4 Sep 2013 09:38:53 +0000 (09:38 +0000)]
ArmPlatformPkg: Update AArch64 models to match the binaries generated by the AArch64 Linux kernel

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

10 years agoUpdate edksetup.bat to check VS2012
Liming Gao [Wed, 4 Sep 2013 07:41:04 +0000 (07:41 +0000)]
Update edksetup.bat to check VS2012

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

10 years agoEnable warningif opcode in browser.
Eric Dong [Wed, 4 Sep 2013 04:15:10 +0000 (04:15 +0000)]
Enable warningif opcode in browser.

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

10 years agoEnable warningif opcode in browser.
Eric Dong [Wed, 4 Sep 2013 04:13:48 +0000 (04:13 +0000)]
Enable warningif opcode in browser.

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

10 years agoFixed the issue in PeiCore on Load Module At Fixed Address logic
Liming Gao [Wed, 4 Sep 2013 02:20:25 +0000 (02:20 +0000)]
Fixed the issue in PeiCore on Load Module At Fixed Address logic

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

10 years agoShellBinPkg: Added Aarch64 Shell binaries
Olivier Martin [Tue, 3 Sep 2013 15:47:01 +0000 (15:47 +0000)]
ShellBinPkg: Added Aarch64 Shell binaries

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

10 years agoArmPkg/CpuPei: Remove unused functions from the driver
Roy Franz [Tue, 3 Sep 2013 10:14:02 +0000 (10:14 +0000)]
ArmPkg/CpuPei: Remove unused functions from the driver

The ConfigureMmu() function is unused - the only call to it
is commented out, and the functionality has been moved to
InitMmu() in MemoryInitPeiLib.c.
This change also removes the unused definitions from the file.

Change-Id: Ice795bfee25c403142d0c078533f8a46d04f82e9
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Roy Franz <roy.franz@linaro.org>
Signed-off-by:: Olivier Martin <olivier.martin@arm.com>

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

10 years agoEdkCompatibilityPkg: Fixed build for AArch64
Olivier Martin [Tue, 3 Sep 2013 08:52:49 +0000 (08:52 +0000)]
EdkCompatibilityPkg: Fixed build for AArch64

The architecture specific folders must be capitalized (first letter as
a capital letter and the remaining letters in lower case) (INF spec -
2.2.4 Naming Conventions).

The BaseTools only support this requirement for INF revision prior to
0x00010005 (mainly used by EdkCompatibilityPkg, EdkShellPkg, UEFI SCT).

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

10 years agoEnhance TPM driver to protect TPM physical presence flags.
Dong Guo [Tue, 3 Sep 2013 07:39:26 +0000 (07:39 +0000)]
Enhance TPM driver to protect TPM physical presence flags.

Signed-off-by: Dong Guo <guo.dong@intel.com>
Reviewed-by: Yao Jiewen <jiewen.yao@intel.com>
Reviewed-by: Ouyang, Qian <qian.ouyang@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14619 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoArmPkg/ArmDmaLib: Fixed the calculation of the Base Address of the Buffer
Olivier Martin [Mon, 2 Sep 2013 13:13:29 +0000 (13:13 +0000)]
ArmPkg/ArmDmaLib: Fixed the calculation of the Base Address of the Buffer

The former calculation 'ALIGN_VALUE(*DeviceAddress - BASE_4KB - 1,BASE_4KB)' did
not return the lowest aligned address.

Example:
*DeviceAddress = 0xB000C001;
*DeviceAddress - BASE_4KB - 1 = 0xB000B000;
Aligned value = 0xB000B000 + ((0x1000 - 0xB000B000)) & 0xFFF) = 0xB000B000
... while we where expected 0xB000C000.

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

10 years agoArmPkg/CpuDxe: Fixed calculation of the Page Table Index (Level 2 Descriptor)
Olivier Martin [Mon, 2 Sep 2013 13:12:17 +0000 (13:12 +0000)]
ArmPkg/CpuDxe: Fixed calculation of the Page Table Index (Level 2 Descriptor)

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

10 years agoArmPkg/ArmLib: Change comment to match code for setting of V bit in SCTLR register.
Roy Franz [Mon, 2 Sep 2013 09:10:17 +0000 (09:10 +0000)]
ArmPkg/ArmLib: Change comment to match code for setting of V bit in SCTLR register.

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

10 years agoAdd Memory fence for ARM Architecture (32 and 64 bit)
Olivier Martin [Mon, 2 Sep 2013 09:02:16 +0000 (09:02 +0000)]
Add Memory fence for ARM Architecture (32 and 64 bit)

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

10 years agoUpdate sample code for date/time.
Eric Dong [Mon, 2 Sep 2013 02:21:40 +0000 (02:21 +0000)]
Update sample code for date/time.

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

10 years agoOvmfPkg NvVarsFileLib: Set NvVars variable after writing vars file
Jordan Justen [Fri, 30 Aug 2013 19:29:09 +0000 (19:29 +0000)]
OvmfPkg NvVarsFileLib: Set NvVars variable after writing vars file

The volatile 'NvVars' variable indicates that the variables do
not need to be loaded from the file again. After we write the
variables out to the file, there is clearly no need to load
them back from the file.

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

10 years agoEmbeddedPkg/MmcDxe: Moved all the 'Print*()' functions to MmcDebug.c
Olivier Martin [Fri, 30 Aug 2013 11:51:51 +0000 (11:51 +0000)]
EmbeddedPkg/MmcDxe: Moved all the 'Print*()' functions to MmcDebug.c

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

10 years agoARM Package: Increase FV file size for some EDK2 firmware
Olivier Martin [Fri, 30 Aug 2013 11:50:36 +0000 (11:50 +0000)]
ARM Package: Increase FV file size for some EDK2 firmware

GCC47 generates bigger binaries in Debug build than GCC46.

This large increase is considered as a regression.
It will require some investigation to understand the reason
of this increase in size.

The size of the FV has been increased to allow developers to
build these images with the current BaseTools.

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

10 years agoMdePkg/AArch64: Fixed some definitions in ProcessorBind.h
Olivier Martin [Thu, 29 Aug 2013 09:00:13 +0000 (09:00 +0000)]
MdePkg/AArch64: Fixed some definitions in ProcessorBind.h

- Fixed INT8 declaration
- Introduced MAX_INTN/MAX_UINTN
- Force the MAX_* to be 'unsigned long long' numbers

Change-Id: I1ad818559d051df9a880aa8e4ac090e76fdb27e0
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14610 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoUpdate status code data structures according errata.
Shumin Qiu [Thu, 29 Aug 2013 05:37:52 +0000 (05:37 +0000)]
Update status code data structures according errata.

Signed-off-by: Shumin Qiu <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@14609 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoShellPkg: Fix LastError environment variable truncation
Robert Matthews [Wed, 28 Aug 2013 14:38:13 +0000 (14:38 +0000)]
ShellPkg: Fix LastError environment variable truncation

-Fixes LastError environment variable being truncated to 32 bits on 64 bit systems
-Fixes possible buffer overrun issue with LastError string value

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

10 years ago1. Change default PCD in SecurityPkg to 4 (DENY_EXECUTE) in DEC file.
Fu Siyuan [Wed, 28 Aug 2013 09:06:40 +0000 (09:06 +0000)]
1. Change default PCD in SecurityPkg to 4 (DENY_EXECUTE) in DEC file.
2. ASSERT if PCD value is set to 5 (QUERY_USER_ON_SECURITY_VIOLATION).
3. Update override PCD setting from 5 to 4 in platform DSC file.
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ni Ruiyu <ruiyu.ni@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14607 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoSCR_EL3 is the control register for setting the security state
Girish K S [Tue, 27 Aug 2013 09:17:20 +0000 (09:17 +0000)]
SCR_EL3 is the control register for setting the security state
modified the comment which can mislead.

The "ldr r0, [r1]" is overrided with a immediate "mov ro, #3"
instruction. This mov instruction will over write the contents
of the ro register. So replacing 'mov' by 'orr' instruction would
prevent to override the original value.

This patch assumes mov is the right instruction to be retained

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

10 years agoShellPkg: Fixed build errors related to variable declarations
Olivier Martin [Tue, 27 Aug 2013 09:01:54 +0000 (09:01 +0000)]
ShellPkg: Fixed build errors related to variable declarations

- variable "TempLocation" was set but never used

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

10 years agoRemoved the assumption on APIC timer initial Count is all 1s and updated it to handle...
Jeff Fan [Tue, 27 Aug 2013 07:29:45 +0000 (07:29 +0000)]
Removed the assumption on APIC timer initial Count is all 1s and updated it to handle the long delay that timer initial count.

Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14604 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoRemoved the assumption on APIC timer initial Count is all 1s and updated it to handle...
Jeff Fan [Tue, 27 Aug 2013 07:29:14 +0000 (07:29 +0000)]
Removed the assumption on APIC timer initial Count is all 1s and updated it to handle the long delay that timer initial count.

Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14603 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoMdeModulePkg/DiskIoDxe: fix source/destination pointer of overrun transfer
Laszlo Ersek [Mon, 26 Aug 2013 02:47:41 +0000 (02:47 +0000)]
MdeModulePkg/DiskIoDxe: fix source/destination pointer of overrun transfer

DiskIoCreateSubtaskList() may split the transfer into three segments:
- a leading segment, called underrun, which is the fractional, trailing
  subset of the first underlying block,
- a middle segment, which is an integral multiple of underlying blocks,
- a trailing segment, called overrun, which is the fractional, leading
  subset of the last underlying block.

This is an example read from the /EFI/BOOT/BOOTX64.EFI file, on the
RHEL-6.4 installation ISO (debug log enabled with EFI_D_BLKIO). The
underlying block size is 2048 bytes (IDE CD-ROM).

DiskIo: Create subtasks for task: Offset/BufferSize/Buffer = 0000000000004600/00002000/BD890018
  R:Lba/Offset/Length/WorkingBuffer/Buffer = 0000000000000008/00000600/00000200/BD90D000/BD890018
  R:Lba/Offset/Length/WorkingBuffer/Buffer = 000000000000000C/00000000/00000600/BD90D000/BD890218
  R:Lba/Offset/Length/WorkingBuffer/Buffer = 0000000000000009/00000000/00001800/00000000/BD890218

The first line corresponds to the underrun.
The second line corresponds to the overrun.
The third line corresponds to the middle segment.

In decimal:
- task: read 8192 bytes from offset 17920, storing it at BD890018
- underrun:
    - read block 8 [16384..18432) into the transfer area,
    - copy 512 bytes from offset 1536 of the transfer area to BD890018
      (target buffer offset 0, running total: 512)
- middle segment:
    - read blocks 9, 10, 11 [18432..24576) into the transfer area,
    - copy 6144 bytes from offset 0 of the transfer area to BD890218
      (target buffer offset 512, running total: 6656)
- overrun:
    - read block 12 [24576..26624) into the transfer area,
    - copy 1536 bytes from offset 0 of the transfer area to BD890218 (!!!)
      (target buffer offset 512 (!!!), running total 8192)

The values marked with (!!!) constitute the bug --
DiskIoCreateSubtaskList() doesn't take the size of the middle segment into
account when it calculates the destination (for reads) or source (for
writes) pointer for the overrun. This leads to data corruption.

When reading, data is copied form the transfer area to the target buffer
with

  CopyMem (Subtask->Buffer, Subtask->WorkingBuffer + Subtask->Offset, Subtask->Length);

calls in DiskIo2OnReadWriteComplete() for nonblocking reads, and in
DiskIo2ReadWriteDisk() for blocking reads. Therefore it's enough to adjust
Subtask->Buffer when it is initialized. (See BD891A18 below.)

DiskIo: Create subtasks for task: Offset/BufferSize/Buffer = 0000000000004600/00002000/BD890018
  R:Lba/Offset/Length/WorkingBuffer/Buffer = 0000000000000008/00000600/00000200/BD90D000/BD890018
  R:Lba/Offset/Length/WorkingBuffer/Buffer = 000000000000000C/00000000/00000600/BD90D000/BD891A18
  R:Lba/Offset/Length/WorkingBuffer/Buffer = 0000000000000009/00000000/00001800/00000000/BD890218

The patched call to DiskIoCreateSubtask() is also executed for write
requests. The changed Subtask->Buffer initialization fixes the "overrun
half writes" in DiskIo2ReadWriteDisk() too:

  //
  // A sub task before this one should be a block read operation, causing
  // the WorkingBuffer filled with the entire one block data.
  //
  CopyMem (Subtask->WorkingBuffer + Subtask->Offset, Subtask->Buffer, Subtask->Length);

This code doubles for underrun and overrun half-writes. The patch doesn't
modify the underrun case.

If we're storing the overrun at the beginning of the pre-read last block
(which we're going to write out as a full block), then
- Subtask->Offset == 0,
- Subtask->Length == OverRun,
- the first byte *not* accessed in the source area is
  ((Buffer + UnderRunLength) + BufferSize) + OverRun.

Contributed-under: TianoCore Contribution Agreement 1.0

Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14602 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoOvmfPkg: Virtio: load used ring element strictly after loading used index
Laszlo Ersek [Fri, 23 Aug 2013 18:46:03 +0000 (18:46 +0000)]
OvmfPkg: Virtio: load used ring element strictly after loading used index

Enforce in-order execution of these steps even on not sequentially
consistent architectures, as discussed in [1]. These changes should be
unnecessary on x86 (the only architecture OVMF currently supports), but
they align the OVMF virtio code with the virtio specification and could be
necessary for future OVMF ports.

[1] http://lists.linuxfoundation.org/pipermail/virtualization/2013-June/024547.html

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

10 years agoOvmfPkg: Build and use the UEFI shell by default
Jordan Justen [Fri, 23 Aug 2013 18:45:47 +0000 (18:45 +0000)]
OvmfPkg: Build and use the UEFI shell by default

Previously OVMF included the older EFI shell binary when building.

Now we will build and use the UEFI shell (ShellPkg) instead.

v2:
 * Don't bother building UEFI shell when USE_OLD_SHELL is defined
 * Fix errors in OvmfPkgIa32X64.fdf

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

10 years agoEmbeddedPkg/EmbeddedPkg.dsc: Fixed PCD settings
Olivier Martin [Fri, 23 Aug 2013 18:21:46 +0000 (18:21 +0000)]
EmbeddedPkg/EmbeddedPkg.dsc: Fixed PCD settings

Invalid PCD syntax.

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

10 years agoShellPkg: Fix potentially uninitialized variable compiler warning
Jaben Carsey [Fri, 23 Aug 2013 15:21:16 +0000 (15:21 +0000)]
ShellPkg: Fix potentially uninitialized variable compiler warning

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

10 years agoUpdate SetVariable() function description for the clarification of requirements...
Shumin Qiu [Fri, 23 Aug 2013 08:37:31 +0000 (08:37 +0000)]
Update SetVariable() function description  for the clarification of requirements to update timestamp associated with authenticated variable.

Signed-off-by: Shumin Qiu <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@14597 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoFix the typo in the description of EFI_PLATFORM_TO_DRIVER_CONFIGURATION_QUERY.
Shumin Qiu [Fri, 23 Aug 2013 08:31:11 +0000 (08:31 +0000)]
Fix the typo in the description of EFI_PLATFORM_TO_DRIVER_CONFIGURATION_QUERY.

Signed-off-by: Shumin Qiu <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@14596 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoAdd new driver diagnostic type (EfiDriverDiagnosticTypeCancel) to follow UEFI Spec...
Ruiyu Ni [Fri, 23 Aug 2013 07:41:57 +0000 (07:41 +0000)]
Add new driver diagnostic type (EfiDriverDiagnosticTypeCancel) to follow UEFI Spec 2.4.

Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14595 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoAdd some comments, clear describe the efi varstore type.
Eric Dong [Fri, 23 Aug 2013 05:54:33 +0000 (05:54 +0000)]
Add some comments, clear describe the efi varstore type.

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

10 years agoUpdate comments for HiiConfigRoutine->ExtractConfig function, also update HiiConfigRo...
Eric Dong [Fri, 23 Aug 2013 05:53:04 +0000 (05:53 +0000)]
Update comments for HiiConfigRoutine->ExtractConfig function, also update HiiConfigRoutine->ConfigToBlock/BlockToConfig to follow this new spec.

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

10 years agoUpdate comments to follow new spec definition.
Eric Dong [Fri, 23 Aug 2013 05:49:50 +0000 (05:49 +0000)]
Update comments to follow new spec definition.

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

10 years agoSync BaseTool trunk (version r2599) into EDKII BaseTools.
Liming Gao [Fri, 23 Aug 2013 02:18:16 +0000 (02:18 +0000)]
Sync BaseTool trunk (version r2599) into EDKII BaseTools.

Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Heshen Chen <chen.heshen@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14591 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoFix a bug in secure boot configuration driver: Enroll DB/KEK will disable Attempt...
Fu Siyuan [Thu, 22 Aug 2013 09:46:03 +0000 (09:46 +0000)]
Fix a bug in secure boot configuration driver: Enroll DB/KEK will disable Attempt Secure Boot option.
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14590 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoFix DuetPkg build failure after adding the new reset type EfiResetPlatformSpecific.
Ruiyu Ni [Thu, 22 Aug 2013 05:55:29 +0000 (05:55 +0000)]
Fix DuetPkg build failure after adding the new reset type EfiResetPlatformSpecific.

Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14589 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoDo not lock the volume when the volume maps to a file instead of a physical disk.
Ruiyu Ni [Thu, 22 Aug 2013 05:44:23 +0000 (05:44 +0000)]
Do not lock the volume when the volume maps to a file instead of a physical disk.
Otherwise WriteBlocks() on the volume which maps to a file will fail.

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

10 years agoFix DDK3790 build failure.
Ruiyu Ni [Thu, 22 Aug 2013 05:15:05 +0000 (05:15 +0000)]
Fix DDK3790 build failure.

Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14587 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoUpdate firmware management protocol definition to expose the lowest supported firmwar...
Shumin Qiu [Thu, 22 Aug 2013 01:01:27 +0000 (01:01 +0000)]
Update firmware management protocol definition to expose the lowest supported firmware version.

Signed-off-by: Shumin Qiu <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@14586 6f19259b-4bc3-4df7-8a09-765794883524

10 years agoShellPkg: update behavior with undefined environment variables
Jaben Carsey [Wed, 21 Aug 2013 18:11:23 +0000 (18:11 +0000)]
ShellPkg: update behavior with undefined environment variables

Undefined environment variables are now removed during script execution.
Excepted environment variables are now correctly un-excepted right before processing continues

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <Jaben.carsey@intel.com>
reviewed-by: Matthews, Robert <Robert.Matthews@hp.com>

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

10 years agoShellPkg: Fix file size error upon copy operation.
Jaben Carsey [Wed, 21 Aug 2013 17:32:16 +0000 (17:32 +0000)]
ShellPkg: Fix file size error upon copy operation.

There was a case where an copy operation of a small file overwriting a larger file would not correctly remove the extra space in the old file.  The resultant file would have the entire source file and then what remained of the original file.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <Jaben.carsey@intel.com>
reviewed-by: El-Haj-Mahmoud, Samer <samer.el-haj-mahmoud@hp.com>

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

10 years agoArmPlatformPkg/ArmVExpressPkg: Added 'EfiResetPlatformSpecific' to ResetSystemLib
Olivier Martin [Wed, 21 Aug 2013 14:45:02 +0000 (14:45 +0000)]
ArmPlatformPkg/ArmVExpressPkg: Added 'EfiResetPlatformSpecific' to ResetSystemLib

This value was missing from the switch on 'ResetType'.

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

10 years agoArmPkg/ArmGicLib.h: Added macro to retrieve the information from the ICCIDR
Olivier Martin [Wed, 21 Aug 2013 12:08:06 +0000 (12:08 +0000)]
ArmPkg/ArmGicLib.h: Added macro to retrieve the information from the ICCIDR

These macros are helper functions to get the information from the GIC CPU
Interface Identification register.

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

10 years agoArmPlatformPkg/Sec: Removed SetupExceptionLevel3()
Olivier Martin [Wed, 21 Aug 2013 12:07:01 +0000 (12:07 +0000)]
ArmPlatformPkg/Sec: Removed SetupExceptionLevel3()

This function only does the GIC initialization that is always taken care by Sec.c.

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

10 years agoArmPlatformPkg/Sec: Remove SCR and CPTR initialization from SetupExceptionLevel3
Olivier Martin [Wed, 21 Aug 2013 12:05:44 +0000 (12:05 +0000)]
ArmPlatformPkg/Sec: Remove SCR and CPTR initialization from SetupExceptionLevel3

This is already taken care by Sec when PcdTrustzoneSupport = TRUE.

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