mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 04:13:34 +00:00
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:
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user