mirror of
https://github.com/reactos/reactos.git
synced 2024-11-19 21:48:10 +00:00
[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:
parent
49448736a2
commit
abefb827e7
2 changed files with 13 additions and 4 deletions
|
@ -743,6 +743,12 @@ MiRemoveAnyPage(
|
||||||
IN ULONG Color
|
IN ULONG Color
|
||||||
);
|
);
|
||||||
|
|
||||||
|
PFN_NUMBER
|
||||||
|
NTAPI
|
||||||
|
MiRemoveZeroPage(
|
||||||
|
IN ULONG Color
|
||||||
|
);
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
NTAPI
|
NTAPI
|
||||||
MiInsertPageInFreeList(
|
MiInsertPageInFreeList(
|
||||||
|
|
|
@ -1586,15 +1586,18 @@ MiBuildPagedPool(VOID)
|
||||||
//
|
//
|
||||||
OldIrql = KeAcquireQueuedSpinLock(LockQueuePfnLock);
|
OldIrql = KeAcquireQueuedSpinLock(LockQueuePfnLock);
|
||||||
|
|
||||||
//
|
/* Allocate a page and map the first paged pool PDE */
|
||||||
// Allocate a page and map the first paged pool PDE
|
PageFrameIndex = MiRemoveZeroPage(0);
|
||||||
//
|
|
||||||
PageFrameIndex = MmAllocPage(MC_NPPOOL);
|
|
||||||
TempPte.u.Hard.PageFrameNumber = PageFrameIndex;
|
TempPte.u.Hard.PageFrameNumber = PageFrameIndex;
|
||||||
ASSERT(PointerPde->u.Hard.Valid == 0);
|
ASSERT(PointerPde->u.Hard.Valid == 0);
|
||||||
ASSERT(TempPte.u.Hard.Valid == 1);
|
ASSERT(TempPte.u.Hard.Valid == 1);
|
||||||
*PointerPde = TempPte;
|
*PointerPde = TempPte;
|
||||||
|
|
||||||
|
/* Initialize the PFN entry for it */
|
||||||
|
MiInitializePfnForOtherProcess(PageFrameIndex,
|
||||||
|
PointerPde,
|
||||||
|
MmSystemPageDirectory[(PointerPde - (PMMPTE)PDE_BASE) / PDE_COUNT]);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Release the PFN database lock
|
// Release the PFN database lock
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in a new issue