]> git.proxmox.com Git - mirror_edk2.git/log
mirror_edk2.git
9 years agoMdeModulePkg SmmLockBoxSmmLib: Add debug message for the address of lockbox(smm)...
Star Zeng [Wed, 2 Jul 2014 02:29:02 +0000 (02:29 +0000)]
MdeModulePkg SmmLockBoxSmmLib: Add debug message for the address of lockbox(smm) copy.

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

9 years agoArmPkg/BdsLib: Prevent memory leak whith TFTP
Olivier Martin [Tue, 1 Jul 2014 09:27:19 +0000 (09:27 +0000)]
ArmPkg/BdsLib: Prevent memory leak whith TFTP

In some case, the size of the downloaded TFTP image cannot be known.
An arbitrary larger buffer is allocated to receive the image.
We need to make sure when we free the buffer we free the size
of the allocated buffer and not the size of the actual 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@15609 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoArmPkg/ArmCacheMaintenanceLib: Fixed comment (and coding style)
Olivier Martin [Tue, 1 Jul 2014 09:26:28 +0000 (09:26 +0000)]
ArmPkg/ArmCacheMaintenanceLib: Fixed comment (and coding style)

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

9 years agoEmbeddedPkg/SerialDxe: Fixed the mixture of RETURN_STATUS and EFI_STATUS
Olivier Martin [Tue, 1 Jul 2014 09:25:30 +0000 (09:25 +0000)]
EmbeddedPkg/SerialDxe: Fixed the mixture of RETURN_STATUS and EFI_STATUS

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

9 years agoArmPkg/CpuDxe/ArmV6: Return error status when ExceptionHandlersStart is not 32-byte...
Olivier Martin [Tue, 1 Jul 2014 09:24:07 +0000 (09:24 +0000)]
ArmPkg/CpuDxe/ArmV6: Return error status when ExceptionHandlersStart is not 32-byte aligned

The function should detect and return the error in non-debug builds when the ASSERT does nothing.

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

9 years agoSync BaseTool trunk (version r2670) into EDKII BaseTools.
Gao, Liming [Tue, 1 Jul 2014 07:10:10 +0000 (07:10 +0000)]
Sync BaseTool trunk (version r2670) into EDKII BaseTools.

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

9 years agoShellPkg: Fix Ctrl+C support for dmpstore command.
Tapan Shah [Mon, 30 Jun 2014 20:14:24 +0000 (20:14 +0000)]
ShellPkg: Fix Ctrl+C support for dmpstore 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@15604 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoFix a bug in IP4 driver when computing the network broadcast adress.
Fu, Siyuan [Mon, 30 Jun 2014 07:48:23 +0000 (07:48 +0000)]
Fix a bug in IP4 driver when computing the network broadcast adress.
Contributed-under: TianoCore Contribution Agreement 1.0
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>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15603 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoFix the potential address overflow issue when checking PE signature.
Jeff Fan [Mon, 30 Jun 2014 06:13:53 +0000 (06:13 +0000)]
Fix the potential address overflow issue when checking PE signature.

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

9 years agoOvmfPkg/QemuFlashFvbServicesRuntimeDxe: Fix GCC44 build failure.
Gao, Liming [Fri, 27 Jun 2014 19:15:35 +0000 (19:15 +0000)]
OvmfPkg/QemuFlashFvbServicesRuntimeDxe: Fix GCC44 build failure.

Initialize the input parameter FwhInstance in function GetFvbInstance().

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

9 years agoMdeModulePkg/PiSmmCore: Initialize missing LoadedImage protocol fields for SMM driver.
Tapan Shah [Fri, 27 Jun 2014 08:50:27 +0000 (08:50 +0000)]
MdeModulePkg/PiSmmCore: Initialize missing LoadedImage protocol fields for SMM driver.

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

9 years agoEmulatorPkg/CpuRuntimeDxe: Fix typos in MpService
Chen Fan [Fri, 27 Jun 2014 07:30:21 +0000 (07:30 +0000)]
EmulatorPkg/CpuRuntimeDxe: Fix typos in MpService

mMpSercicesTemplate => mMpServicesTemplate

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

9 years agoRefine code to make it more safely.
Eric Dong [Thu, 26 Jun 2014 03:24:25 +0000 (03:24 +0000)]
Refine code to make it more safely.

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

9 years agoRefine code to make it more safely.
Eric Dong [Thu, 26 Jun 2014 03:18:44 +0000 (03:18 +0000)]
Refine code to make it more safely.

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

9 years agoRefine code to make it more safely.
Eric Dong [Thu, 26 Jun 2014 03:17:59 +0000 (03:17 +0000)]
Refine code to make it more safely.

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

9 years agoRefine code to make it more safely.
Eric Dong [Thu, 26 Jun 2014 03:16:27 +0000 (03:16 +0000)]
Refine code to make it more safely.

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

9 years agoRefine code to make it more safely.
Eric Dong [Thu, 26 Jun 2014 01:39:25 +0000 (01:39 +0000)]
Refine code to make it more safely.

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

9 years agoRefine code to make it more safely.
Eric Dong [Thu, 26 Jun 2014 01:38:46 +0000 (01:38 +0000)]
Refine code to make it more safely.

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

9 years agoRefine code to make it more safely.
Eric Dong [Wed, 25 Jun 2014 06:51:36 +0000 (06:51 +0000)]
Refine code to make it more safely.

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

9 years agoRefine code to make it more safely.
Eric Dong [Wed, 25 Jun 2014 06:49:53 +0000 (06:49 +0000)]
Refine code to make it more safely.

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

9 years agoRefine code to make it more safely.
Eric Dong [Wed, 25 Jun 2014 06:00:49 +0000 (06:00 +0000)]
Refine code to make it more safely.

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

9 years agoRefine code to make it more safely.
Eric Dong [Wed, 25 Jun 2014 05:44:37 +0000 (05:44 +0000)]
Refine code to make it more safely.

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

9 years agoRefine code to make it more safely.
Eric Dong [Wed, 25 Jun 2014 05:16:52 +0000 (05:16 +0000)]
Refine code to make it more safely.

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

9 years agoMdeModulePkg/DxeMain: Zero ImageContext local variable before passing it down to...
Andrew Fish [Wed, 25 Jun 2014 04:54:47 +0000 (04:54 +0000)]
MdeModulePkg/DxeMain: Zero ImageContext local variable before passing it down to PeCoffLoaderRelocateImageExtraAction()

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Andrew Fish <afish@apple.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15587 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoOvmfPkg: add missing braces to aggregate and/or union initializers
Laszlo Ersek [Wed, 25 Jun 2014 03:35:58 +0000 (03:35 +0000)]
OvmfPkg: add missing braces to aggregate and/or union initializers

Lack of these braces causes build errors when -Wno-missing-braces is
absent. Spelling out more braces also helps understanding the code.

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

9 years agoUpdate code to always publish EFI_IMAGE_EXECUTION_INFO_TABLE.
Dong, Guo [Wed, 25 Jun 2014 02:02:22 +0000 (02:02 +0000)]
Update code to always publish EFI_IMAGE_EXECUTION_INFO_TABLE.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dong, Guo <guo.dong@intel.com>
Reviewed-by: Fu, Siyuan <siyuan.fu@intel.com>
Reviewed-by: Gao, Liming <liming.gao@intel.com>
Reviewed-by: Zhang, Chao B <chao.b.zhang@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15585 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoShellPkg: Fix 'mv' command to not attempt moving a file from write-protected media
Chris Phillips [Tue, 24 Jun 2014 18:39:15 +0000 (18:39 +0000)]
ShellPkg: Fix 'mv' command to not attempt moving a file from write-protected media

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

9 years agoAdd DEBUG message for all fields in AcpiS3Context.
Gao, Liming [Tue, 24 Jun 2014 02:25:23 +0000 (02:25 +0000)]
Add DEBUG message for all fields in AcpiS3Context.

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

9 years agoAdd DEBUG message for all fields in AcpiS3Context.
Gao, Liming [Tue, 24 Jun 2014 02:24:13 +0000 (02:24 +0000)]
Add DEBUG message for all fields in AcpiS3Context.

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

9 years agoCorrect comment typo in AsmReadCr0() function.
Gao, Liming [Tue, 24 Jun 2014 02:22:47 +0000 (02:22 +0000)]
Correct comment typo in AsmReadCr0() function.

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

9 years agoShellPkg: Move UpdateMapping() out of Map command and added to UefiShellCommandLib...
Tapan Shah [Mon, 23 Jun 2014 18:36:44 +0000 (18:36 +0000)]
ShellPkg: Move UpdateMapping() out of Map command and added to UefiShellCommandLib library.

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

9 years agoARM Packages: Fixed missing braces (the warning was disabled by GCC)
Olivier Martin [Fri, 20 Jun 2014 18:24:51 +0000 (18:24 +0000)]
ARM Packages: Fixed missing braces (the warning was disabled by GCC)

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

9 years agoArmPlatformPkg/SP804TimerLib: Checked both Metronome and Performance timers are initi...
Olivier Martin [Fri, 20 Jun 2014 18:23:37 +0000 (18:23 +0000)]
ArmPlatformPkg/SP804TimerLib: Checked both Metronome and Performance timers are initialized

Prior to this change if Metronome timer was already initialized the initialization of the
Performance timer was skipped.

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

9 years agoPcAtChipsetPkg: Enable timer interrupt through I/O APIC
Tycho Nightingale [Fri, 20 Jun 2014 07:18:08 +0000 (07:18 +0000)]
PcAtChipsetPkg: Enable timer interrupt through I/O APIC

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Tycho Nightingale <tycho.nightingale@pluribusnetworks.com>
Reviewed-by: Elvin Li <elvin.li@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15576 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoDo not create boot option for logical block io device.
Ruiyu Ni [Fri, 20 Jun 2014 06:17:54 +0000 (06:17 +0000)]
Do not create boot option for logical block io device.

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

9 years agoOvmfPkg: AcpiPlatformDxe: don't rely on unstable QEMU interface
Laszlo Ersek [Thu, 19 Jun 2014 06:13:29 +0000 (06:13 +0000)]
OvmfPkg: AcpiPlatformDxe: don't rely on unstable QEMU interface

The fw_cfg file "etc/acpi/tables" is not a stable guest interface -- QEMU
could rename it in the future, and/or introduce additional fw_cfg files
with ACPI payload. Only the higher-level "etc/table-loader" file is
considered stable, which contains a sequence of commands to assist
firmware with reading QEMU ACPI tables from the FwCfg interface.

Because edk2 provides publishing support for ACPI tables, OVMF only uses
the Allocate command to find the names of FwCfg files to read and publish
as ACPI tables.

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

9 years agoOvmfPkg: AcpiPlatformDxe: exclude RSD PTR from QEMU's fw_cfg payload
Laszlo Ersek [Thu, 19 Jun 2014 06:13:22 +0000 (06:13 +0000)]
OvmfPkg: AcpiPlatformDxe: exclude RSD PTR from QEMU's fw_cfg payload

In one of the next patches we'll start scanning all fw_cfg files that QEMU
advertises as carrying ACPI tables, not just "etc/acpi/tables".

The RSD PTR table is known to occur in the "etc/acpi/rsdp" fw_cfg file.
Since edk2 handles RSD PTR automatically, similarly to RSDT and XSDT,
let's exclude RSD PTR too from the manually installed tables.

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

9 years agoOvmfPkg: AcpiPlatformDxe: pass FwCfgFile to InstallQemuLinkedTables()
Laszlo Ersek [Thu, 19 Jun 2014 06:13:12 +0000 (06:13 +0000)]
OvmfPkg: AcpiPlatformDxe: pass FwCfgFile to InstallQemuLinkedTables()

Split InstallQemuLinkedTables() in two:
- the function now takes the name of the fw_cfg file (from which ACPI
  tables are to be extracted) as a parameter,

- the new function InstallAllQemuLinkedTables() calls the former with
  fw_cfg file names, and cumulatively tracks the ACPI tables installed by
  all invocations of the former.

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

9 years agoOvmgPkg: QemuFwCfgLib: export QEMU_FW_CFG_FNAME_SIZE
Laszlo Ersek [Thu, 19 Jun 2014 06:13:01 +0000 (06:13 +0000)]
OvmgPkg: QemuFwCfgLib: export QEMU_FW_CFG_FNAME_SIZE

Names of firmware configuration files always take 56 bytes (including at
least one terminating NUL byte). Expose this constant to all consumers of
QemuFwCfgLib because further interfaces may depend on it.

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

9 years agoFix GCC build fail.
Eric Dong [Thu, 19 Jun 2014 01:58:09 +0000 (01:58 +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@15570 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoThe following call tree exposes a bug in the lifetime (ie. too late
Alex Williamson [Thu, 19 Jun 2014 01:41:15 +0000 (01:41 +0000)]
The following call tree exposes a bug in the lifetime (ie. too late
creation) of PciIoDevice->DevicePath. The bug can be triggered when
PciBusDxe is built into OVMF, with qemu/KVM device assignment of
a PCI-express device on the default 440FX machine type.  OVMF
correctly discovers that the device is PCIe and begins probing
extended configuration space for the device.  The root bridge
has no way to access extended config space and correctly errors,
sending us into the error reporting chain seen below.  It's
possible that this error path could also be reproduced on physical
hardware when a PCI-to-PCIe bridge is present.

GatherDeviceInfo() | GatherPpbInfo() | GatherP2CInfo() [MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c]
  CreatePciIoDevice()                                  [MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c]
    AllocateZeroPool()
    LocateCapabilityRegBlock()                         [MdeModulePkg/Bus/Pci/PciBusDxe/PciCommand.c]
    PciIoDevice->IsPciExp = TRUE
    LocatePciExpressCapabilityRegBlock()               [MdeModulePkg/Bus/Pci/PciBusDxe/PciCommand.c]
      PciIoConfigRead() via funcptr                    [MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c]
        RootBridgeIoPciRead() via funcptr              [PcAtChipsetPkg/PciHostBridgeDxe/PciRootBridgeIo.c]
          FAILS
        REPORT_STATUS_CODE_WITH_DEVICE_PATH()          [MdePkg/Include/Library/ReportStatusCodeLib.h]
          ReportStatusCodeWithDevicePath()             [MdeModulePkg/Library/DxeReportStatusCodeLib/ReportStatusCodeLib.c]
            ASSERT (DevicePath != NULL) <--+
  CreatePciDevicePath()                    |           [MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c]
    sets PciIoDevice->DevicePath ----------+

In English:
- CreatePciIoDevice() allocates a zeroed out PCI_IO_DEVICE structure.
- PciIoConfigRead() tries to access the (extended) config space, and
  fails.
- PciIoConfigRead() wants to report a status code (read error) for the
  device path.
- Unfortuantely, PciIoDevice->DevicePath is still NULL at that point.
- The ASSERT() in ReportStatusCodeWithDevicePath() fires.

Fix it by moving CreatePciDevicePath() into CreatePciIoDevice(),
allowing PciIoDevice->DevicePath to be initialized before we
begin probing the device capabilities:

GatherDeviceInfo() | GatherPpbInfo() | GatherP2CInfo() [MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c]
  CreatePciIoDevice()                                  [MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c]
    AllocateZeroPool()
    CreatePciDevicePath()                              [MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c]
      sets PciIoDevice->DevicePath -----------+
    LocateCapabilityRegBlock()                |        [MdeModulePkg/Bus/Pci/PciBusDxe/PciCommand.c]
    PciIoDevice->IsPciExp = TRUE              |
    LocatePciExpressCapabilityRegBlock()      |        [MdeModulePkg/Bus/Pci/PciBusDxe/PciCommand.c]
      PciIoConfigRead() via funcptr           |        [MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c]
        RootBridgeIoPciRead() via funcptr     |        [PcAtChipsetPkg/PciHostBridgeDxe/PciRootBridgeIo.c]
          FAILS                               |
        REPORT_STATUS_CODE_WITH_DEVICE_PATH() |        [MdePkg/Include/Library/ReportStatusCodeLib.h]
          ReportStatusCodeWithDevicePath()    |        [MdeModulePkg/Library/DxeReportStatusCodeLib/ReportStatusCodeLib.c]
            ASSERT (DevicePath != NULL) <-----+

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

9 years agoShellPkg: Remove use of ASSERT to test parameters
Jaben Carsey [Wed, 18 Jun 2014 16:37:16 +0000 (16:37 +0000)]
ShellPkg: Remove use of ASSERT to test parameters

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

9 years agoContributed-under: TianoCore Contribution Agreement 1.0
Victor Gouveia [Wed, 18 Jun 2014 09:01:33 +0000 (09:01 +0000)]
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Victor Gouveia <vc.gouveia@gmail.com>
Reviewed-by: Gao, Liming <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15565 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoCreate boot option for all block IO devices no matter what the device path looks...
Ruiyu Ni [Wed, 18 Jun 2014 05:00:13 +0000 (05:00 +0000)]
Create boot option for all block IO devices no matter what the device path looks like.

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

9 years agoSupport RouteConfig function for BdsDxe driver.
Eric Dong [Wed, 18 Jun 2014 02:19:50 +0000 (02:19 +0000)]
Support RouteConfig function for BdsDxe driver.

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

9 years agoShellPkg: Fix duplicate String IDs
Jaben Carsey [Mon, 16 Jun 2014 21:58:50 +0000 (21:58 +0000)]
ShellPkg: Fix duplicate String IDs

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

9 years agoFix build issues with Xcode in CryptoPkg and SecurityPkg.
Andrew Fish [Mon, 16 Jun 2014 08:31:41 +0000 (08:31 +0000)]
Fix build issues with Xcode in CryptoPkg and SecurityPkg.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Andrew Fish <afish@apple.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Long Qin <qin.long@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15561 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoFix build issues with Xcode in CryptoPkg and SecurityPkg.
Andrew Fish [Mon, 16 Jun 2014 08:30:41 +0000 (08:30 +0000)]
Fix build issues with Xcode in CryptoPkg and SecurityPkg.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Andrew Fish <afish@apple.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Long Qin <qin.long@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15560 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoUse a compare operator for Non-Boolean comparison in 'map.c'.
Qiu Shumin [Fri, 6 Jun 2014 08:47:18 +0000 (08:47 +0000)]
Use a compare operator for Non-Boolean comparison in 'map.c'.

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

9 years agoShellPkg: fix Comp command output
Jaben Carsey [Thu, 5 Jun 2014 22:02:12 +0000 (22:02 +0000)]
ShellPkg: fix Comp command output

The comp command was potentially displaying the incorrect offset into the file due to comparing 3 extra bytes for difference groups.

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

9 years agoMdeModulePkg/NvmExpressDxe: Check if CSTS.RDY is 0 to wait NVMe Host controller disable
Tian, Feng [Wed, 4 Jun 2014 06:35:29 +0000 (06:35 +0000)]
MdeModulePkg/NvmExpressDxe: Check if CSTS.RDY is 0 to wait NVMe Host controller disable

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

9 years agoRename TimeoutInSeconds to Timeout to avoid confusion.
Jeff Fan [Wed, 4 Jun 2014 01:47:24 +0000 (01:47 +0000)]
Rename TimeoutInSeconds to Timeout to avoid confusion.

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

9 years agoArmPlatformPkg/ArmVExpressPkg: Set CNTFRQ to 100Mhz for the Fast Models
Olivier Martin [Tue, 3 Jun 2014 16:44:09 +0000 (16:44 +0000)]
ArmPlatformPkg/ArmVExpressPkg: Set CNTFRQ to 100Mhz for the Fast Models

The timer frequency for the FVP Architectural Timers have been aligned to 100Mhz.

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

9 years agoArmPkg/AsmMacroIoLib: Add support for ARM Compiler 6.00
Olivier Martin [Tue, 3 Jun 2014 16:43:26 +0000 (16:43 +0000)]
ArmPkg/AsmMacroIoLib: Add support for ARM Compiler 6.00

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

9 years agoArmPkg/CpuDxe: Stack Pointer is not 8-bytes aligned in AArch32 interrupt handling
Olivier Martin [Tue, 3 Jun 2014 16:42:18 +0000 (16:42 +0000)]
ArmPkg/CpuDxe: Stack Pointer is not 8-bytes aligned in AArch32 interrupt handling

See section "2.1 The need to align SP to a multiple of 8 at conforming call sites" in
"Advisory Note. SP must be 8-byte aligned on entry to AAPCS-conforming functions"
Source: http://infocenter.arm.com/help/topic/com.arm.doc.ihi0046b/IHI0046B_ABI_Advisory_1.pdf

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

9 years agoArmPkg: Added new ARM Processor Feature Register definitions
Olivier Martin [Tue, 3 Jun 2014 16:39:23 +0000 (16:39 +0000)]
ArmPkg: Added new ARM Processor Feature Register definitions

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

9 years agoArmPkg/ArmLib: Drain Write Buffer before DCache maintenance operations.
Olivier Martin [Tue, 3 Jun 2014 16:37:29 +0000 (16:37 +0000)]
ArmPkg/ArmLib: Drain Write Buffer before DCache maintenance operations.

Cache maintenance operations by Set/Way require that the Write Buffer
be drained before the cache is flushed.  Without that, the flush can
miss the most recent values written as they are still "pipelined".
That has unfortunate consequences, especially where code is being
copied to RAM.
The fix is to add DSB instructions before the affected operations.

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

9 years agoArmPlatformPkg/Ds5: Added script to profile EDK2 with ARM DSTREAM
Olivier Martin [Tue, 3 Jun 2014 16:35:32 +0000 (16:35 +0000)]
ArmPlatformPkg/Ds5: Added script to profile EDK2 with ARM DSTREAM

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

9 years agoArmPkg/DefaultExceptionHandlerLib/Aarch64: Added friendly debug message
Olivier Martin [Tue, 3 Jun 2014 16:34:17 +0000 (16:34 +0000)]
ArmPkg/DefaultExceptionHandlerLib/Aarch64: Added friendly debug message

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

9 years agoShellPkg: fix display for map command with filtering
Jaben Carsey [Wed, 28 May 2014 17:31:22 +0000 (17:31 +0000)]
ShellPkg: fix display for map command with filtering

This patch correctly displays map information when a filter was applied such as “map fs*” or “map f*”, including the use of “-c” to display the consist names first in this situation.

It also moves a statement from both clauses of an “if/else” to above the “if” statement for efficiency.

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

9 years agoShellPkg: replace unrecognized Environment Variables with empty quotes so commands...
Jaben Carsey [Thu, 22 May 2014 22:06:41 +0000 (22:06 +0000)]
ShellPkg: replace unrecognized Environment Variables with empty quotes so commands or applications know something existed.

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

9 years agoUpdate the comments for function 'InternalShellExecuteDevicePath' in ShellProtocol...
Qiu Shumin [Thu, 22 May 2014 08:32:50 +0000 (08:32 +0000)]
Update the comments for function 'InternalShellExecuteDevicePath' in ShellProtocol.c to make it consistent with parameter names.

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

9 years agoRemove the RT attribute for HDDP variable and validate the variable content before...
Ruiyu Ni [Thu, 22 May 2014 07:38:40 +0000 (07:38 +0000)]
Remove the RT attribute for HDDP variable and validate the variable content before using it.

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

9 years agoRemove the assertion which may cause IsDevicePathValid() hang in DEBUG build.
Ruiyu Ni [Thu, 22 May 2014 07:34:35 +0000 (07:34 +0000)]
Remove the assertion which may cause IsDevicePathValid() hang in DEBUG build.

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

9 years agoAdd 'file not found' debug message to MTFTP.
Brendan Jackman [Wed, 21 May 2014 05:59:47 +0000 (05:59 +0000)]
Add 'file not found' debug message to MTFTP.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Brendan Jackman <Brendan.JackMan@arm.com>
Reviewed-By: Olivier Martin <olivier.martin@arm.com>
Reviewed-by: Fu, Siyuan <siyuan.fu@intel.com>
Reviewed-by: Wu, Jiaxin <jiaxin.wu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15543 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoOvmfPkg/SMBIOS: Add QEMU support to OVMF SMBIOS driver
Gabriel Somlo [Tue, 20 May 2014 16:33:19 +0000 (16:33 +0000)]
OvmfPkg/SMBIOS: Add QEMU support to OVMF SMBIOS driver

Locate QEMU SMBIOS data in fw_cfg and install it via the
SMBIOS protocol.

Starting with qemu-2.1, on pc/x86 machines of type >= 2.1, full
SMBIOS tables are generated and inserted into fw_cfg (i.e., no
per-field patching of locally generated structures is required).

Aside from new code to extract a SMBIOS blob from fw_cfg, this
patch utilizes the pre-existing infrastructure (already used by
Xen) to handle final SMBIOS table creation.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gabriel Somlo <somlo@cmu.edu>
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@15542 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoOvmfPkg/SMBIOS: Reuse handles supplied by underlying VM
Gabriel Somlo [Tue, 20 May 2014 16:33:11 +0000 (16:33 +0000)]
OvmfPkg/SMBIOS: Reuse handles supplied by underlying VM

The SMBIOS specification requires some structure types to
contain reference fields to other structures' handles. When
InstallAllStructures() rebuilds the SMBIOS tables by traversing
an existing source table, the use of SMBIOS_HANDLE_PI_RESERVED
causes automatically generated, arbitrary handle numbers to be
assigned to each cloned structure. This causes all reference
handle fields to become invalid.

This patch modifies InstallAllStructures() to reuse the original
handle numbers supplied by the underlying VM, preserving the
correctness of any included handle references.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gabriel Somlo <somlo@cmu.edu>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Tested-by: Anthony PERARD <anthony.perard@citrix.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15541 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoOvmfPkg: QemuVideoDxe: Int10h stub for Windows 7 & 2008 (stdvga, QXL)
Laszlo Ersek [Tue, 20 May 2014 16:33:00 +0000 (16:33 +0000)]
OvmfPkg: QemuVideoDxe: Int10h stub for Windows 7 & 2008 (stdvga, QXL)

The Windows 2008 R2 SP1 (and Windows 7) UEFI guest's default video driver
dereferences the real mode Int10h vector, loads the pointed-to handler
code, and executes what it thinks to be VGA BIOS services in an internal
real-mode emulator. Consequently, video mode switching doesn't work in
Windows 2008 R2 SP1 when it runs on the pure UEFI build of OVMF, making
the guest uninstallable.

This patch adds a VGABIOS "shim" to QemuVideoDxe. For the first stdvga or
QXL card bound, an extremely stripped down VGABIOS imitation is installed
in the C segment. It provides a real implementation for the few services
that are in fact necessary for the win2k8r2sp1 UEFI guest, plus some fakes
that the guest invokes but whose effect is not important.

The C segment is not present in the UEFI memory map prepared by OVMF. We
never add memory space that would cover it (either in PEI, in the form of
memory resource descriptor HOBs, or in DXE, via gDS->AddMemorySpace()).
This way the handler body is invisible to all non-buggy UEFI guests, and
the rest of edk2.

The Int10h real-mode IVT entry is covered with a Boot Services Code page,
making that too unaccessible to the rest of edk2. (Thus UEFI guest OSes
different from the Windows 2008 family can reclaim the page. The Windows
2008 family accesses the page at zero regardless of the allocation type.)

The patch is the result of collaboration:

Initial proof of concept IVT entry installation and handler skeleton (in
NASM) by Jordan Justen.

Service tracing and implementation, data collection/analysis, and C coding
by yours truly.

Last minute changes by Gerd Hoffmann:
- Use OEM mode number (0xf1) instead of standard 800x600 mode (0x143). The
  resolution of the OEM mode (0xf1) is not standardized; the guest can't
  expect anything from it in advance.
- Use 1024x768 rather than 800x600 for more convenience in the Windows
  2008 R2 SP1 guest during OS installation, and after normal boot until
  the QXL XDDM guest driver is installed.

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

9 years agoArmPkg/BdsLib: Added support for TFTP servers without 'tsize' extension
Olivier Martin [Mon, 19 May 2014 16:41:25 +0000 (16:41 +0000)]
ArmPkg/BdsLib: Added support for TFTP servers without 'tsize' extension

Some TFTP servers do not have 'tsize' extension.
This change allows to download files from TFTP servers that do not have
this extension by trying to download the file into a pre-allocated buffer.

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

9 years agoChange PciIo::GetBarAttributes() to return unsupported for a unsupported bar even...
Ruiyu Ni [Mon, 19 May 2014 06:08:26 +0000 (06:08 +0000)]
Change PciIo::GetBarAttributes() to return unsupported for a unsupported bar even it's below 6 to follow the UEFI Spec.

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

9 years agoHandle multi instances device path while connecting console devices.
Qiu Shumin [Mon, 19 May 2014 00:39:48 +0000 (00:39 +0000)]
Handle multi instances device path while connecting console devices.

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

9 years agoEmbeddedPkg/PrePiLib: Remove duplicated definition of EFI_STATUS_CODE_DATA_MAX_SIZE
Olivier Martin [Fri, 16 May 2014 00:11:35 +0000 (00:11 +0000)]
EmbeddedPkg/PrePiLib: Remove duplicated definition of EFI_STATUS_CODE_DATA_MAX_SIZE

... is already defined by MdeModulePkg\Include\Guid\StatusCodeDataTypeDebug.h

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

9 years agoChange PciIo::GetBarAttributes() to return unsupported for a unsupported bar even...
Ruiyu Ni [Thu, 15 May 2014 07:22:27 +0000 (07:22 +0000)]
Change PciIo::GetBarAttributes() to return unsupported for a unsupported bar even it's below 6 to follow the UEFI Spec.

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

9 years agoMdeModulePkg/AtaAtapiPassThru: Handle timeout 0 as indefinitely wait to strictly...
Tian, Feng [Thu, 15 May 2014 07:09:14 +0000 (07:09 +0000)]
MdeModulePkg/AtaAtapiPassThru: Handle timeout 0 as indefinitely wait to strictly comply with UEFI spec

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

9 years agoFix some build issues (ARM toolchain).
Olivier Martin [Thu, 15 May 2014 01:13:05 +0000 (01:13 +0000)]
Fix some build issues (ARM toolchain).

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
Reviewed-by: Fu, Siyuan <siyuan.fu@intel.com>
Reviewed-by: Wu, Jiaxin <jiaxin.wu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15533 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoArmPlatformPkg/NorFlashDxe: Fixed LBA for FVB
Olivier Martin [Wed, 14 May 2014 22:11:04 +0000 (22:11 +0000)]
ArmPlatformPkg/NorFlashDxe: Fixed LBA for FVB

FVB (for instance for UEFI Variable) might not be at the
start of the NOR Flash. 'Lba' needs to be fixed up for 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@15532 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoArmPlatformPkg/ArmVExpress-CTA15-A7.dsc: Fixed LAN controller name
Olivier Martin [Wed, 14 May 2014 17:23:32 +0000 (17:23 +0000)]
ArmPlatformPkg/ArmVExpress-CTA15-A7.dsc: Fixed LAN controller name

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

9 years agoShellPkg: Add error messages to CP when destination file or directory cannot be opene...
Jaben Carsey [Wed, 14 May 2014 16:55:56 +0000 (16:55 +0000)]
ShellPkg: Add error messages to CP when destination file or directory cannot be opened/created

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

9 years agoShellPkg: report error when EfiDecompress is run on a non-compressed file
Jaben Carsey [Wed, 14 May 2014 16:54:09 +0000 (16:54 +0000)]
ShellPkg: report error when EfiDecompress is run on a non-compressed file

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

9 years agoArmPkg/BdsLib/AArch64: Added more useful error messages when loading Linux
Brendan Jackman [Wed, 14 May 2014 16:41:04 +0000 (16:41 +0000)]
ArmPkg/BdsLib/AArch64: Added more useful error messages when loading Linux

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

9 years agoArmPkg/BdsLib: Fix allocating kernel buffer in TFTP
Brendan Jackman [Wed, 14 May 2014 16:39:43 +0000 (16:39 +0000)]
ArmPkg/BdsLib: Fix allocating kernel buffer in TFTP

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

9 years agoArmPkg/CpuDxe/AArch64: Fixed SyncCacheConfig() when first entry is in 3-level
Olivier Martin [Wed, 14 May 2014 05:32:07 +0000 (05:32 +0000)]
ArmPkg/CpuDxe/AArch64: Fixed SyncCacheConfig() when first entry is in 3-level

If the first entry of the memory map is in the third level (case when the region
at 0x0 is smaller than 4KB) then its descriptor type would be TT_TYPE_BLOCK_ENTRY_LEVEL3
(=0x3) which has the same value as TT_TYPE_TABLE_ENTRY (=0x3).
The first condition in GetFirstPageAttribute() needed the table level
to not mix these two descriptor types.

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

9 years agoBased on request, export ResetRequired info used by browser.
Eric Dong [Wed, 14 May 2014 01:52:31 +0000 (01:52 +0000)]
Based on request, export ResetRequired info used by browser.

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

9 years agoAdd code to connect device path of console devices correctly for Shell command 'conne...
Qiu Shumin [Wed, 14 May 2014 01:47:02 +0000 (01:47 +0000)]
Add code to connect device path of console devices correctly for Shell command 'connect -c'.

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

9 years agoShellPkg: Do not mix status when executing a command
Olivier Martin [Tue, 13 May 2014 21:16:42 +0000 (21:16 +0000)]
ShellPkg: Do not mix status when executing a command

The function InternalShellExecuteDevicePath() did not differentiate an error occuring during the preparation of an image and an error occurring during its execution.

A use case of the issue was when a EFI application was called in a EFI Shell script. If the EFI application was returning an error then the NSH script stopped its execution. While the EFI Shell specification says the script should continue its execution (see 4.2 Error Handling).

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

9 years agoFix comment typos.
Gao, Liming [Tue, 13 May 2014 09:14:00 +0000 (09:14 +0000)]
Fix comment typos.

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

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