2 SpeculationBarrier() function for IA32 and x64.
4 Copyright (C) 2018 - 2019, Intel Corporation. All rights reserved.<BR>
6 SPDX-License-Identifier: BSD-2-Clause-Patent
10 #include <Library/BaseLib.h>
13 Uses as a barrier to stop speculative execution.
15 Ensures that no later instruction will execute speculatively, until all prior
16 instructions have completed.
25 if (PcdGet8 (PcdSpeculationBarrierType
) == 0x01) {
27 } else if (PcdGet8 (PcdSpeculationBarrierType
) == 0x02) {
28 AsmCpuid (0x01, NULL
, NULL
, NULL
, NULL
);