From b0f334f36aed10217701aea46c2bde7bc26aada6 Mon Sep 17 00:00:00 2001 From: Alex Ionescu Date: Wed, 13 Oct 2004 02:58:59 +0000 Subject: [PATCH] Sorry, forgot to add this. svn path=/trunk/; revision=11285 --- reactos/ntoskrnl/ke/i386/tlbflush.S | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 reactos/ntoskrnl/ke/i386/tlbflush.S diff --git a/reactos/ntoskrnl/ke/i386/tlbflush.S b/reactos/ntoskrnl/ke/i386/tlbflush.S new file mode 100644 index 00000000000..bca998302d6 --- /dev/null +++ b/reactos/ntoskrnl/ke/i386/tlbflush.S @@ -0,0 +1,19 @@ +/* i386-specific implemetation of Translation Buffer Flushing + * Written By: Alex Ionescu + * Reference: IA-32 Intel® Architecture Software Developer's Manual, Volume 3: System Programming Guide, + * Chapter 10 - Memory Cache Control. Section 10.9 - Invalidating the Translation Lookaside Buffers + */ + +.globl _KeFlushCurrentTb@0 +_KeFlushCurrentTb@0: + /* Modifying the PSE, PGE or PAE Flag in CR4 causes the TLB to be flushed */ + andl $0xFFFFFF7F, %eax + movl %eax, %cr4 + orl $0x80, %eax + movl %eax, %cr4 + + ret + + + +