audk/MdePkg/Library/BaseLib/Ia32
Hao Wu 2ecd829972 MdePkg/BaseLib: Add new AsmLfence API
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1193

This commit will add a new BaseLib API AsmLfence(). This API will perform
a serializing operation on all load-from-memory instructions that were
issued prior to the call of this function. Please note that this API is
only available on IA-32 and x64.

The purpose of adding this API is to mitigate of the [CVE-2017-5753]
Bounds Check Bypass issue when untrusted data are being processed within
SMM. More details can be referred at the 'Bounds check bypass mitigation'
section at the below link:

https://software.intel.com/security-software-guidance/insights/host-firmware-speculative-execution-side-channel-mitigation

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Regression-tested-by: Laszlo Ersek <lersek@redhat.com>
2018-09-30 13:06:42 +08:00
..
ARShiftU64.S MdePkg: Clean up source files 2018-06-28 11:19:47 +08:00
ARShiftU64.c
ARShiftU64.nasm MdePkg BaseLib: Convert Ia32/ARShiftU64.asm to NASM 2016-06-28 09:49:24 +08:00
CpuBreakpoint.c MdePkg: Fix MSFT C4255 warning 2017-11-14 18:18:48 +08:00
CpuBreakpoint.nasm MdePkg/BaseLib: Remove the unnecessary '_' before library APIs in ASM/NASM 2016-10-18 20:12:39 +08:00
CpuId.S
CpuId.c
CpuId.nasm MdePkg BaseLib: Convert Ia32/CpuId.asm to NASM 2016-06-28 09:49:22 +08:00
CpuIdEx.S
CpuIdEx.c
CpuIdEx.nasm MdePkg BaseLib: Convert Ia32/CpuIdEx.asm to NASM 2016-06-28 09:49:21 +08:00
CpuPause.c
CpuPause.nasm MdePkg BaseLib: Convert Ia32/CpuPause.asm to NASM 2016-06-28 09:49:21 +08:00
DisableCache.S
DisableCache.c
DisableCache.nasm MdePkg BaseLib: Convert Ia32/DisableCache.asm to NASM 2016-06-28 09:49:25 +08:00
DisableInterrupts.c
DisableInterrupts.nasm MdePkg BaseLib: Convert Ia32/DisableInterrupts.asm to NASM 2016-06-28 09:49:20 +08:00
DisablePaging32.S
DisablePaging32.c
DisablePaging32.nasm MdePkg BaseLib: Convert Ia32/DisablePaging32.asm to NASM 2016-06-28 09:51:52 +08:00
DivS64x64Remainder.c
DivU64x32.S
DivU64x32.c
DivU64x32.nasm MdePkg BaseLib: Convert Ia32/DivU64x32.asm to NASM 2016-06-28 09:49:19 +08:00
DivU64x32Remainder.S
DivU64x32Remainder.c
DivU64x32Remainder.nasm MdePkg BaseLib: Convert Ia32/DivU64x32Remainder.asm to NASM 2016-06-28 09:49:18 +08:00
DivU64x64Remainder.S MdePkg: Clean up source files 2018-06-28 11:19:47 +08:00
DivU64x64Remainder.nasm MdePkg BaseLib: Convert Ia32/DivU64x64Remainder.asm to NASM 2016-06-28 09:48:25 +08:00
EnableCache.S MdePkg: Clean up source files 2018-06-28 11:19:47 +08:00
EnableCache.c
EnableCache.nasm MdePkg BaseLib: Convert Ia32/EnableCache.asm to NASM 2016-06-28 09:49:24 +08:00
EnableDisableInterrupts.S
EnableDisableInterrupts.c
EnableDisableInterrupts.nasm MdePkg/BaseLib: Remove the unnecessary '_' before library APIs in ASM/NASM 2016-10-18 20:12:39 +08:00
EnableInterrupts.c
EnableInterrupts.nasm MdePkg/BaseLib: Remove the unnecessary '_' before library APIs in ASM/NASM 2016-10-18 20:12:39 +08:00
EnablePaging32.S
EnablePaging32.c
EnablePaging32.nasm MdePkg BaseLib: Convert Ia32/EnablePaging32.asm to NASM 2016-06-28 09:49:16 +08:00
EnablePaging64.S
EnablePaging64.nasm MdePkg BaseLib: Convert Ia32/EnablePaging64.asm to NASM 2016-06-28 09:48:26 +08:00
FlushCacheLine.c MdePkg: Clean up source files 2018-06-28 11:19:47 +08:00
FlushCacheLine.nasm MdePkg BaseLib: Convert Ia32/FlushCacheLine.asm to NASM 2016-06-28 09:49:16 +08:00
FxRestore.c
FxRestore.nasm MdePkg BaseLib: Convert Ia32/FxRestore.asm to NASM 2016-06-28 09:49:14 +08:00
FxSave.c
FxSave.nasm MdePkg BaseLib: Convert Ia32/FxSave.asm to NASM 2016-06-28 09:49:15 +08:00
GccInline.c MdePkg: Clean up source files 2018-06-28 11:19:47 +08:00
InternalSwitchStack.S MdePkg: Clean up source files 2018-06-28 11:19:47 +08:00
InternalSwitchStack.c
InternalSwitchStack.nasm MdePkg BaseLib: Add the missing nasm source file InternalSwitchStack.nasm 2016-07-20 13:24:30 +08:00
Invd.c
Invd.nasm MdePkg/BaseLib: Remove the unnecessary '_' before library APIs in ASM/NASM 2016-10-18 20:12:39 +08:00
LRotU64.S MdePkg: Clean up source files 2018-06-28 11:19:47 +08:00
LRotU64.c
LRotU64.nasm MdePkg BaseLib: Convert Ia32/LRotU64.asm to NASM 2016-06-28 09:49:13 +08:00
LShiftU64.S MdePkg: Clean up source files 2018-06-28 11:19:47 +08:00
LShiftU64.c
LShiftU64.nasm MdePkg BaseLib: Convert Ia32/LShiftU64.asm to NASM 2016-06-28 09:49:12 +08:00
Lfence.nasm MdePkg/BaseLib: Add new AsmLfence API 2018-09-30 13:06:42 +08:00
LongJump.S
LongJump.c
LongJump.nasm MdePkg BaseLib: Convert Ia32/LongJump.asm to NASM 2016-06-28 09:49:13 +08:00
ModU64x32.S
ModU64x32.c
ModU64x32.nasm MdePkg BaseLib: Convert Ia32/ModU64x32.asm to NASM 2016-06-28 09:49:10 +08:00
Monitor.S
Monitor.c
Monitor.nasm MdePkg BaseLib: Convert Ia32/Monitor.asm to NASM 2016-06-28 09:49:10 +08:00
MultU64x32.S
MultU64x32.c
MultU64x32.nasm MdePkg BaseLib: Convert Ia32/MultU64x32.asm to NASM 2016-06-28 09:49:11 +08:00
MultU64x64.S MdePkg: Clean up source files 2018-06-28 11:19:47 +08:00
MultU64x64.c
MultU64x64.nasm MdePkg BaseLib: Convert Ia32/MultU64x64.asm to NASM 2016-06-28 09:49:11 +08:00
Mwait.S
Mwait.c
Mwait.nasm MdePkg BaseLib: Convert Ia32/Mwait.asm to NASM 2016-06-28 09:49:09 +08:00
Non-existing.c
RRotU64.S MdePkg: Clean up source files 2018-06-28 11:19:47 +08:00
RRotU64.c
RRotU64.nasm MdePkg BaseLib: Convert Ia32/RRotU64.asm to NASM 2016-06-28 09:48:46 +08:00
RShiftU64.S MdePkg: Clean up source files 2018-06-28 11:19:47 +08:00
RShiftU64.c
RShiftU64.nasm MdePkg BaseLib: Convert Ia32/RShiftU64.asm to NASM 2016-06-28 09:48:46 +08:00
RdRand.S MdePkg/BaseLib: Add one wrapper on RdRand access for parameter check. 2016-11-16 16:49:10 +08:00
RdRand.nasm MdePkg/BaseLib: Add one wrapper on RdRand access for parameter check. 2016-11-16 16:49:10 +08:00
ReadCr0.c
ReadCr0.nasm MdePkg BaseLib: Convert Ia32/ReadCr0.asm to NASM 2016-06-28 09:49:08 +08:00
ReadCr2.c
ReadCr2.nasm MdePkg BaseLib: Convert Ia32/ReadCr2.asm to NASM 2016-06-28 09:49:07 +08:00
ReadCr3.c
ReadCr3.nasm MdePkg BaseLib: Convert Ia32/ReadCr3.asm to NASM 2016-06-28 09:49:07 +08:00
ReadCr4.c
ReadCr4.nasm MdePkg BaseLib: Convert Ia32/ReadCr4.asm to NASM 2016-06-28 09:49:06 +08:00
ReadCs.c
ReadCs.nasm MdePkg BaseLib: Convert Ia32/ReadCs.asm to NASM 2016-06-28 09:48:54 +08:00
ReadDr0.c
ReadDr0.nasm MdePkg BaseLib: Convert Ia32/ReadDr0.asm to NASM 2016-06-28 09:49:05 +08:00
ReadDr1.c
ReadDr1.nasm MdePkg BaseLib: Convert Ia32/ReadDr1.asm to NASM 2016-06-28 09:49:05 +08:00
ReadDr2.c
ReadDr2.nasm MdePkg BaseLib: Convert Ia32/ReadDr2.asm to NASM 2016-06-28 09:49:04 +08:00
ReadDr3.c
ReadDr3.nasm MdePkg BaseLib: Convert Ia32/ReadDr3.asm to NASM 2016-06-28 09:49:03 +08:00
ReadDr4.c
ReadDr4.nasm MdePkg BaseLib: Convert Ia32/ReadDr4.asm to NASM 2016-06-28 09:49:03 +08:00
ReadDr5.c
ReadDr5.nasm MdePkg BaseLib: Convert Ia32/ReadDr5.asm to NASM 2016-06-28 09:49:02 +08:00
ReadDr6.c
ReadDr6.nasm MdePkg BaseLib: Convert Ia32/ReadDr6.asm to NASM 2016-06-28 09:49:02 +08:00
ReadDr7.c
ReadDr7.nasm MdePkg BaseLib: Convert Ia32/ReadDr7.asm to NASM 2016-06-28 09:49:01 +08:00
ReadDs.c
ReadDs.nasm MdePkg BaseLib: Convert Ia32/ReadDs.asm to NASM 2016-06-28 09:48:53 +08:00
ReadEflags.c
ReadEflags.nasm MdePkg BaseLib: Convert Ia32/ReadEflags.asm to NASM 2016-06-28 09:49:00 +08:00
ReadEs.c
ReadEs.nasm MdePkg BaseLib: Convert Ia32/ReadEs.asm to NASM 2016-06-28 09:48:52 +08:00
ReadFs.c
ReadFs.nasm MdePkg BaseLib: Convert Ia32/ReadFs.asm to NASM 2016-06-28 09:48:52 +08:00
ReadGdtr.c
ReadGdtr.nasm MdePkg BaseLib: Convert Ia32/ReadGdtr.asm to NASM 2016-06-28 09:48:49 +08:00
ReadGs.c
ReadGs.nasm MdePkg BaseLib: Convert Ia32/ReadGs.asm to NASM 2016-06-28 09:48:51 +08:00
ReadIdtr.c
ReadIdtr.nasm MdePkg BaseLib: Convert Ia32/ReadIdtr.asm to NASM 2016-06-28 09:48:49 +08:00
ReadLdtr.c
ReadLdtr.nasm MdePkg BaseLib: Convert Ia32/ReadLdtr.asm to NASM 2016-06-28 09:48:48 +08:00
ReadMm0.c
ReadMm0.nasm MdePkg BaseLib: Convert Ia32/ReadMm0.asm to NASM 2016-06-28 09:49:00 +08:00
ReadMm1.c
ReadMm1.nasm MdePkg BaseLib: Convert Ia32/ReadMm1.asm to NASM 2016-06-28 09:48:59 +08:00
ReadMm2.c
ReadMm2.nasm MdePkg BaseLib: Convert Ia32/ReadMm2.asm to NASM 2016-06-28 09:48:58 +08:00
ReadMm3.c
ReadMm3.nasm MdePkg BaseLib: Convert Ia32/ReadMm3.asm to NASM 2016-06-28 09:48:58 +08:00
ReadMm4.c
ReadMm4.nasm MdePkg BaseLib: Convert Ia32/ReadMm4.asm to NASM 2016-06-28 09:48:57 +08:00
ReadMm5.c
ReadMm5.nasm MdePkg BaseLib: Convert Ia32/ReadMm5.asm to NASM 2016-06-28 09:48:56 +08:00
ReadMm6.c
ReadMm6.nasm MdePkg BaseLib: Convert Ia32/ReadMm6.asm to NASM 2016-06-28 09:48:56 +08:00
ReadMm7.c
ReadMm7.nasm MdePkg BaseLib: Convert Ia32/ReadMm7.asm to NASM 2016-06-28 09:48:55 +08:00
ReadMsr64.c
ReadMsr64.nasm MdePkg BaseLib: Convert Ia32/ReadMsr64.asm to NASM 2016-06-28 09:48:54 +08:00
ReadPmc.c
ReadPmc.nasm MdePkg BaseLib: Convert Ia32/ReadPmc.asm to NASM 2016-06-28 09:48:47 +08:00
ReadSs.c
ReadSs.nasm MdePkg BaseLib: Convert Ia32/ReadSs.asm to NASM 2016-06-28 09:48:51 +08:00
ReadTr.c
ReadTr.nasm MdePkg BaseLib: Convert Ia32/ReadTr.asm to NASM 2016-06-28 09:48:50 +08:00
ReadTsc.c
ReadTsc.nasm MdePkg BaseLib: Convert Ia32/ReadTsc.asm to NASM 2016-06-28 09:48:47 +08:00
SetJump.S
SetJump.c MdePkg/BaseLib: add attribute 'RETURNS_TWICE' to SetJump 2018-01-10 11:42:17 +08:00
SetJump.nasm MdePkg BaseLib: Convert Ia32/SetJump.asm to NASM 2016-06-28 09:48:45 +08:00
SwapBytes64.S
SwapBytes64.c
SwapBytes64.nasm MdePkg BaseLib: Convert Ia32/SwapBytes64.asm to NASM 2016-06-28 09:48:44 +08:00
Thunk16.S
Thunk16.nasm
Wbinvd.c
Wbinvd.nasm MdePkg BaseLib: Convert Ia32/Wbinvd.asm to NASM 2016-06-28 09:48:28 +08:00
WriteCr0.c
WriteCr0.nasm MdePkg BaseLib: Convert Ia32/WriteCr0.asm to NASM 2016-06-28 09:48:43 +08:00
WriteCr2.c
WriteCr2.nasm MdePkg BaseLib: Convert Ia32/WriteCr2.asm to NASM 2016-06-28 09:48:42 +08:00
WriteCr3.c
WriteCr3.nasm MdePkg BaseLib: Convert Ia32/WriteCr3.asm to NASM 2016-06-28 09:48:41 +08:00
WriteCr4.c
WriteCr4.nasm MdePkg BaseLib: Convert Ia32/WriteCr4.asm to NASM 2016-06-28 09:48:41 +08:00
WriteDr0.c
WriteDr0.nasm MdePkg BaseLib: Convert Ia32/WriteDr0.asm to NASM 2016-06-28 09:48:40 +08:00
WriteDr1.c
WriteDr1.nasm MdePkg BaseLib: Convert Ia32/WriteDr1.asm to NASM 2016-06-28 09:48:39 +08:00
WriteDr2.c
WriteDr2.nasm MdePkg BaseLib: Convert Ia32/WriteDr2.asm to NASM 2016-06-28 09:48:39 +08:00
WriteDr3.c
WriteDr3.nasm MdePkg BaseLib: Convert Ia32/WriteDr3.asm to NASM 2016-06-28 09:48:38 +08:00
WriteDr4.c
WriteDr4.nasm MdePkg BaseLib: Convert Ia32/WriteDr4.asm to NASM 2016-06-28 09:48:38 +08:00
WriteDr5.c
WriteDr5.nasm MdePkg BaseLib: Convert Ia32/WriteDr5.asm to NASM 2016-06-28 09:48:37 +08:00
WriteDr6.c
WriteDr6.nasm MdePkg BaseLib: Convert Ia32/WriteDr6.asm to NASM 2016-06-28 09:48:36 +08:00
WriteDr7.c
WriteDr7.nasm MdePkg BaseLib: Convert Ia32/WriteDr7.asm to NASM 2016-06-28 09:48:36 +08:00
WriteGdtr.c
WriteGdtr.nasm MdePkg BaseLib: Convert Ia32/WriteGdtr.asm to NASM 2016-06-28 09:48:35 +08:00
WriteIdtr.c
WriteIdtr.nasm MdePkg BaseLib: Convert Ia32/WriteIdtr.asm to NASM 2016-06-28 09:48:34 +08:00
WriteLdtr.c
WriteLdtr.nasm MdePkg/BaseLib: Remove the unnecessary '_' before library APIs in ASM/NASM 2016-10-18 20:12:39 +08:00
WriteMm0.c
WriteMm0.nasm MdePkg BaseLib: Convert Ia32/WriteMm0.asm to NASM 2016-06-28 09:48:33 +08:00
WriteMm1.c
WriteMm1.nasm MdePkg BaseLib: Convert Ia32/WriteMm1.asm to NASM 2016-06-28 09:48:32 +08:00
WriteMm2.c
WriteMm2.nasm MdePkg BaseLib: Convert Ia32/WriteMm2.asm to NASM 2016-06-28 09:48:31 +08:00
WriteMm3.c
WriteMm3.nasm MdePkg BaseLib: Convert Ia32/WriteMm3.asm to NASM 2016-06-28 09:48:31 +08:00
WriteMm4.c
WriteMm4.nasm MdePkg BaseLib: Convert Ia32/WriteMm4.asm to NASM 2016-06-28 09:48:30 +08:00
WriteMm5.c
WriteMm5.nasm MdePkg BaseLib: Convert Ia32/WriteMm5.asm to NASM 2016-06-28 09:48:29 +08:00
WriteMm6.c
WriteMm6.nasm MdePkg BaseLib: Convert Ia32/WriteMm6.asm to NASM 2016-06-28 09:48:29 +08:00
WriteMm7.c
WriteMm7.nasm MdePkg BaseLib: Convert Ia32/WriteMm7.asm to NASM 2016-06-28 09:48:28 +08:00
WriteMsr64.c
WriteMsr64.nasm MdePkg BaseLib: Convert Ia32/WriteMsr64.asm to NASM 2016-06-28 09:48:43 +08:00
WriteTr.nasm MdePkg/BaseLib: Add stack switch related definitions for IA32 2017-12-08 14:38:48 +08:00