Author: tkreuzer
Date: Sat Nov 14 00:23:53 2009
New Revision: 44143
URL:
http://svn.reactos.org/svn/reactos?rev=44143&view=rev
Log:
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.
Modified:
branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/mm.h
branches/ros-amd64-bringup/reactos/ntoskrnl/mm/mmdbg.c
branches/ros-amd64-bringup/reactos/ntoskrnl/mm/mminit.c
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/mm.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
==============================================================================
--- branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/mm.h [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/mm.h [iso-8859-1] Sat Nov
14 00:23:53 2009
@@ -45,7 +45,8 @@
extern SIZE_T MmPeakCommitment;
extern SIZE_T MmtotalCommitLimitMaximum;
-extern BOOLEAN MiDbgReadyForPhysical;
+extern PVOID MiDebugMapping;
+extern PMMPTE MmDebugPte;
struct _KTRAP_FRAME;
struct _EPROCESS;
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/mm/mmdbg.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
==============================================================================
--- branches/ros-amd64-bringup/reactos/ntoskrnl/mm/mmdbg.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/ntoskrnl/mm/mmdbg.c [iso-8859-1] Sat Nov 14
00:23:53 2009
@@ -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 @@
//
// Check if we are called too early
//
- if (MiDbgReadyForPhysical == FALSE)
+ if (MmDebugPte == NULL)
{
//
// The structures we require aren't initialized yet, fail
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/mm/mminit.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
==============================================================================
--- branches/ros-amd64-bringup/reactos/ntoskrnl/mm/mminit.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/ntoskrnl/mm/mminit.c [iso-8859-1] Sat Nov 14
00:23:53 2009
@@ -388,7 +388,7 @@
// 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 @@
//
// 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);