"LoaderXIPRom "
};
-PBOOLEAN Mm64BitPhysicalAddress = FALSE;
+BOOLEAN Mm64BitPhysicalAddress = FALSE;
ULONG MmReadClusterSize;
//
// 0 | 1 is on/off paging, 2 is undocumented
//
// 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 working sets */
- MiInitializeUserPfnBitmap();
- MmInitializeMemoryConsumer(MC_USER, MmTrimUserMemory);
-
- /* Initialize the user mode image list */
- InitializeListHead(&MmLoadedUserImageList);
-
- /* Initialize the Loader Lock */
- KeInitializeMutant(&MmSystemLoadLock, FALSE);
-
- /* Reload boot drivers */
- MiReloadBootLoadedDrivers(LoaderBlock);
-
- /* Initialize the loaded module list */
- MiInitializeLoadedModuleList(LoaderBlock);
-
- /* Setup shared user data settings that NT does as well */
- ASSERT(SharedUserData->NumberOfPhysicalPages == 0);
- SharedUserData->NumberOfPhysicalPages = MmNumberOfPhysicalPages;
- SharedUserData->LargePageMinimum = 0;
-
- /* For now, we assume that we're always Server */
- SharedUserData->NtProductType = NtProductServer;
}
else if (Phase == 1)
{
+ MmInitializePagedPool();
+ MiInitializeUserPfnBitmap();
+ MmInitializeMemoryConsumer(MC_USER, MmTrimUserMemory);
MmInitializeRmapList();
MmInitializePageOp();
MmInitSectionImplementation();
TempPte.u.Hard.PageFrameNumber = PageFrameNumber;
*MmSharedUserDataPte = TempPte;
+ /* Setup the memory threshold events */
+ if (!MiInitializeMemoryEvents()) return FALSE;
+
/*
* Unmap low memory
*/
}
else if (Phase == 2)
{
-
+ /* Enough fun for now */
+ extern BOOLEAN AllowPagedPool;
+ AllowPagedPool = FALSE;
}
return TRUE;