2 * PROJECT: ReactOS Kernel
3 * LICENSE: GPL - See COPYING in the top level directory
4 * FILE: ntoskrnl/ke/i386/patpge.c
5 * PURPOSE: Support for PAT and PGE (Large Pages)
6 * PROGRAMMERS: Alex Ionescu (alex.ionescu@reactos.org)
9 /* INCLUDES ******************************************************************/
15 /* FUNCTIONS *****************************************************************/
20 Ki386EnableGlobalPage(IN
volatile ULONG_PTR Context
)
22 volatile PLONG Count
= (PLONG
)Context
;
25 /* Disable interrupts */
28 /* Decrease CPU Count and loop until it's reached 0 */
29 do {InterlockedDecrement(Count
);} while (!*Count
);
31 /* Now check if this is the Boot CPU */
32 if (!KeGetPcr()->Number
)
34 /* It is.FIXME: Patch KeFlushCurrentTb */
37 /* Now get CR4 and make sure PGE is masked out */
39 __writecr4(Cr4
& ~CR4_PGE
);
46 DPRINT("Global page support detected but not yet taken advantage of\n");
47 //__writecr4(Cr4 | CR4_PGE);
49 /* Restore interrupts */
59 /* FIXME: Support this */
60 DPRINT("PAT support detected but not yet taken advantage of\n");