Author: sir_richard
Date: Wed May 12 20:42:05 2010
New Revision: 47175
URL:
http://svn.reactos.org/svn/reactos?rev=47175&view=rev
Log:
[NTOS]: Fix 4MB assumptions and use PDE_MAPPED_VA instead, which accurately describes the
address space mapped by a PDE (which is different on PAE, x64, ARM, etc).
Modified:
trunk/reactos/ntoskrnl/mm/ARM3/i386/init.c
trunk/reactos/ntoskrnl/mm/ARM3/mminit.c
Modified: trunk/reactos/ntoskrnl/mm/ARM3/i386/init.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/i386/init…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/ARM3/i386/init.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/ARM3/i386/init.c [iso-8859-1] Wed May 12 20:42:05 2010
@@ -339,7 +339,7 @@
MmNonPagedSystemStart = (PVOID)((ULONG_PTR)MmNonPagedPoolStart -
(MmNumberOfSystemPtes + 1) * PAGE_SIZE);
MmNonPagedSystemStart = (PVOID)((ULONG_PTR)MmNonPagedSystemStart &
- ~((4 * 1024 * 1024) - 1));
+ ~(PDE_MAPPED_VA - 1));
//
// Don't let it go below the minimum
@@ -387,7 +387,7 @@
//
MmPfnDatabase[0] = (PVOID)0xB0000000;
MmPfnDatabase[1] = &MmPfnDatabase[0][MmHighestPhysicalPage];
- ASSERT(((ULONG_PTR)MmPfnDatabase[0] & ((4 * 1024 * 1024) - 1)) == 0);
+ ASSERT(((ULONG_PTR)MmPfnDatabase[0] & (PDE_MAPPED_VA - 1)) == 0);
//
// Non paged pool comes after the PFN database
Modified: trunk/reactos/ntoskrnl/mm/ARM3/mminit.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/mminit.c?…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/ARM3/mminit.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/ARM3/mminit.c [iso-8859-1] Wed May 12 20:42:05 2010
@@ -1725,8 +1725,8 @@
//
MmBootImageSize = KeLoaderBlock->Extension->LoaderPagesSpanned;
MmBootImageSize *= PAGE_SIZE;
- MmBootImageSize = (MmBootImageSize + (4 * 1024 * 1024) - 1) & ~((4 * 1024 *
1024) - 1);
- ASSERT((MmBootImageSize % (4 * 1024 * 1024)) == 0);
+ MmBootImageSize = (MmBootImageSize + PDE_MAPPED_VA - 1) & ~(PDE_MAPPED_VA -
1);
+ ASSERT((MmBootImageSize % PDE_MAPPED_VA) == 0);
//
// Set the size of session view, pool, and image