diff --git a/reactos/ntoskrnl/include/internal/mm.h b/reactos/ntoskrnl/include/internal/mm.h index a1fb21bef3b..f74a150e9d7 100644 --- a/reactos/ntoskrnl/include/internal/mm.h +++ b/reactos/ntoskrnl/include/internal/mm.h @@ -46,7 +46,8 @@ extern SIZE_T MmPagedPoolCommit; extern SIZE_T MmPeakCommitment; extern SIZE_T MmtotalCommitLimitMaximum; -extern BOOLEAN MiDbgReadyForPhysical; +extern PVOID MiDebugMapping; +extern PMMPTE MmDebugPte; struct _KTRAP_FRAME; struct _EPROCESS; diff --git a/reactos/ntoskrnl/mm/ARM3/mmdbg.c b/reactos/ntoskrnl/mm/ARM3/mmdbg.c index 41260f224c3..5d761791940 100644 --- a/reactos/ntoskrnl/mm/ARM3/mmdbg.c +++ b/reactos/ntoskrnl/mm/ARM3/mmdbg.c @@ -22,8 +22,8 @@ /* GLOBALS ********************************************************************/ -PMMPTE MmDebugPte = MiAddressToPte(MI_DEBUG_MAPPING); -BOOLEAN MiDbgReadyForPhysical = FALSE; +PVOID MiDebugMapping = MI_DEBUG_MAPPING; +PMMPTE MmDebugPte = NULL; /* FUNCTIONS ******************************************************************/ @@ -49,7 +49,7 @@ MiDbgTranslatePhysicalAddress(IN ULONG64 PhysicalAddress, // // Check if we are called too early // - if (MiDbgReadyForPhysical == FALSE) + if (MmDebugPte == NULL) { // // The structures we require aren't initialized yet, fail diff --git a/reactos/ntoskrnl/mm/ARM3/mminit.c b/reactos/ntoskrnl/mm/ARM3/mminit.c index 3121162615c..5b90e2e02a7 100644 --- a/reactos/ntoskrnl/mm/ARM3/mminit.c +++ b/reactos/ntoskrnl/mm/ARM3/mminit.c @@ -1990,7 +1990,7 @@ MmArmInitSystem(IN ULONG Phase, MiBuildPagedPool(); /* Debugger physical memory support is now ready to be used */ - MiDbgReadyForPhysical = TRUE; + MmDebugPte = MiAddressToPte(MiDebugMapping); /* Initialize the loaded module list */ MiInitializeLoadedModuleList(LoaderBlock); diff --git a/reactos/ntoskrnl/mm/mminit.c b/reactos/ntoskrnl/mm/mminit.c index 83c45f145b9..993c8fa4390 100644 --- a/reactos/ntoskrnl/mm/mminit.c +++ b/reactos/ntoskrnl/mm/mminit.c @@ -409,7 +409,7 @@ MmInitSystem(IN ULONG Phase, // // 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);