TianoCore EDK2
master
Loading...
Searching...
No Matches
X86SpeculationBarrier.c
Go to the documentation of this file.
1
10
#include <
Library/BaseLib.h
>
11
19
VOID
20
EFIAPI
21
SpeculationBarrier
(
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
}
BaseLib.h
NULL
#define NULL
Definition:
Base.h:319
AsmCpuid
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
PcdGet8
#define PcdGet8(TokenName)
Definition:
PcdLib.h:336
SpeculationBarrier
VOID EFIAPI SpeculationBarrier(VOID)
Definition:
X86SpeculationBarrier.c:21
AsmLfence
VOID EFIAPI AsmLfence(VOID)
Definition:
X86UnitTestHost.c:2861
MdePkg
Library
BaseLib
X86SpeculationBarrier.c
Generated on Fri Nov 15 2024 18:01:17 for TianoCore EDK2 by
1.9.6