Initialize MmDebugPte from MiDebugMapping variable instead of using MiAddressToPte for a constant initializer. This way the page can be set dynamically. Use MmDebugPte to determine if ready for mapping physical pages.
svn path=/trunk/; revision=48079
extern SIZE_T MmPeakCommitment;
extern SIZE_T MmtotalCommitLimitMaximum;
-extern BOOLEAN MiDbgReadyForPhysical;
+extern PVOID MiDebugMapping;
+extern PMMPTE MmDebugPte;
struct _KTRAP_FRAME;
struct _EPROCESS;
/* GLOBALS ********************************************************************/
-PMMPTE MmDebugPte = MiAddressToPte(MI_DEBUG_MAPPING);
-BOOLEAN MiDbgReadyForPhysical = FALSE;
+PVOID MiDebugMapping = MI_DEBUG_MAPPING;
+PMMPTE MmDebugPte = NULL;
/* FUNCTIONS ******************************************************************/
//
// Check if we are called too early
//
- if (MiDbgReadyForPhysical == FALSE)
+ if (MmDebugPte == NULL)
{
//
// The structures we require aren't initialized yet, fail
MiBuildPagedPool();
/* Debugger physical memory support is now ready to be used */
- MiDbgReadyForPhysical = TRUE;
+ MmDebugPte = MiAddressToPte(MiDebugMapping);
/* Initialize the loaded module list */
MiInitializeLoadedModuleList(LoaderBlock);
//
// 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);