audk/MdePkg/Library/BaseLib
Hao Wu d9f1cac51b MdePkg/BaseLib: Introduce new SpeculationBarrier API
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1417

X86 specific BaseLib API AsmLfence() was introduced to address the Spectre
Variant 1 (CVE-2017-5753) issue. The purpose of this API is to insert
barriers to stop speculative execution. However, the API is highly
architecture (X86) specific, and thus should be avoided using across
generic code.

To address this issue, this patch will add a new BaseLib API called
SpeculationBarrier(). Different architectures will have different
implementations for this API.

For IA32 and x64, the implementation of SpeculationBarrier() will
directly call AsmLfence().

For ARM and AARCH64, this patch will add a temporary empty implementation
as a placeholder. We hope experts in ARM can help to contribute the actual
implementation.

For EBC, similar to the ARM and AARCH64 cases, a temporary empty
implementation is added.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2018-12-25 09:15:34 +08:00
..
AArch64 MdePkg/Library/BaseLib/AArch64: Comment style harmonization 2018-03-20 10:03:05 +08:00
Arm MdePkg/BaseLib: Introduce new SpeculationBarrier API 2018-12-25 09:15:34 +08:00
Ebc MdePkg/BaseLib: Introduce new SpeculationBarrier API 2018-12-25 09:15:34 +08:00
Ia32 MdePkg/BaseLib: Add new AsmLfence API 2018-09-30 13:06:42 +08:00
X64 MdePkg/BaseLib: Add new AsmLfence API 2018-09-30 13:06:42 +08:00
ARShiftU64.c
BaseLib.inf MdePkg/BaseLib: Introduce new SpeculationBarrier API 2018-12-25 09:15:34 +08:00
BaseLib.uni
BaseLibInternals.h MdePkg: Removing ipf which is no longer supported from edk2. 2018-09-25 23:48:21 +08:00
BitField.c MdePkg/BaseLib: Add bit field population calculating methods 2018-07-09 10:29:45 +08:00
CheckSum.c MdePkg: Clean up source files 2018-06-28 11:19:47 +08:00
ChkStkGcc.c MdePkg: Clean up source files 2018-06-28 11:19:47 +08:00
Cpu.c
CpuDeadLoop.c
DivS64x64Remainder.c MdePkg: Clean up source files 2018-06-28 11:19:47 +08:00
DivU64x32.c
DivU64x32Remainder.c
DivU64x64Remainder.c
FilePaths.c MdePkg-BaseLib: Fix PathCleanUpDirectories() issue with "\\..\\.." 2018-10-24 13:36:35 +08:00
GetPowerOfTwo32.c
GetPowerOfTwo64.c
HighBitSet32.c
HighBitSet64.c
LRotU32.c
LRotU64.c
LShiftU64.c
LinkedList.c MdePkg: Clean up source files 2018-06-28 11:19:47 +08:00
LongJump.c
LowBitSet32.c
LowBitSet64.c
Math64.c
ModU64x32.c
MultS64x64.c
MultU64x32.c
MultU64x64.c
RRotU32.c
RRotU64.c
RShiftU64.c
SafeString.c MdePkg/BaseLib: AsciiStrToUnicodeStr(S) not handle EASCII properly 2018-10-23 08:45:00 +08:00
SetJump.c
String.c MdePkg/BaseLib: AsciiStrToUnicodeStr(S) not handle EASCII properly 2018-10-23 08:45:00 +08:00
SwapBytes16.c
SwapBytes32.c
SwapBytes64.c
SwitchStack.c MdePkg: Clean up source files 2018-06-28 11:19:47 +08:00
Unaligned.c
X86DisablePaging32.c
X86DisablePaging64.c
X86EnablePaging32.c
X86EnablePaging64.c
X86FxRestore.c
X86FxSave.c
X86GetInterruptState.c
X86MemoryFence.c
X86Msr.c MdePkg: Clean up source files 2018-06-28 11:19:47 +08:00
X86PatchInstruction.c MdePkg/BaseLib: add PatchInstructionX86() 2018-04-04 16:43:58 +02:00
X86RdRand.c MdePkg/BaseLib: Add one wrapper on RdRand access for parameter check. 2016-11-16 16:49:10 +08:00
X86ReadGdtr.c
X86ReadIdtr.c
X86SpeculationBarrier.c MdePkg/BaseLib: Introduce new SpeculationBarrier API 2018-12-25 09:15:34 +08:00
X86Thunk.c MdePkg: Clean up source files 2018-06-28 11:19:47 +08:00
X86WriteGdtr.c
X86WriteIdtr.c