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