[NTOS]: MmSystemPageDirectory is an array of page directories, not just a value. On x86 there's just one page directory, but that's not the case on other architectures/PAE, so fix this bug.

svn path=/trunk/; revision=47172
This commit is contained in:
Sir Richard 2010-05-12 18:33:18 +00:00
parent c6ddd201c7
commit 133872d3e7
2 changed files with 6 additions and 4 deletions

View file

@ -41,7 +41,7 @@ ULONG MmSessionPoolSize;
ULONG MmSessionImageSize;
PVOID MiSystemViewStart;
ULONG MmSystemViewSize;
PFN_NUMBER MmSystemPageDirectory;
PFN_NUMBER MmSystemPageDirectory[PD_COUNT];
PMMPTE MmSystemPagePtes;
ULONG MmNumberOfSystemPtes;
ULONG MxPfnAllocation;

View file

@ -151,7 +151,7 @@ ULONG MmSystemViewSize;
// map paged pool PDEs into external processes when they fault on a paged pool
// address.
//
PFN_NUMBER MmSystemPageDirectory;
PFN_NUMBER MmSystemPageDirectory[PD_COUNT];
PMMPTE MmSystemPagePtes;
//
@ -1483,7 +1483,8 @@ MiBuildPagedPool(VOID)
// Get the page frame number for the system page directory
//
PointerPte = MiAddressToPte(PDE_BASE);
MmSystemPageDirectory = PFN_FROM_PTE(PointerPte);
ASSERT(PD_COUNT == 1);
MmSystemPageDirectory[0] = PFN_FROM_PTE(PointerPte);
//
// Allocate a system PTE which will hold a copy of the page directory
@ -1500,7 +1501,8 @@ MiBuildPagedPool(VOID)
// way).
//
TempPte = ValidKernelPte;
TempPte.u.Hard.PageFrameNumber = MmSystemPageDirectory;
ASSERT(PD_COUNT == 1);
TempPte.u.Hard.PageFrameNumber = MmSystemPageDirectory[0];
ASSERT(PointerPte->u.Hard.Valid == 0);
ASSERT(TempPte.u.Hard.Valid == 1);
*PointerPte = TempPte;