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=/branches/ros-amd64-bringup/; revision=44143
This commit is contained in:
Timo Kreuzer
2009-11-13 23:23:53 +00:00
parent e9a4673307
commit bb7f766eff
3 changed files with 7 additions and 6 deletions
+2 -1
View File
@@ -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;
+3 -3
View File
@@ -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
+2 -2
View File
@@ -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);