+++ /dev/null
-#------------------------------------------------------------------------------ ;\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# CpuFlushTlb.Asm\r
-#\r
-# Abstract:\r
-#\r
-# CpuFlushTlb function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-.globl ASM_PFX(CpuFlushTlb)\r
-\r
-#------------------------------------------------------------------------------\r
-# VOID\r
-# EFIAPI\r
-# CpuFlushTlb (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-ASM_PFX(CpuFlushTlb):\r
- movl %cr3, %eax\r
- movl %eax, %cr3\r
- ret\r
+++ /dev/null
-;------------------------------------------------------------------------------ ;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. This program and the accompanying materials\r
-; are licensed and made available under the terms and conditions of the BSD License\r
-; which accompanies this distribution. The full text of the license may be found at\r
-; http://opensource.org/licenses/bsd-license.php\r
-;\r
-; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-;\r
-; Module Name:\r
-;\r
-; CpuFlushTlb.Asm\r
-;\r
-; Abstract:\r
-;\r
-; CpuFlushTlb function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .386p\r
- .model flat,C\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; VOID\r
-; EFIAPI\r
-; CpuFlushTlb (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-CpuFlushTlb PROC\r
- mov eax, cr3\r
- mov cr3, eax ; moving to CR3 flushes TLB\r
- ret\r
-CpuFlushTlb ENDP\r
-\r
- END\r
+++ /dev/null
-/** @file\r
- CpuFlushTlb function.\r
-\r
- Copyright (c) 2006 - 2007, Intel Corporation<BR>\r
- All rights reserved. This program and the accompanying materials\r
- are licensed and made available under the terms and conditions of the BSD License\r
- which accompanies this distribution. The full text of the license may be found at\r
- http://opensource.org/licenses/bsd-license.php\r
-\r
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-**/\r
-\r
-//\r
-// Include common header file for this module.\r
-//\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
-\r
+++ /dev/null
-/// @file\r
-/// CpuFlushTlb() function for Itanium-based architecture.\r
-///\r
-/// Copyright (c) 2006, Intel Corporation\r
-/// All rights reserved. This program and the accompanying materials\r
-/// are licensed and made available under the terms and conditions of the BSD License\r
-/// which accompanies this distribution. The full text of the license may be found at\r
-/// http://opensource.org/licenses/bsd-license.php\r
-///\r
-/// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-/// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-///\r
-/// Module Name: CpuFlushTlb.s\r
-///\r
-///\r
-\r
-.auto\r
-.text\r
-\r
-.globl PalCallStatic\r
-.type PalCallStatic, @function\r
-\r
-.proc CpuFlushTlb\r
-.type CpuFlushTlb, @function\r
-CpuFlushTlb::\r
- alloc loc0 = ar.pfs, 0, 3, 5, 0\r
- mov out0 = 0\r
- mov out1 = 6\r
- mov out2 = 0\r
- mov out3 = 0\r
- mov loc1 = b0\r
- mov out4 = 0\r
- brl.call.sptk b0 = PalCallStatic\r
- mov loc2 = psr // save PSR\r
- mov ar.pfs = loc0\r
- extr.u r14 = r10, 32, 32 // r14 <- count1\r
- rsm 1 << 14 // Disable interrupts\r
- extr.u r15 = r11, 32, 32 // r15 <- stride1\r
- extr.u r10 = r10, 0, 32 // r10 <- count2\r
- add r10 = -1, r10\r
- extr.u r11 = r11, 0, 32 // r11 <- stride2\r
- br.cond.sptk LoopPredicate\r
-LoopOuter:\r
- mov ar.lc = r10 // LC <- count2\r
- mov ar.ec = r0 // EC <- 0\r
-Loop:\r
- ptc.e r9\r
- add r9 = r11, r9 // r9 += stride2\r
- br.ctop.sptk Loop\r
- add r9 = r15, r9 // r9 += stride1\r
-LoopPredicate:\r
- cmp.ne p6 = r0, r14 // count1 == 0?\r
- add r14 = -1, r14\r
-(p6) br.cond.sptk LoopOuter\r
- mov psr.l = loc2\r
- mov b0 = loc1\r
- br.ret.sptk.many b0\r
-.endp\r
+++ /dev/null
-#------------------------------------------------------------------------------ \r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# CpuFlushTlb.Asm\r
-#\r
-# Abstract:\r
-#\r
-# CpuFlushTlb function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-.global _CpuFlushTlb\r
-\r
-#------------------------------------------------------------------------------\r
-# VOID\r
-# EFIAPI\r
-# CpuFlushTlb (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-_CpuFlushTlb:\r
- mov %cr3, %rax\r
- mov %rax, %cr3\r
- ret\r
+++ /dev/null
-;------------------------------------------------------------------------------ ;\r
-; Copyright (c) 2006, Intel Corporation\r
-; All rights reserved. This program and the accompanying materials\r
-; are licensed and made available under the terms and conditions of the BSD License\r
-; which accompanies this distribution. The full text of the license may be found at\r
-; http://opensource.org/licenses/bsd-license.php\r
-;\r
-; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-;\r
-; Module Name:\r
-;\r
-; CpuFlushTlb.Asm\r
-;\r
-; Abstract:\r
-;\r
-; CpuFlushTlb function\r
-;\r
-; Notes:\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- .code\r
-\r
-;------------------------------------------------------------------------------\r
-; VOID\r
-; EFIAPI\r
-; CpuFlushTlb (\r
-; VOID\r
-; );\r
-;------------------------------------------------------------------------------\r
-CpuFlushTlb PROC\r
- mov rax, cr3\r
- mov cr3, rax\r
- ret\r
-CpuFlushTlb ENDP\r
-\r
- END\r