VOID\r
);\r
\r
+\r
+/**\r
+ Uses as a barrier to stop speculative execution.\r
+\r
+ Ensures that no later instruction will execute speculatively, until all prior\r
+ instructions have completed.\r
+\r
+**/\r
+VOID\r
+EFIAPI\r
+SpeculationBarrier (\r
+ VOID\r
+ );\r
+\r
+\r
#if defined (MDE_CPU_IA32) || defined (MDE_CPU_X64)\r
///\r
/// IA32 and x64 Specific Functions.\r
--- /dev/null
+/** @file\r
+ SpeculationBarrier() function for ARM.\r
+\r
+ Copyright (C) 2018, Intel Corporation. All rights reserved.<BR>\r
+\r
+ This program and the accompanying materials are licensed and made available\r
+ under the terms and conditions of the BSD License which accompanies this\r
+ distribution. The full text of the license may be found at\r
+ http://opensource.org/licenses/bsd-license.php.\r
+\r
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT\r
+ WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+\r
+\r
+/**\r
+ Uses as a barrier to stop speculative execution.\r
+\r
+ Ensures that no later instruction will execute speculatively, until all prior\r
+ instructions have completed.\r
+\r
+**/\r
+VOID\r
+EFIAPI\r
+SpeculationBarrier (\r
+ VOID\r
+ )\r
+{\r
+}\r
X86DisablePaging32.c\r
X86RdRand.c\r
X86PatchInstruction.c\r
+ X86SpeculationBarrier.c\r
\r
[Sources.X64]\r
X64/Thunk16.nasm\r
X86DisablePaging32.c\r
X86RdRand.c\r
X86PatchInstruction.c\r
+ X86SpeculationBarrier.c\r
X64/GccInline.c | GCC\r
X64/Thunk16.S | XCODE\r
X64/SwitchStack.nasm| GCC\r
Ebc/CpuBreakpoint.c\r
Ebc/SetJumpLongJump.c\r
Ebc/SwitchStack.c\r
+ Ebc/SpeculationBarrier.c\r
Unaligned.c\r
Math64.c\r
\r
[Sources.ARM]\r
Arm/InternalSwitchStack.c\r
Arm/Unaligned.c\r
+ Arm/SpeculationBarrier.c\r
Math64.c | RVCT\r
Math64.c | MSFT\r
\r
[Sources.AARCH64]\r
Arm/InternalSwitchStack.c\r
Arm/Unaligned.c\r
+ Arm/SpeculationBarrier.c\r
Math64.c\r
\r
AArch64/MemoryFence.S | GCC\r
--- /dev/null
+/** @file\r
+ SpeculationBarrier() function for EBC.\r
+\r
+ Copyright (C) 2018, Intel Corporation. All rights reserved.<BR>\r
+\r
+ This program and the accompanying materials are licensed and made available\r
+ under the terms and conditions of the BSD License which accompanies this\r
+ distribution. The full text of the license may be found at\r
+ http://opensource.org/licenses/bsd-license.php.\r
+\r
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT\r
+ WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+\r
+\r
+/**\r
+ Uses as a barrier to stop speculative execution.\r
+\r
+ Ensures that no later instruction will execute speculatively, until all prior\r
+ instructions have completed.\r
+\r
+**/\r
+VOID\r
+EFIAPI\r
+SpeculationBarrier (\r
+ VOID\r
+ )\r
+{\r
+}\r
--- /dev/null
+/** @file\r
+ SpeculationBarrier() function for IA32 and x64.\r
+\r
+ Copyright (C) 2018, Intel Corporation. All rights reserved.<BR>\r
+\r
+ This program and the accompanying materials are licensed and made available\r
+ under the terms and conditions of the BSD License which accompanies this\r
+ distribution. The full text of the license may be found at\r
+ http://opensource.org/licenses/bsd-license.php.\r
+\r
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT\r
+ WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+\r
+#include <Library/BaseLib.h>\r
+\r
+/**\r
+ Uses as a barrier to stop speculative execution.\r
+\r
+ Ensures that no later instruction will execute speculatively, until all prior\r
+ instructions have completed.\r
+\r
+**/\r
+VOID\r
+EFIAPI\r
+SpeculationBarrier (\r
+ VOID\r
+ )\r
+{\r
+ AsmLfence ();\r
+}\r