# CPU Library implemented using ASM functions for IA32, X64, ARM, AARCH64,\r
# PAL CALLs for IPF, and empty functions for EBC.\r
#\r
-# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2007 - 2022, Intel Corporation. All rights reserved.<BR>\r
# Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
# Portions copyright (c) 2011 - 2013, ARM Ltd. All rights reserved.<BR>\r
# Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>\r
\r
[Sources.IA32]\r
Ia32/CpuSleep.c | MSFT\r
- Ia32/CpuFlushTlb.c | MSFT\r
-\r
Ia32/CpuSleep.nasm| INTEL\r
- Ia32/CpuFlushTlb.nasm| INTEL\r
-\r
Ia32/CpuSleepGcc.c | GCC\r
- Ia32/CpuFlushTlbGcc.c | GCC\r
+ X86CpuFlushTlb.c\r
\r
[Sources.X64]\r
- X64/CpuFlushTlb.nasm\r
+ X86CpuFlushTlb.c\r
X64/CpuSleep.nasm\r
\r
\r
+++ /dev/null
-/** @file\r
- CpuFlushTlb function.\r
-\r
- Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
- SPDX-License-Identifier: BSD-2-Clause-Patent\r
-\r
-**/\r
-\r
-/**\r
- Flushes all the Translation Lookaside Buffers(TLB) entries in a CPU.\r
-\r
- Flushes all the Translation Lookaside Buffers(TLB) entries in a CPU.\r
-\r
-**/\r
-VOID\r
-EFIAPI\r
-CpuFlushTlb (\r
- VOID\r
- )\r
-{\r
- _asm {\r
- mov eax, cr3\r
- mov cr3, eax\r
- }\r
-}\r
+++ /dev/null
-;------------------------------------------------------------------------------ ;\r
-; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
-; SPDX-License-Identifier: BSD-2-Clause-Patent\r
-;\r
-; Module Name:\r
-;\r
-; CpuFlushTlb.Asm\r
-;\r
-; Abstract:\r
-;\r
-; CpuFlushTlb function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- SECTION .text\r
-\r
-;------------------------------------------------------------------------------\r
-; VOID\r
-; EFIAPI\r
-; CpuFlushTlb (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-global ASM_PFX(CpuFlushTlb)\r
-ASM_PFX(CpuFlushTlb):\r
- mov eax, cr3\r
- mov cr3, eax ; moving to CR3 flushes TLB\r
- ret\r
-\r
+++ /dev/null
-/** @file\r
- CpuFlushTlb function for Ia32/X64 GCC.\r
-\r
- Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
- Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
- SPDX-License-Identifier: BSD-2-Clause-Patent\r
-\r
-**/\r
-\r
-#include <Library/BaseLib.h>\r
-\r
-/**\r
- Flushes all the Translation Lookaside Buffers(TLB) entries in a CPU.\r
-\r
- Flushes all the Translation Lookaside Buffers(TLB) entries in a CPU.\r
-\r
-**/\r
-VOID\r
-EFIAPI\r
-CpuFlushTlb (\r
- VOID\r
- )\r
-{\r
- AsmWriteCr3 (AsmReadCr3 ());\r
-}\r
+++ /dev/null
-;------------------------------------------------------------------------------ ;\r
-; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
-; SPDX-License-Identifier: BSD-2-Clause-Patent\r
-;\r
-; Module Name:\r
-;\r
-; CpuFlushTlb.Asm\r
-;\r
-; Abstract:\r
-;\r
-; CpuFlushTlb function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- DEFAULT REL\r
- SECTION .text\r
-\r
-;------------------------------------------------------------------------------\r
-; VOID\r
-; EFIAPI\r
-; CpuFlushTlb (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-global ASM_PFX(CpuFlushTlb)\r
-ASM_PFX(CpuFlushTlb):\r
- mov rax, cr3\r
- mov cr3, rax\r
- ret\r
-\r
--- /dev/null
+/** @file\r
+ CpuFlushTlb function for Ia32/X64.\r
+\r
+ Copyright (c) 2006 - 2022, Intel Corporation. All rights reserved.<BR>\r
+ Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
+ SPDX-License-Identifier: BSD-2-Clause-Patent\r
+\r
+**/\r
+\r
+#include <Library/BaseLib.h>\r
+\r
+/**\r
+ Flushes all the Translation Lookaside Buffers(TLB) entries in a CPU.\r
+\r
+ Flushes all the Translation Lookaside Buffers(TLB) entries in a CPU.\r
+\r
+**/\r
+VOID\r
+EFIAPI\r
+CpuFlushTlb (\r
+ VOID\r
+ )\r
+{\r
+ AsmWriteCr3 (AsmReadCr3 ());\r
+}\r