TianoCore EDK2 master
Loading...
Searching...
No Matches
X86SpeculationBarrier.c
Go to the documentation of this file.
1
10#include <Library/BaseLib.h>
11
19VOID
20EFIAPI
22 VOID
23 )
24{
25 if (PcdGet8 (PcdSpeculationBarrierType) == 0x01) {
26 AsmLfence ();
27 } else if (PcdGet8 (PcdSpeculationBarrierType) == 0x02) {
28 AsmCpuid (0x01, NULL, NULL, NULL, NULL);
29 }
30}
#define NULL
Definition: Base.h:319
UINT32 EFIAPI AsmCpuid(IN UINT32 Index, OUT UINT32 *RegisterEax OPTIONAL, OUT UINT32 *RegisterEbx OPTIONAL, OUT UINT32 *RegisterEcx OPTIONAL, OUT UINT32 *RegisterEdx OPTIONAL)
Definition: CpuId.c:36
#define PcdGet8(TokenName)
Definition: PcdLib.h:336
VOID EFIAPI SpeculationBarrier(VOID)
VOID EFIAPI AsmLfence(VOID)