diff --git a/reactos/ntoskrnl/include/internal/mm.h b/reactos/ntoskrnl/include/internal/mm.h index bf2e87d3c8e..eaed9f4ab43 100644 --- a/reactos/ntoskrnl/include/internal/mm.h +++ b/reactos/ntoskrnl/include/internal/mm.h @@ -45,7 +45,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/mmdbg.c b/reactos/ntoskrnl/mm/mmdbg.c index 31cc57bd525..a79bf4ac4e9 100644 --- a/reactos/ntoskrnl/mm/mmdbg.c +++ b/reactos/ntoskrnl/mm/mmdbg.c @@ -21,8 +21,8 @@ /* GLOBALS ********************************************************************/ -PMMPTE MmDebugPte = MiAddressToPte(MI_DEBUG_MAPPING); -BOOLEAN MiDbgReadyForPhysical = FALSE; +PVOID MiDebugMapping = MI_DEBUG_MAPPING; +PMMPTE MmDebugPte = NULL; /* FUNCTIONS ******************************************************************/ @@ -48,7 +48,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/mminit.c b/reactos/ntoskrnl/mm/mminit.c index d964c22388b..647db5c7d55 100644 --- a/reactos/ntoskrnl/mm/mminit.c +++ b/reactos/ntoskrnl/mm/mminit.c @@ -388,7 +388,7 @@ MmInitSystem(IN ULONG Phase, // Everything required for the debugger to read and write // physical memory is now set up // - MiDbgReadyForPhysical = TRUE; + MmDebugPte = MiAddressToPte(MiDebugMapping); #endif /* Put the paged pool after the loaded modules */ @@ -508,7 +508,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);