[NTOS]: Don't use MmAllocPage for the first paged pool PDE, instead, use MiRemoveZeroPage.

[NTOS]: Use MiInitializePfnForOtherProcess to setup the first paged pool PDE.

svn path=/trunk/; revision=47622
This commit is contained in:
Sir Richard 2010-06-06 14:13:35 +00:00
parent 49448736a2
commit abefb827e7
2 changed files with 13 additions and 4 deletions

View file

@ -743,6 +743,12 @@ MiRemoveAnyPage(
IN ULONG Color
);
PFN_NUMBER
NTAPI
MiRemoveZeroPage(
IN ULONG Color
);
VOID
NTAPI
MiInsertPageInFreeList(

View file

@ -1586,15 +1586,18 @@ MiBuildPagedPool(VOID)
//
OldIrql = KeAcquireQueuedSpinLock(LockQueuePfnLock);
//
// Allocate a page and map the first paged pool PDE
//
PageFrameIndex = MmAllocPage(MC_NPPOOL);
/* Allocate a page and map the first paged pool PDE */
PageFrameIndex = MiRemoveZeroPage(0);
TempPte.u.Hard.PageFrameNumber = PageFrameIndex;
ASSERT(PointerPde->u.Hard.Valid == 0);
ASSERT(TempPte.u.Hard.Valid == 1);
*PointerPde = TempPte;
/* Initialize the PFN entry for it */
MiInitializePfnForOtherProcess(PageFrameIndex,
PointerPde,
MmSystemPageDirectory[(PointerPde - (PMMPTE)PDE_BASE) / PDE_COUNT]);
//
// Release the PFN database lock
//