diff --git a/reactos/ntoskrnl/mm/ARM3/miarm.h b/reactos/ntoskrnl/mm/ARM3/miarm.h index b5adad3e5fe..759bdabcfc0 100644 --- a/reactos/ntoskrnl/mm/ARM3/miarm.h +++ b/reactos/ntoskrnl/mm/ARM3/miarm.h @@ -743,6 +743,12 @@ MiRemoveAnyPage( IN ULONG Color ); +PFN_NUMBER +NTAPI +MiRemoveZeroPage( + IN ULONG Color +); + VOID NTAPI MiInsertPageInFreeList( diff --git a/reactos/ntoskrnl/mm/ARM3/mminit.c b/reactos/ntoskrnl/mm/ARM3/mminit.c index eba66b18311..f47b3bb8b38 100644 --- a/reactos/ntoskrnl/mm/ARM3/mminit.c +++ b/reactos/ntoskrnl/mm/ARM3/mminit.c @@ -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 //