//
// Protect the PFN database
//
- BaseAddress = MmPfnDatabase[0];
+ BaseAddress = MmPfnDatabase;
Status = MmCreateMemoryArea(MmGetKernelAddressSpace(),
MEMORY_AREA_OWNED_BY_ARM3 | MEMORY_AREA_STATIC,
&BaseAddress,
(ULONG_PTR)MmPagedPoolBase + MmPagedPoolSize,
"Paged Pool");
DPRINT1(" 0x%p - 0x%p\t%s\n",
- MmPfnDatabase[0],
- (ULONG_PTR)MmPfnDatabase[0] + (MxPfnAllocation << PAGE_SHIFT),
+ MmPfnDatabase,
+ (ULONG_PTR)MmPfnDatabase + (MxPfnAllocation << PAGE_SHIFT),
"PFN Database");
DPRINT1(" 0x%p - 0x%p\t%s\n",
MmNonPagedPoolStart,
/* Dump memory descriptors */
if (MiDbgEnableMdDump) MiDbgDumpMemoryDescriptors();
- //
- // Initialize ARMĀ³ in phase 0
- //
+ /* Initialize ARMĀ³ in phase 0 */
MmArmInitSystem(0, KeLoaderBlock);
-
-#if defined(_WINKD_)
- //
- // Everything required for the debugger to read and write
- // physical memory is now set up
- //
- MiDbgReadyForPhysical = TRUE;
-#endif
/* Put the paged pool after the loaded modules */
MmPagedPoolBase = (PVOID)PAGE_ROUND_UP((ULONG_PTR)MmSystemRangeStart +
/* Dump the address space */
MiDbgDumpAddressSpace();
-
- /* Initialize paged pool */
- MmInitializePagedPool();
-
- /* Initialize the loaded module list */
- MiInitializeLoadedModuleList(LoaderBlock);
-
- /* Initialize working sets */
- MiInitializeUserPfnBitmap();
- MmInitializeMemoryConsumer(MC_USER, MmTrimUserMemory);
}
else if (Phase == 1)
{
+ MmInitializePagedPool();
+ MiInitializeUserPfnBitmap();
+ MmInitializeMemoryConsumer(MC_USER, MmTrimUserMemory);
MmInitializeRmapList();
MmInitializePageOp();
MmInitSectionImplementation();
//
// Now get the PTE for shared data, and read the PFN that holds it
//
- PointerPte = MiAddressToPte(KI_USER_SHARED_DATA);
+ PointerPte = MiAddressToPte((PVOID)KI_USER_SHARED_DATA);
ASSERT(PointerPte->u.Hard.Valid == 1);
PageFrameNumber = PFN_FROM_PTE(PointerPte);
- //
- // Now write a copy of it
- //
- MI_MAKE_OWNER_PAGE(&TempPte);
- TempPte.u.Hard.PageFrameNumber = PageFrameNumber;
+ /* Build the PTE and write it */
+ MI_MAKE_HARDWARE_PTE_KERNEL(&TempPte,
+ PointerPte,
+ MM_READONLY,
+ PageFrameNumber);
*MmSharedUserDataPte = TempPte;
/* Setup the memory threshold events */
/* Initialize the balance set manager */
MmInitBsmThread();
}
- else if (Phase == 2)
- {
-
- }
return TRUE;
}