summaryrefslogtreecommitdiff
path: root/MdePkg/Library/BaseCpuLib/X86CpuFlushTlb.c
diff options
context:
space:
mode:
Diffstat (limited to 'MdePkg/Library/BaseCpuLib/X86CpuFlushTlb.c')
-rw-r--r--MdePkg/Library/BaseCpuLib/X86CpuFlushTlb.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/MdePkg/Library/BaseCpuLib/X86CpuFlushTlb.c b/MdePkg/Library/BaseCpuLib/X86CpuFlushTlb.c
new file mode 100644
index 0000000..17a351d
--- /dev/null
+++ b/MdePkg/Library/BaseCpuLib/X86CpuFlushTlb.c
@@ -0,0 +1,25 @@
+/** @file
+ CpuFlushTlb function for Ia32/X64.
+
+ Copyright (c) 2006 - 2022, Intel Corporation. All rights reserved.<BR>
+ Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#include <Library/BaseLib.h>
+
+/**
+ Flushes all the Translation Lookaside Buffers(TLB) entries in a CPU.
+
+ Flushes all the Translation Lookaside Buffers(TLB) entries in a CPU.
+
+**/
+VOID
+EFIAPI
+CpuFlushTlb (
+ VOID
+ )
+{
+ AsmWriteCr3 (AsmReadCr3 ());
+}