[NTOS:MM] Make debug code in MmArmInitSystem portable
[reactos.git] / ntoskrnl / mm / ARM3 / mminit.c
index 0ed42eb..44f50b0 100644 (file)
@@ -2118,9 +2118,8 @@ MmArmInitSystem(IN ULONG Phase,
         TestPte = MiProtoPteToPte(&TempPte);
         ASSERT(PointerPte == TestPte);
 
-#ifndef _M_AMD64 // Not working on x64 for obvoius reason
         /* Try a bunch of random addresses near the end of the address space */
-        PointerPte = (PMMPTE)0xFFFC8000;
+        PointerPte = (PMMPTE)((ULONG_PTR)MI_HIGHEST_SYSTEM_ADDRESS - 0x37FFF);
         for (j = 0; j < 20; j += 1)
         {
             MI_MAKE_PROTOTYPE_PTE(&TempPte, PointerPte);
@@ -2130,11 +2129,10 @@ MmArmInitSystem(IN ULONG Phase,
         }
 
         /* Subsection PTEs are always in nonpaged pool, pick a random address to try */
-        PointerPte = (PMMPTE)0xFFAACBB8;
+        PointerPte = (PMMPTE)((ULONG_PTR)MmNonPagedPoolStart + (MmSizeOfNonPagedPoolInBytes / 2));
         MI_MAKE_SUBSECTION_PTE(&TempPte, PointerPte);
         TestPte = MiSubsectionPteToSubsection(&TempPte);
         ASSERT(PointerPte == TestPte);
-#endif
 #endif
 
         /* Loop all 8 standby lists */