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 *****************************************************************/
19 Ki386EnableGlobalPage(IN
volatile ULONG_PTR Context
)
21 volatile PLONG Count
= (PLONG
)Context
;
24 /* Disable interrupts */
27 /* Decrease CPU Count and loop until it's reached 0 */
28 do {InterlockedDecrement(Count
);} while (!*Count
);
30 /* Now check if this is the Boot CPU */
31 if (!KeGetPcr()->Number
)
33 /* It is.FIXME: Patch KeFlushCurrentTb */
36 /* Now get CR4 and make sure PGE is masked out */
38 __writecr4(Cr4
& ~CR4_PGE
);
45 DPRINT1("Global page support detected but not yet taken advantage of\n");
46 //__writecr4(Cr4 | CR4_PGE);
48 /* Restore interrupts */
57 /* FIXME: Support this */
58 DPRINT1("PAT support detected but not yet taken advantage of\n");