[NTOS:MM]
authorThomas Faber <thomas.faber@reactos.org>
Tue, 9 Aug 2016 07:48:09 +0000 (07:48 +0000)
committerThomas Faber <thomas.faber@reactos.org>
Tue, 9 Aug 2016 07:48:09 +0000 (07:48 +0000)
- Correctly reserve the whole 4 MB of HAL address space instead of just 2 pages
CORE-11533

svn path=/trunk/; revision=72163

reactos/ntoskrnl/mm/mminit.c

index 16e23de..76cf00e 100644 (file)
@@ -100,22 +100,21 @@ MiInitSystemMemoryAreas(VOID)
     // Paged pool
     MiCreateArm3StaticMemoryArea(MmPagedPoolStart, MmSizeOfPagedPoolInBytes, FALSE);
 
+    // Debugger mapping
+    MiCreateArm3StaticMemoryArea(MI_DEBUG_MAPPING, PAGE_SIZE, FALSE);
+
+#if defined(_X86_)
+    // Reserved HAL area (includes KUSER_SHARED_DATA and KPCR)
+    MiCreateArm3StaticMemoryArea((PVOID)MM_HAL_VA_START, MM_HAL_VA_END - MM_HAL_VA_START + 1, FALSE);
+#else /* _X86_ */
 #ifndef _M_AMD64
     // KPCR, one page per CPU. Only for 32-bit kernel.
     MiCreateArm3StaticMemoryArea(PCR, PAGE_SIZE * KeNumberProcessors, FALSE);
-#endif
+#endif /* _M_AMD64 */
 
     // KUSER_SHARED_DATA
     MiCreateArm3StaticMemoryArea((PVOID)KI_USER_SHARED_DATA, PAGE_SIZE, FALSE);
-
-    // Debugger mapping
-    MiCreateArm3StaticMemoryArea(MI_DEBUG_MAPPING, PAGE_SIZE, FALSE);
-
-#if defined(_X86_)
-    // Reserve the 2 pages we currently make use of for HAL mappings.
-    // TODO: Remove hard-coded constant and replace with a define.
-    MiCreateArm3StaticMemoryArea((PVOID)0xFFC00000, PAGE_SIZE * 2, FALSE);
-#endif
+#endif /* _X86_ */
 }
 
 VOID