]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Library/BaseLib/X86SpeculationBarrier.c
MdePkg/BaseLib: Introduce new SpeculationBarrier API
[mirror_edk2.git] / MdePkg / Library / BaseLib / X86SpeculationBarrier.c
CommitLineData
d9f1cac5
HW
1/** @file\r
2 SpeculationBarrier() function for IA32 and x64.\r
3\r
4 Copyright (C) 2018, Intel Corporation. All rights reserved.<BR>\r
5\r
6 This program and the accompanying materials are licensed and made available\r
7 under the terms and conditions of the BSD License which accompanies this\r
8 distribution. The full text of the license may be found at\r
9 http://opensource.org/licenses/bsd-license.php.\r
10\r
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT\r
12 WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
13\r
14**/\r
15\r
16#include <Library/BaseLib.h>\r
17\r
18/**\r
19 Uses as a barrier to stop speculative execution.\r
20\r
21 Ensures that no later instruction will execute speculatively, until all prior\r
22 instructions have completed.\r
23\r
24**/\r
25VOID\r
26EFIAPI\r
27SpeculationBarrier (\r
28 VOID\r
29 )\r
30{\r
31 AsmLfence ();\r
32}\r