Commit Graph

14952 Commits

Author SHA1 Message Date
Chen Fan d894d8b704 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
2014-11-13 18:26:42 +00:00
Chen Fan cfa2fac1f6 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
2014-11-13 18:26:32 +00:00
Chen Fan 03673ae11e 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
2014-11-13 18:26:23 +00:00
Chen Fan 003973d98c 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
2014-11-13 18:26:13 +00:00
Chen Fan e343f8f7b3 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
2014-11-13 18:26:03 +00:00
Chen Fan 6a26a597a3 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
2014-11-13 18:25:48 +00:00
Jordan Justen 533263ee5a 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
2014-11-13 18:25:29 +00:00
Jordan Justen a1e8986d97 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
2014-11-13 18:25:10 +00:00
Jordan Justen fab82c1873 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
2014-11-13 18:24:59 +00:00
Jordan Justen 1535c888c6 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
2014-11-13 18:24:43 +00:00
Jordan Justen 6022e28cf7 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
2014-11-13 18:24:25 +00:00
Ard Biesheuvel 37ec4d9af7 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
2014-11-13 16:41:51 +00:00
Olivier Martin 77d5dac5c6 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
2014-11-13 11:06:00 +00:00
Jaben Carsey 9b58952287 [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
2014-11-12 21:28:51 +00:00
Jordan Justen 4d3b9d332d 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
2014-11-12 20:33:36 +00:00
Scott Duplichan a23eb77b45 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
2014-11-12 10:01:41 +00:00
Qin Long 2ac68e8b54 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
2014-11-12 08:51:45 +00:00
Yingke Liu bcbdc75535 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
2014-11-12 08:26:03 +00:00
Fu Siyuan 6da5153cfc 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
2014-11-12 05:14:07 +00:00
Star Zeng 09fc7dbb94 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
2014-11-12 03:30:11 +00:00
Star Zeng 84edd20bd0 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
2014-11-12 03:27:48 +00:00
Star Zeng dad83a8c12 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
2014-11-12 03:18:09 +00:00
Qiu Shumin 1531a469eb 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
2014-11-12 01:07:23 +00:00
Daryl McDaniel 6b980b6796 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
2014-11-11 23:15:32 +00:00
Daryl McDaniel 4b2cf923c0 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
2014-11-11 22:56:58 +00:00
Yingke Liu 8200fcfe54 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
2014-11-11 07:33:50 +00:00
Olivier Martin 4a2928934b 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
2014-11-11 00:52:46 +00:00
Olivier Martin 284fb5c811 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
2014-11-11 00:52:11 +00:00
Olivier Martin fb7ea6114a 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
2014-11-11 00:51:11 +00:00
Ronald Cron 6382e5df4e 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
2014-11-11 00:49:50 +00:00
Leif Lindholm bb5420bb2b 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
2014-11-11 00:43:03 +00:00
Daryl McDaniel 2a7e98a8cc 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
2014-11-10 23:05:45 +00:00
Olivier Martin 931b2cff42 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
2014-11-10 10:20:25 +00:00
Ruiyu Ni ace354f10b 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
2014-11-10 08:47:49 +00:00
Feng Tian 1ff1dd0ff9 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
2014-11-10 05:46:21 +00:00
Chao Zhang 33985e3b52 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
2014-11-10 05:01:15 +00:00
Anthony PERARD 6f6c3a1fb6 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
2014-11-08 02:41:35 +00:00
Anthony PERARD 0ae9d5e88e 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
2014-11-08 02:41:28 +00:00
Anthony PERARD 60aafa1bde 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
2014-11-08 02:41:15 +00:00
Anthony PERARD 31c0aa2fd0 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
2014-11-08 02:41:07 +00:00
Anthony PERARD 09c3757bc4 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
2014-11-08 02:40:58 +00:00
Anthony PERARD 8e7ca01de0 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
2014-11-08 02:40:44 +00:00
darylm503 16a5fed658 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
2014-11-07 20:18:01 +00:00
jyao1 c058d59f40 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
2014-11-07 13:43:05 +00:00
Laszlo Ersek 848834cbd1 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
2014-11-06 14:21:21 +00:00
Laszlo Ersek b1220e2820 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
2014-11-06 14:21:15 +00:00
Laszlo Ersek b90ffb9fc8 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
2014-11-06 14:21:09 +00:00
Laszlo Ersek 547222da31 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
2014-11-06 14:21:03 +00:00
Laszlo Ersek 5126ef789d 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
2014-11-06 14:20:58 +00:00
Laszlo Ersek 260ab573d0 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
2014-11-06 14:20:52 +00:00