]> git.proxmox.com Git - mirror_edk2.git/log
mirror_edk2.git
9 years agoUefiCpuPkg/CpuDxe: Startup APs
Jordan Justen [Thu, 13 Nov 2014 18:30:09 +0000 (18:30 +0000)]
UefiCpuPkg/CpuDxe: Startup APs

This sequence should happen:
* CpuMp.c: Allocate a stack for the APs
* ApStartup.c: Send Start IPI to wake APs in 16-bit real mode
* MpAsm.S: AP enters CpuDxe driver code without stack
  - AP grabs a lock
  - AP sets up stack
  - AP calls CpuMp.c:ApEntryPointInC

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

9 years agoUefiCpuPkg/MpService: avoid dead lock caused by CheckAllAPsStatus
Chen Fan [Thu, 13 Nov 2014 18:29:54 +0000 (18:29 +0000)]
UefiCpuPkg/MpService: avoid dead lock caused by CheckAllAPsStatus

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

9 years agoUefiCpuPkg/MpService: avoid reset AP still hold a lock
Chen Fan [Thu, 13 Nov 2014 18:29:40 +0000 (18:29 +0000)]
UefiCpuPkg/MpService: avoid reset AP still hold a lock

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

9 years agoUefiCpuPkg/MpService: free the unused cpu data buffer
Chen Fan [Thu, 13 Nov 2014 18:29:31 +0000 (18:29 +0000)]
UefiCpuPkg/MpService: free the unused cpu data buffer

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

9 years agoUefiCpuPkg/CpuDxe: introduce ResetApStackless()
Chen Fan [Thu, 13 Nov 2014 18:29:13 +0000 (18:29 +0000)]
UefiCpuPkg/CpuDxe: introduce ResetApStackless()

If timeout expires before AP returns from Procedure, the AP should
be terminated, we introduce ResetApStackLess() to send init IPI
to let AP exit Procedurce and re-available.

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

9 years agoUefiCpuPkg/CpuDxe: split out StartupCode from StartApsStackless()
Chen Fan [Thu, 13 Nov 2014 18:29:01 +0000 (18:29 +0000)]
UefiCpuPkg/CpuDxe: split out StartupCode from StartApsStackless()

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

9 years agoUefiCpuPkg/MpService: avoid next timer getting into CheckAllAPsStatus()
Chen Fan [Thu, 13 Nov 2014 18:28:48 +0000 (18:28 +0000)]
UefiCpuPkg/MpService: avoid next timer getting into CheckAllAPsStatus()

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

9 years agoUefiCpuPkg/MpService: Simply Lock usage
Chen Fan [Thu, 13 Nov 2014 18:28:33 +0000 (18:28 +0000)]
UefiCpuPkg/MpService: Simply Lock usage

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

9 years agoUefiCpuPkg/MpService: move settimer out to InitMpSystemData
Chen Fan [Thu, 13 Nov 2014 18:28:20 +0000 (18:28 +0000)]
UefiCpuPkg/MpService: move settimer out to InitMpSystemData

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

9 years agoUefiCpuPkg/CpuDxe: Ap do loop routine to execute procedure
Chen Fan [Thu, 13 Nov 2014 18:28:10 +0000 (18:28 +0000)]
UefiCpuPkg/CpuDxe: Ap do loop routine to execute procedure

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

9 years agoUefiCpuPkg/CpuDxe: implement Mp Services:SwitchBSP()
Chen Fan [Thu, 13 Nov 2014 18:27:52 +0000 (18:27 +0000)]
UefiCpuPkg/CpuDxe: implement Mp Services:SwitchBSP()

by now, SwitchBSP() always return UNSUPPORTED

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

9 years agoUefiCpuPkg/CpuDxe: implement Mp Services:StartupAllAPs()
Chen Fan [Thu, 13 Nov 2014 18:27:34 +0000 (18:27 +0000)]
UefiCpuPkg/CpuDxe: implement Mp Services:StartupAllAPs()

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

9 years agoUefiCpuPkg/CpuDxe: implement Mp Protocol:StartupThisAP()
Chen Fan [Thu, 13 Nov 2014 18:27:21 +0000 (18:27 +0000)]
UefiCpuPkg/CpuDxe: implement Mp Protocol:StartupThisAP()

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

9 years agoUefiCpuPkg/CpuDxe: implement Mp Protocol:EnableDisableAP()
Chen Fan [Thu, 13 Nov 2014 18:27:09 +0000 (18:27 +0000)]
UefiCpuPkg/CpuDxe: implement Mp Protocol:EnableDisableAP()

Due to the implementation of  AcquireSpinLock() is not MP safe,
so we should use AcquireSpinLockOrFail directly instead.

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

9 years agoUefiCpuPkg/CpuDxe: implement Mp Services:GetProcessorInfo()
Chen Fan [Thu, 13 Nov 2014 18:26:53 +0000 (18:26 +0000)]
UefiCpuPkg/CpuDxe: implement Mp Services:GetProcessorInfo()

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

9 years agoUefiCpuPkg/CpuDxe: implement Mp Protocol:GetNumberOfProcessors()
Chen Fan [Thu, 13 Nov 2014 18:26:42 +0000 (18:26 +0000)]
UefiCpuPkg/CpuDxe: implement Mp Protocol:GetNumberOfProcessors()

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

9 years agoUefiCpuPkg/CpuDxe: implement Mp Protocol: WhoAmI()
Chen Fan [Thu, 13 Nov 2014 18:26:32 +0000 (18:26 +0000)]
UefiCpuPkg/CpuDxe: implement Mp Protocol: WhoAmI()

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

9 years agoUefiCpuPkg/CpuDxe: introduce MP_SYSTEM_DATA for Mp Service Protocol
Chen Fan [Thu, 13 Nov 2014 18:26:23 +0000 (18:26 +0000)]
UefiCpuPkg/CpuDxe: introduce MP_SYSTEM_DATA for Mp Service Protocol

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

9 years agoUefiCpuPkg/CpuDxe: introduce EFI_MP_SERVICES_PROTOCOL
Chen Fan [Thu, 13 Nov 2014 18:26:13 +0000 (18:26 +0000)]
UefiCpuPkg/CpuDxe: introduce EFI_MP_SERVICES_PROTOCOL

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

9 years agoUefiCpuPkg/CpuDxe: Switch Ap Stack to NewStack
Chen Fan [Thu, 13 Nov 2014 18:26:03 +0000 (18:26 +0000)]
UefiCpuPkg/CpuDxe: Switch Ap Stack to NewStack

All APs use the same common stack to initialization. after
initialization, APs should switch to the stack of its own.

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

9 years agoUefiCpuPkg/CpuDxe: introduce two PCD value
Chen Fan [Thu, 13 Nov 2014 18:25:48 +0000 (18:25 +0000)]
UefiCpuPkg/CpuDxe: introduce two PCD value

introduce PCD value: PcdCpuMaxLogicalProcessorNumber and PcdCpuApStackSize,
used for initialize APs stacks.

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

9 years agoUefiCpuPkg/CpuDxe: Add StartApsStackless routine
Jordan Justen [Thu, 13 Nov 2014 18:25:29 +0000 (18:25 +0000)]
UefiCpuPkg/CpuDxe: Add StartApsStackless routine

This routine starts the APs and directs them to run the specified
code.

The specified code is entered without a stack being available.

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

9 years agoUefiCpuPkg/CpuDxe: Move GDT structures into CpuGdt.h
Jordan Justen [Thu, 13 Nov 2014 18:25:10 +0000 (18:25 +0000)]
UefiCpuPkg/CpuDxe: Move GDT structures into CpuGdt.h

We'll want to use the structures for AP startup.

Note: It seems previously we were not using '#pragma pack ()' in
      CpuGdt.c.

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

9 years agoUefiCpuPkg/CpuDxe: Add stackless assembly AP entry points
Jordan Justen [Thu, 13 Nov 2014 18:24:59 +0000 (18:24 +0000)]
UefiCpuPkg/CpuDxe: Add stackless assembly AP entry points

The AP startup code simply jumps into this code with the CpuDxe driver
without setting up a stack for the processor.

Therefore, this code must setup the stack before calling into C code.

This is the basic flow:
* AP enters CpuDxe driver code (AsmApEntryPoint) without stack
  - AP grabs a lock
  - AP sets up stack
  - AP calls CpuMp.c:ApEntryPointInC
  - If ApEntryPointInC returns, the lock is freed, and another AP may
    run
  - The AP C code may call AsmApDoneWithCommonStack to indicate that
    the AP is no longer using the stack, and another may therefore
    proceed to use the stack and then call ApEntryPointInC

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

9 years agoUefiCpuPkg/CpuDxe: Add ApEntryPointInC
Jordan Justen [Thu, 13 Nov 2014 18:24:43 +0000 (18:24 +0000)]
UefiCpuPkg/CpuDxe: Add ApEntryPointInC

This is the function the AP assembly code will expect to call after
getting a lock and setting up the stack.

Only one AP will enter this routine at a time.

If ApEntryPointInC exits, then the assembly code will loop around to
grab the lock, setup the stack, and call ApEntryPointInC again.

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

9 years agoUefiCpuPkg/CpuDxe: Add no-op InitializeMpSupport
Jordan Justen [Thu, 13 Nov 2014 18:24:25 +0000 (18:24 +0000)]
UefiCpuPkg/CpuDxe: Add no-op InitializeMpSupport

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

9 years agoArmPkg/ArmGicLib: select GICv2 mode if SRE is present but unavailable
Ard Biesheuvel [Thu, 13 Nov 2014 16:41:51 +0000 (16:41 +0000)]
ArmPkg/ArmGicLib: select GICv2 mode if SRE is present but unavailable

Even if the CPU id registers indicate hardware support for the
System Register interface to the GIC, higher exception levels
may disable that interface and only allow access through MMIO.

So move the enabling of the SRE bit to the GIC version detection
routine: if we trigger an exception, we would have anyway at a
later stage, so the net effect is the same. However, if setting
the bit doesn't stick, it means we can switch to MMIO and proceed
normally otherwise.

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

9 years agoArmPkg/ArmGic: Removed 'GCC' toolchain to build assembly files
Olivier Martin [Thu, 13 Nov 2014 11:06:00 +0000 (11:06 +0000)]
ArmPkg/ArmGic: Removed 'GCC' toolchain to build assembly files

ARMCC6 toolchain (LLVM based) understands the GNU assembly language.

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

9 years ago[PATHC] ShellPkg: control code flow with a PCD
Jaben Carsey [Wed, 12 Nov 2014 21:28:51 +0000 (21:28 +0000)]
[PATHC] ShellPkg: control code flow with a PCD

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

9 years agoOvmfPkg/XenPvBlkDxe: Don't include system inttypes.h
Jordan Justen [Wed, 12 Nov 2014 20:33:36 +0000 (20:33 +0000)]
OvmfPkg/XenPvBlkDxe: Don't include system inttypes.h

EDK II code should not include system include files.

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

9 years agoArmPlatformPkg: fix undefined reference to memcpy
Scott Duplichan [Wed, 12 Nov 2014 10:01:41 +0000 (10:01 +0000)]
ArmPlatformPkg: fix undefined reference to memcpy

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

9 years agoCryptoPkg Updates to support RFC3161 timestamp signature verification.
Qin Long [Wed, 12 Nov 2014 08:51:45 +0000 (08:51 +0000)]
CryptoPkg Updates to support RFC3161 timestamp signature verification.

The main changes includes:
1. Enabling SHA384 and SHA512 digest algorithm; (Sha512.c)
2. RFC 3161 timestamp signature verification support; (CryptTs.c)
3. Fixed one ASN.1 length encoding issue in Authenticode verification routine. (CryptAuthenticode.c)
4. Add the corresponding test cases in Cryptest utility (SHA384 & SHA512 & Timestamp verification)

Contributed-under: TianoCore Contribution Agreement 1.0

Signed-off-by: Qin Long <qin.long@intel.com>
Reviewed-by: Guo Dong <guo.dong@intel.com>
Reviewed-by: Ting Ye <ting.ye@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16339 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoBaseTools: Fix a cleanall issue.
Yingke Liu [Wed, 12 Nov 2014 08:26:03 +0000 (08:26 +0000)]
BaseTools: Fix a cleanall issue.

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

9 years agoFix a bug in DHCP6 driver when using DUID LLT.
Fu Siyuan [Wed, 12 Nov 2014 05:14:07 +0000 (05:14 +0000)]
Fix a bug in DHCP6 driver when using DUID LLT.

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

9 years agoEdkCompatibilityPkg: Add UEFI memory and SMRAM profile support.
Star Zeng [Wed, 12 Nov 2014 03:30:11 +0000 (03:30 +0000)]
EdkCompatibilityPkg: Add UEFI memory and SMRAM profile support.

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

9 years agoMdeModulePkg DxeCore/PiSmmCore: Add UEFI memory and SMRAM profile support.
Star Zeng [Wed, 12 Nov 2014 03:27:48 +0000 (03:27 +0000)]
MdeModulePkg DxeCore/PiSmmCore: Add UEFI memory and SMRAM profile support.

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

9 years agoMdePkg: Add RETURN_ADDRESS macro into Base.h.
Star Zeng [Wed, 12 Nov 2014 03:18:09 +0000 (03:18 +0000)]
MdePkg: Add RETURN_ADDRESS macro into Base.h.

Based on compiler intrinsic function.
MSVC: _ReturnAddress
GCC: __builtin_return_address

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

9 years agoShellPkg: Add type cast to avoid build failure in VS2005.
Qiu Shumin [Wed, 12 Nov 2014 01:07:23 +0000 (01:07 +0000)]
ShellPkg: Add type cast to avoid build failure in VS2005.

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

9 years agoAppPkg: Disable Lua builds by default. Update the ReadMe file.
Daryl McDaniel [Tue, 11 Nov 2014 23:15:32 +0000 (23:15 +0000)]
AppPkg: Disable Lua builds by default.  Update the ReadMe file.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Daryl McDaniel <daryl.mcdaniel@intel.com>
Reviewed-by: Bruce Maynard <Bruce.Maynard@Emulex.Com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16332 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoStdLib/AppPkg: Add the NOOPT build target and fix a type conversion problem with...
Daryl McDaniel [Tue, 11 Nov 2014 22:56:58 +0000 (22:56 +0000)]
StdLib/AppPkg: Add the NOOPT build target and fix a type conversion problem with VS2005.

AppPkg.dsc: Remove IPF support and add NOOPT build target.
StdLib.dsc: Add NOOPT build target.
daConsole.c: Cast a comparison to BOOLEAN before assigning it to a BOOLEAN.

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

9 years agoBaseTool: Support EDKII style GUID definition for VFR function.
Yingke Liu [Tue, 11 Nov 2014 07:33:50 +0000 (07:33 +0000)]
BaseTool: Support EDKII style GUID definition for VFR function.

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

9 years agoArmPkg/ArmArchTimerLib: Promotes 32bit value to prevent overflow
Olivier Martin [Tue, 11 Nov 2014 00:52:46 +0000 (00:52 +0000)]
ArmPkg/ArmArchTimerLib: Promotes 32bit value to prevent overflow

Both MicroSeconds and PcdArmArchTimerFreqInHz are 32-bit values on
AArch32 so their multiplication produces 32-bit result that might
cause wrong calculation.

Example: With MicroSeconds = 200 us, PcdArmArchTimerFreqInHz = 24MHz.
200*24000000 = 0x1_1E1A_3000 => So 0x1E1A_3000 when the type is UINT32.

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

9 years agoArmPkg/CompilerIntrinsicesLib: Fixed memmove() and memset()
Olivier Martin [Tue, 11 Nov 2014 00:52:11 +0000 (00:52 +0000)]
ArmPkg/CompilerIntrinsicesLib: Fixed memmove() and memset()

- Fixed memmove when going backward: the copy started one byte
  after the end of the region to copy
- memset: - removed unused register
          - fixed arguments size and character arguments were
            actually reversed
- Added memmove() to ARM32 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@16328 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoArmPkg: Ensured the stack is always quad-word aligned
Olivier Martin [Tue, 11 Nov 2014 00:51:11 +0000 (00:51 +0000)]
ArmPkg: Ensured the stack is always quad-word aligned

From the AArch64 Procedure Call Standard (ARM IHI 0055B):

  5.2.2.1 Universal stack constraints
  At all times the following basic constraints must hold:
  - SP mod 16 = 0. The stack must be quad-word aligned.

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

9 years agoEmbeddedPkg/Lan9118Dxe: Remove link check in SNP initialization
Ronald Cron [Tue, 11 Nov 2014 00:49:50 +0000 (00:49 +0000)]
EmbeddedPkg/Lan9118Dxe: Remove link check in SNP initialization

The UEFI specification does not require the initialisation and reset
interface to check if an Ethernet cable is connected or not, and provides
the GetStatus() interface to do this. Furthermore, the 'Managed Network
Protocol' take care of the cable connection check in edk2 network stack.

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

9 years agoArmPlatformPkg: Increase more ARM address Pcd entries to 64-bit.
Leif Lindholm [Tue, 11 Nov 2014 00:43:03 +0000 (00:43 +0000)]
ArmPlatformPkg: Increase more ARM address Pcd entries to 64-bit.

Some AArch64 platforms have RAM and flash devices >4GB.
Update some additional Pcd entries to 64-bit, and change
the corresponding PcdGet32 calls to PcdGet64.

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

9 years agoStdLib: Fix a "potentially uninitialized variable" error.
Daryl McDaniel [Mon, 10 Nov 2014 23:05:45 +0000 (23:05 +0000)]
StdLib: Fix a "potentially uninitialized variable" error.

gdtoa/gdtoa.c:  Several "goto" paths allowed the initialization of a variable to be bypassed.  Initialized it at the top of the function in order to eliminate the error.

Updated the file header and copyright notices.

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

9 years agoShellPkg: Fixed variable set but never used
Olivier Martin [Mon, 10 Nov 2014 10:20:25 +0000 (10:20 +0000)]
ShellPkg: Fixed variable set but never used

This warning/error raised by ARM toolchain prevents to build
the EFI Shell for ARM 32-bit with this toolchain.

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

9 years agoFix a bug in DebugAgent that hang happens when the ACK for GO is lost.
Ruiyu Ni [Mon, 10 Nov 2014 08:47:49 +0000 (08:47 +0000)]
Fix a bug in DebugAgent that hang happens when the ACK for GO is lost.

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

9 years agoMdeModulePkg/AtaAtapiPassThru: don't write read-only AHCI MMIO register
Feng Tian [Mon, 10 Nov 2014 05:46:21 +0000 (05:46 +0000)]
MdeModulePkg/AtaAtapiPassThru: don't write read-only AHCI MMIO register

Per AHCI 1.1 spec, AE bit of GHC register is read-only if CAP.SAM is 1

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

9 years ago Fix execution status & DEBUG message level mismatch. EFI_D_ERROR is used only...
Chao Zhang [Mon, 10 Nov 2014 05:01:15 +0000 (05:01 +0000)]
   Fix execution status & DEBUG message level mismatch. EFI_D_ERROR is used only when failure/case can’t be resolved by code.

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

9 years agoOvmfPkg XenBusDxe: Convert X64/TestAndClearBit.asm to NASM
Anthony PERARD [Sat, 8 Nov 2014 02:41:35 +0000 (02:41 +0000)]
OvmfPkg XenBusDxe: Convert X64/TestAndClearBit.asm to NASM

The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert
X64/TestAndClearBit.asm to X64/TestAndClearBit.nasm

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

9 years agoOvmfPkg XenBusDxe: Convert X64/InterlockedCompareExchange16.asm to NASM
Anthony PERARD [Sat, 8 Nov 2014 02:41:28 +0000 (02:41 +0000)]
OvmfPkg XenBusDxe: Convert X64/InterlockedCompareExchange16.asm to NASM

The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert
X64/InterlockedCompareExchange16.asm to X64/InterlockedCompareExchange16.nasm

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

9 years agoOvmfPkg XenBusDxe: Convert X64/hypercall.asm to NASM
Anthony PERARD [Sat, 8 Nov 2014 02:41:15 +0000 (02:41 +0000)]
OvmfPkg XenBusDxe: Convert X64/hypercall.asm to NASM

The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert
X64/hypercall.asm to X64/hypercall.nasm

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

9 years agoOvmfPkg XenBusDxe: Convert Ia32/TestAndClearBit.asm to NASM
Anthony PERARD [Sat, 8 Nov 2014 02:41:07 +0000 (02:41 +0000)]
OvmfPkg XenBusDxe: Convert Ia32/TestAndClearBit.asm to NASM

The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert
Ia32/TestAndClearBit.asm to Ia32/TestAndClearBit.nasm

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

9 years agoOvmfPkg XenBusDxe: Convert Ia32/InterlockedCompareExchange16.asm to NASM
Anthony PERARD [Sat, 8 Nov 2014 02:40:58 +0000 (02:40 +0000)]
OvmfPkg XenBusDxe: Convert Ia32/InterlockedCompareExchange16.asm to NASM

The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert
Ia32/InterlockedCompareExchange16.asm to Ia32/InterlockedCompareExchange16.nasm

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

9 years agoOvmfPkg XenBusDxe: Convert Ia32/hypercall.asm to NASM
Anthony PERARD [Sat, 8 Nov 2014 02:40:44 +0000 (02:40 +0000)]
OvmfPkg XenBusDxe: Convert Ia32/hypercall.asm to NASM

The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert
Ia32/hypercall.asm to Ia32/hypercall.nasm

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

9 years agoAppPkg: Add the Lua interpreter and library.
darylm503 [Fri, 7 Nov 2014 20:18:01 +0000 (20:18 +0000)]
AppPkg: Add the Lua interpreter and library.
StdLib: Add support and include files for Lua.

The sources for the Lua standalone interpreter, as well as its library, have been added to AppPkg/Applications/Lua.  The Lua library, LuaLib, can be used to embed Lua into new applications.

The Lua header files, needed for both building and embedding, are located in StdLib/Include/Lua.  The original versions of these header files, in the source directory, have been converted into stubs that reference the include files in StdLib.  This allows us to keep the Lua sources as close to the distributed version as possible.

Documentation is contained in the Lua/doc directory.  Further information is available at www.lua.org.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed Off by:  Bruce Maynard <Bruce.Maynard@Emulex.Com>
Reviewed by:    Daryl McDaniel <daryl.mcdaniel@intel.com>

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

9 years agoAdd safe string function to base lib.
jyao1 [Fri, 7 Nov 2014 13:43:05 +0000 (13:43 +0000)]
Add safe string function to base lib.

Contributed-under: TianoCore Contribution Agreement 1.0

signed off by: Yao, Jiewen <jiewen.yao@intel.com>
reviewed by: Ni, Ruiyu <ruiyu.ni@intel.com>
reviewed by: Long, Qin <qin.long@intel.com>
reviewed by: Kinney, Michael D <michael.d.kinney@intel.com>

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

9 years agoOvmfPkg: set video resolution of text setup to 640x480
Laszlo Ersek [Thu, 6 Nov 2014 14:21:21 +0000 (14:21 +0000)]
OvmfPkg: set video resolution of text setup to 640x480

On a physical screen such a low graphics resolution would lead to huge
glyphs (the text resolution is 80x25, centered, with 8x19 pixel glyphs).
But in a virtual machine it just saves screen real estate on the client,
by removing the black bands.

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

9 years agoOvmfPkg: BDS: drop custom boot timeout, revert to IntelFrameworkModulePkg's
Laszlo Ersek [Thu, 6 Nov 2014 14:21:15 +0000 (14:21 +0000)]
OvmfPkg: BDS: drop custom boot timeout, revert to IntelFrameworkModulePkg's

PlatformBdsEnterFrontPage() already implements a keypress wait (for
entering the setup utility at boot) with a nice progress bar, only OVMF
has not been using it.

Removing our custom code and utilizing PlatformBdsEnterFrontPage()'s
builtin wait has the following benefits:

- It simplifies OVMF's BDS code.

- Because now we call PlatformBdsEnterFrontPage() unconditionally, it
  actually has a chance to look at the EFI_OS_INDICATIONS_BOOT_TO_FW_UI
  bit of the "OsIndications" variable, improving compliance with the UEFI
  specification. References:
  - https://bugzilla.redhat.com/show_bug.cgi?id=1153927
  - http://thread.gmane.org/gmane.comp.bios.tianocore.devel/10487

- The progress bar looks nice. (And it keeps the earlier behavior intact,
  when the user presses a key on the TianoCore splash screen.)

  In any case, we set the timeout to 0 (which doesn't show the progress
  bar and proceeds to the boot options immediately) in order to keep the
  boot time down.

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

9 years agoOvmfPkg: BDS: drop superfluous "connect first boot option" logic
Laszlo Ersek [Thu, 6 Nov 2014 14:21:09 +0000 (14:21 +0000)]
OvmfPkg: BDS: drop superfluous "connect first boot option" logic

This is again obviated by our earlier BdsLibConnectAll() call.

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

9 years agoOvmfPkg: BDS: optimize second argument in PlatformBdsEnterFrontPage() call
Laszlo Ersek [Thu, 6 Nov 2014 14:21:03 +0000 (14:21 +0000)]
OvmfPkg: BDS: optimize second argument in PlatformBdsEnterFrontPage() call

The second parameter of said function is "ConnectAllHappened", and if set
to TRUE, the function sets "gConnectAllHappened" to TRUE.

This global variable in turn controls whether Intel BDS code *itself*
calls BdsLibConnectAllDriversToAllControllers() in various places -- if
the indicator is TRUE, then the "connect all" is assumed to have been
performed, and Intel BDS doesn't do it itself.

OVMF should pass TRUE as "ConnectAllHappened", because a few lines before
our call to PlatformBdsEnterFrontPage(), we already connect everything
with BdsLibConnectAll(), which includes the effects of
BdsLibConnectAllDriversToAllControllers():

PlatformBdsPolicyBehavior()                   [OvmfPkg/Library/PlatformBdsLib/BdsPlatform.c]
  BdsLibConnectAll()                          [IntelFrameworkModulePkg/Library/GenericBdsLib/BdsConnect.c]
    BdsLibConnectAllDriversToAllControllers()
  PlatformBdsEnterFrontPage()                 [IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.c]

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

9 years agoOvmfPkg: BDS: don't overwrite the BDS Front Page timeout
Laszlo Ersek [Thu, 6 Nov 2014 14:20:58 +0000 (14:20 +0000)]
OvmfPkg: BDS: don't overwrite the BDS Front Page timeout

The PlatformBdsEnterFrontPage() function's first parameter,
"TimeoutDefault", determines the behavior of the setup utility:

- If (TimeoutDefault == 0), then the usual boot order is to be acted upon
  immediately.

- If (TimeoutDefault == 0xFFFF), then the setup utility is entered
  unconditionally.

- If (0 < TimeoutDefault && TimeoutDefault < 0xFFFF), then the
  PlatformBdsEnterFrontPage() function displays a progress bar, waiting
  for TimeoutDefault seconds. If the user presses a key, then the setup
  utility is entered, otherwise the normal boot option processing takes
  place.

The TimeoutDefault parameter is supposed to be set from

  gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdPlatformBootTimeOut

which has the following (matching) documentation in
"IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec":

  The number of seconds that the firmware will wait before initiating the
  original default boot selection.
  A value of 0 indicates that the default boot selection is to be
  initiated immediately on boot.
  The value of 0xFFFF then firmware will wait for user input before
  booting.

OVMF does this actually -- see the Timeout variable in
PlatformBdsPolicyBehavior() -- but right before calling
PlatformBdsEnterFrontPage(), OVMF hardwires TimeoutDefault to 0xFFFF.

This has been acceptable until now, because OVMF implements its own "wait
for keypress at the splash screen" logic in PlatformBdsPolicyBehavior(),
completely avoiding the progress bar mentioned above. OVMF only calls
PlatformBdsEnterFrontPage() when the user presses a key during its own
"splash screen wait", and *then* it indeed makes sense to enter the setup
utility unconditionally.

However, even that way, the

  Timeout = 0xffff;

assignment is superfluous, because 0xFFFF is already the default value of
PcdPlatformBootTimeOut in "IntelFrameworkModulePkg.dec", and OvmfPkg
doesn't override it in its DSC files.

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

9 years agoOvmfPkg: BDS: drop useless return statement
Laszlo Ersek [Thu, 6 Nov 2014 14:20:52 +0000 (14:20 +0000)]
OvmfPkg: BDS: drop useless return statement

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

9 years agoOvmfPkg: BDS: remove dead call to PlatformBdsEnterFrontPage()
Laszlo Ersek [Thu, 6 Nov 2014 14:20:44 +0000 (14:20 +0000)]
OvmfPkg: BDS: remove dead call to PlatformBdsEnterFrontPage()

This call has been dead since the conception of OvmfPkg (git commit
49ba9447 / SVN r8398), and only confuses readers -- let's remove 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@16305 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoTry to read key strike even when the TimeOuts value is zero, this will avoid BDS...
Eric Dong [Thu, 6 Nov 2014 08:56:54 +0000 (08:56 +0000)]
Try to read key strike even when the TimeOuts value is zero, this will avoid BDS not get user input when TimeOuts value set to zero.

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

9 years agoRemove un-used PPI reference.
Jeff Fan [Thu, 6 Nov 2014 06:13:22 +0000 (06:13 +0000)]
Remove un-used PPI reference.

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

9 years agoBaseTools/GenFw: Fixed R_AARCH64_CALL26/R_AARCH64_JUMP26 when referring to start...
Olivier Martin [Wed, 5 Nov 2014 18:56:17 +0000 (18:56 +0000)]
BaseTools/GenFw: Fixed R_AARCH64_CALL26/R_AARCH64_JUMP26 when referring to start of a section

When R_AARCH64_CALL26/R_AARCH64_JUMP26 relocations referred to static
functions, they sometime refer to the start of the '.text' section + addend.
It means the addend is different of '0'.
The non-patched code (before applying the relocation) already contains
the correct offset.

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

9 years agoMdeModulePkg: Add InSmm() API in PiSmmCoreSmmServicesTableLib instance
Gao, Liming [Wed, 5 Nov 2014 12:09:22 +0000 (12:09 +0000)]
MdeModulePkg: Add InSmm() API in PiSmmCoreSmmServicesTableLib instance

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

9 years agoShellPkg: Fix timezone command
jcarsey [Tue, 4 Nov 2014 22:33:16 +0000 (22:33 +0000)]
ShellPkg: Fix timezone command

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

9 years agoMdePkg: fix comments typo about EFIAPI for X64
Chen Fan [Tue, 4 Nov 2014 09:17:37 +0000 (09:17 +0000)]
MdePkg: fix comments typo about EFIAPI for X64

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chen Fan <chen.fan.fnst@cn.fujitsu.com>
Reviewed-by: Gao, Liming <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16299 6f19259b-4bc3-4df7-8a09-765794883524

9 years ago1. Remove any references on other files from DebugTimer.c, to avoid un-used symbols...
Jeff Fan [Tue, 4 Nov 2014 01:29:20 +0000 (01:29 +0000)]
1. Remove any references on other files from DebugTimer.c, to avoid un-used symbols linked.
2. Add GLOBAL_REMOVE_IF_UNREFERENCED for all global variables.

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

9 years agoEDK II Contributions.txt: Update patch format information
Jordan Justen [Fri, 31 Oct 2014 22:05:50 +0000 (22:05 +0000)]
EDK II Contributions.txt: Update patch format information

Update to show what the patch looks like in email form.

NOTE: This does not modify the wording of the "TianoCore Contribution
      Agreement 1.0" section

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

9 years agoOvmfPkg/XenBusDxe: Fix initialisation of gXenBusDevicePathTemplate
Anthony PERARD [Fri, 31 Oct 2014 21:25:44 +0000 (21:25 +0000)]
OvmfPkg/XenBusDxe: Fix initialisation of gXenBusDevicePathTemplate

.. to avoid the use .member = value syntax as VS does not support it.

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

9 years agoOvmfPkg/XenBusDxe: Fix initialisation of gXenBusPrivateData
Anthony PERARD [Fri, 31 Oct 2014 21:25:36 +0000 (21:25 +0000)]
OvmfPkg/XenBusDxe: Fix initialisation of gXenBusPrivateData

.. to avoid the use .member = value syntax as VS does not support it.

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

9 years agoOvmfPkg/Xen*: Pass struct XENSTORE_TRANSACTION argument as a pointer
Anthony PERARD [Fri, 31 Oct 2014 21:25:23 +0000 (21:25 +0000)]
OvmfPkg/Xen*: Pass struct XENSTORE_TRANSACTION argument as a pointer

As EDK II does not allow calls with a struct.

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

9 years agoOvmfPkg/Include/...Xen: Convert __i386__/__x86_64__ to MDE_CPU_IA32/MDE_CPU_X64.
Anthony PERARD [Fri, 31 Oct 2014 21:25:11 +0000 (21:25 +0000)]
OvmfPkg/Include/...Xen: Convert __i386__/__x86_64__ to MDE_CPU_IA32/MDE_CPU_X64.

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

9 years agoOvmfPkg Sec: Convert X64/SecEntry.asm to NASM
Jordan Justen [Fri, 31 Oct 2014 20:55:16 +0000 (20:55 +0000)]
OvmfPkg Sec: Convert X64/SecEntry.asm to NASM

The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert
X64/SecEntry.asm to X64/SecEntry.nasm

Note: Manually collapsed .inf sources

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

9 years agoOvmfPkg Sec: Convert Ia32/SecEntry.asm to NASM
Jordan Justen [Fri, 31 Oct 2014 20:55:06 +0000 (20:55 +0000)]
OvmfPkg Sec: Convert Ia32/SecEntry.asm to NASM

The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert
Ia32/SecEntry.asm to Ia32/SecEntry.nasm

Note: Manually collapsed .inf sources

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

9 years agoOvmfPkg QemuFwCfgLib: Convert X64/IoLibExAsm.asm to NASM
Jordan Justen [Fri, 31 Oct 2014 20:54:54 +0000 (20:54 +0000)]
OvmfPkg QemuFwCfgLib: Convert X64/IoLibExAsm.asm to NASM

The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert
X64/IoLibExAsm.asm to X64/IoLibExAsm.nasm

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

9 years agoOvmfPkg QemuFwCfgLib: Convert Ia32/IoLibExAsm.asm to NASM
Jordan Justen [Fri, 31 Oct 2014 20:54:41 +0000 (20:54 +0000)]
OvmfPkg QemuFwCfgLib: Convert Ia32/IoLibExAsm.asm to NASM

The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert
Ia32/IoLibExAsm.asm to Ia32/IoLibExAsm.nasm

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

9 years agoOvmfPkg LoadLinuxLib: Convert X64/JumpToKernel.asm to NASM
Jordan Justen [Fri, 31 Oct 2014 20:54:31 +0000 (20:54 +0000)]
OvmfPkg LoadLinuxLib: Convert X64/JumpToKernel.asm to NASM

The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert
X64/JumpToKernel.asm to X64/JumpToKernel.nasm

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

9 years agoOvmfPkg LoadLinuxLib: Convert Ia32/JumpToKernel.asm to NASM
Jordan Justen [Fri, 31 Oct 2014 20:54:16 +0000 (20:54 +0000)]
OvmfPkg LoadLinuxLib: Convert Ia32/JumpToKernel.asm to NASM

The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert
Ia32/JumpToKernel.asm to Ia32/JumpToKernel.nasm

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

9 years agoStdLib: Fix more GCC warnings/errors caused by variables being set but not used.
Olivier Martin [Fri, 31 Oct 2014 20:32:02 +0000 (20:32 +0000)]
StdLib: Fix more GCC warnings/errors caused by variables being set but not used.

Removed variables that had no effect on code behavior.
Normalized comment formatting.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
Reviewed by: Daryl McDaniel <daryl.mcdaniel@intel.com>

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

9 years agoBaseTools: Add ConvertMasmToNasm.py script
Jordan Justen [Fri, 31 Oct 2014 19:55:15 +0000 (19:55 +0000)]
BaseTools: Add ConvertMasmToNasm.py script

This script is intended to assist with MASM to NASM syntax
conversions.

The output should be manually inspected and adjusted as needed, since
this script does not provide a perfect conversion.

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

9 years agoStdLib: Fix more GCC warnings/errors caused by variables being set but not used.
Olivier Martin [Fri, 31 Oct 2014 17:50:33 +0000 (17:50 +0000)]
StdLib: Fix more GCC warnings/errors caused by variables being set but not used.

Removed variables that had no effect on code behavior.
Normalized comment formatting.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
Reviewed by: Daryl McDaniel <daryl.mcdaniel@intel.com>

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

9 years ago[Patch] ShellPkg: Remove unused PCD from INF file
jcarsey [Fri, 31 Oct 2014 16:40:46 +0000 (16:40 +0000)]
[Patch] ShellPkg: Remove unused PCD from INF file

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

9 years agoMdePkg/ProcessorBind.h: Add ARM and AArch64 GCC macros for Clang
Olivier Martin [Fri, 31 Oct 2014 14:05:09 +0000 (14:05 +0000)]
MdePkg/ProcessorBind.h: Add ARM and AArch64 GCC macros for Clang

When compiling with Clang, we still use GNU as for the assembler, so we still need to define the GCC_ASM* macros.

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

9 years agoRemove redundant ASSERT in TcgDxe & TreeDxe. Some asserts are removed directly, some...
Chao Zhang [Fri, 31 Oct 2014 10:59:25 +0000 (10:59 +0000)]
Remove redundant ASSERT in TcgDxe & TreeDxe. Some asserts are removed directly, some are replaced by debug output.
ASSERT for SetupEventLog is kept. It is the foundation of TcgProtocol and TrEEProtocol

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

9 years agoMdeModulePkg/SecurityPkg Variable: Add boundary check for while (IsValidVariableHeade...
Star Zeng [Fri, 31 Oct 2014 10:26:54 +0000 (10:26 +0000)]
MdeModulePkg/SecurityPkg Variable: Add boundary check for while (IsValidVariableHeader (Variable)).

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

9 years agoMdePkg/IntelFrameworkPkg HobLib: Update BuildResourceDescriptorWithOwnerHob()
Star Zeng [Fri, 31 Oct 2014 07:20:26 +0000 (07:20 +0000)]
MdePkg/IntelFrameworkPkg HobLib: Update BuildResourceDescriptorWithOwnerHob()
to align the behavior of BuildResourceDescriptorHob().

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

9 years agoFix a bug introuduced by r16104, not all NIC device implement both memory and IO...
Fu Siyuan [Fri, 31 Oct 2014 00:38:39 +0000 (00:38 +0000)]
Fix a bug introuduced by r16104, not all NIC device implement both memory and IO bar.
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@16278 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoUpdate edksetup.bat to support Microsoft Visual Studio 2013 when building the Nt32Pkg...
lhauch [Thu, 30 Oct 2014 17:09:25 +0000 (17:09 +0000)]
Update edksetup.bat to support Microsoft Visual Studio 2013 when building the Nt32Pkg emulation platform (enabled using the --nt32 flag).

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

9 years agoStdLib: Fix GCC warnings/errors caused by variables being set but not used.
Olivier Martin [Thu, 30 Oct 2014 01:05:22 +0000 (01:05 +0000)]
StdLib: Fix GCC warnings/errors caused by variables being set but not used.

Removed variables that had no effect on code behavior.

Fifo.c::FIFO_Dequeue: Replaced instances of "Self->ElementSize" with preexisting variable "SizeOfElement".

IIOutilities.c::IIO_GetInChar: Fixed variable of wrong, but compatible, type and made updating of housekeeping variables dependent upon successful completion of reading from the buffer.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
Reviewed by: Daryl McDaniel <daryl.mcdaniel@intel.com>

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

9 years agoArmPlatformPkg/Documentation: Removed BaseTools-Pending-Patches.patch
Olivier Martin [Wed, 29 Oct 2014 18:55:29 +0000 (18:55 +0000)]
ArmPlatformPkg/Documentation: Removed BaseTools-Pending-Patches.patch

All the required pending BaseTools patches have been merged.
This patch is not required anymore.

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

9 years agoOvmfPkg/XenPvBlkDxe: Add BlockIo.
Anthony PERARD [Wed, 29 Oct 2014 06:52:13 +0000 (06:52 +0000)]
OvmfPkg/XenPvBlkDxe: Add BlockIo.

Implement the BlockIo protocol.

Change in V4:
- Replace the license by the commonly used file header text.

Change in V3:
- assert(Media->BlockSize % 512 == 0)
- Use Sector instead of Offset to issue IOs.

Change in V2:
- Remove blockIo2 headers.
- Fix few comment.
- file header, copyright
- Rewrite few comment and error messages
- No more callback
- Improving block read/write, increase to the max size in one request
  (instead of only 8pages)
- Fix lastblock when it's a cdrom
- Do uninitialisation when fail to install fail
- few comment
- Licenses

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

9 years agoOvmfPkg/XenPvBlkDxe: Add BlockFront client.
Samuel Thibault [Wed, 29 Oct 2014 06:51:58 +0000 (06:51 +0000)]
OvmfPkg/XenPvBlkDxe: Add BlockFront client.

This is the code that will do the actual communication between OVMF and
a PV block backend, where the block device lives. The protocol used is
describe in the blkif.h header.

This implementation originally comes from Mini-OS, a part of the Xen
Project.

Change in V4:
- add file header to BlockFront.h (license, copyright, brief desc)

Change in V3:
- Improve comment of XenBusReadUint64.
- Moving blkif.h to this patch
  with the necessary #pragma pack(4) applied for Ia32.
- Add a note about the license in the commit message
- Add "The protocol used is describe in the blkif.h header." in the
  commit message
- Have a mandatory sector-size multiple of 512 or fail to initialize.
- use Sector instead of Offset for IO request.
  with Sector been 512-byte unit.
- print something if EventChannelNotify return an error.

Change in V2:
- trigger CoW is probably not needed on OVMF (as opposed to Mini-OS),
  removed the test.
- comments
- renamed XenbusReadInteger to XenBusReadUint64
- remove callback from IoData, use simple status instead
- return a status from the synchronus io
- Close protocol if blockfront init fail.
- fix few debug print
- Rename XenbusIo to XenBusIo
- XenPvBlkWaitForBackendState will return an error if the new backend
  states is not the expected state.
- Add the license

License: This patch adds some files which are under the MIT license.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Jordan Justen <jordan.l.justen@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16273 6f19259b-4bc3-4df7-8a09-765794883524

9 years agoOvmfPkg/XenPvBlkDxe: Xen PV Block device, initial skeleton
Anthony PERARD [Wed, 29 Oct 2014 06:51:42 +0000 (06:51 +0000)]
OvmfPkg/XenPvBlkDxe: Xen PV Block device, initial skeleton

A ParaVirtualize block driver.

Change in V4:
- Replace the license by the commonly used file header text.
- Add brief description for the driver.

Change in V3:
- enable compilation for Ia32 and Ia32X64
- fix version (driver binding)

Change in V2:
- Add minimal support for controller name
- Remove stuff about BlockIo2
- Little cleanup
- Licenses and file headers
- Rename XenbusIo into XenBusIo

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

9 years agoOvmfPkg/XenBusDxe: Add Event Channel into XenBus protocol.
Anthony PERARD [Wed, 29 Oct 2014 06:51:26 +0000 (06:51 +0000)]
OvmfPkg/XenBusDxe: Add Event Channel into XenBus protocol.

This patch adds three event channel related functions:
- EventChannelAllocate: Allocate an event channel port that can be bind
  from a specified domain.
- EventChannelNotify: Send an event to the remote end of a channel.
- EventChannelClose: Close a local event channel port.

Change in V3:
- eventchannel, update protocol to return error code.
- expand patch description
- Add comments in the XenBus Protocol header.

Change in V2:
- coding style
- adding comment to functions
- Rename Xenbus to XenBus.

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