[NTOS]
authorStefan Ginsberg <stefanginsberg@gmail.com>
Wed, 14 Oct 2015 20:42:18 +0000 (20:42 +0000)
committerStefan Ginsberg <stefanginsberg@gmail.com>
Wed, 14 Oct 2015 20:42:18 +0000 (20:42 +0000)
Global pages may not have been enabled when KeFlushCurrentTb is first called, so don't enable them in there.

svn path=/trunk/; revision=69531

reactos/ntoskrnl/ke/i386/cpu.c

index 3d4ea82..ea582d8 100644 (file)
@@ -891,15 +891,15 @@ KeFlushCurrentTb(VOID)
     {
         ULONG Cr4;
 
-        /* Disable PGE */
-        Cr4 = __readcr4() & ~CR4_PGE;
-        __writecr4(Cr4);
+        /* Disable PGE (Note: may not have been enabled yet) */
+        Cr4 = __readcr4();
+        __writecr4(Cr4 & ~CR4_PGE);
 
         /* Flush everything */
         __writecr3(__readcr3());
 
         /* Re-enable PGE */
-        __writecr4(Cr4 | CR4_PGE);
+        __writecr4(Cr4);
     }
     else
     {