[ros-diffs] [sir_richard] 47172: [NTOS]: MmSystemPageDirectory is an array of page directories, not just a value. On x86 there's just one page directory, but that's not the case on other architectures/PAE, so fix this bug.

sir_richard at svn.reactos.org sir_richard at svn.reactos.org
Wed May 12 20:33:19 CEST 2010


Author: sir_richard
Date: Wed May 12 20:33:18 2010
New Revision: 47172

URL: http://svn.reactos.org/svn/reactos?rev=47172&view=rev
Log:
[NTOS]: MmSystemPageDirectory is an array of page directories, not just a value. On x86 there's just one page directory, but that's not the case on other architectures/PAE, so fix this bug.

Modified:
    trunk/reactos/ntoskrnl/mm/ARM3/arm/init.c
    trunk/reactos/ntoskrnl/mm/ARM3/mminit.c

Modified: trunk/reactos/ntoskrnl/mm/ARM3/arm/init.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/arm/init.c?rev=47172&r1=47171&r2=47172&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/mm/ARM3/arm/init.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/ARM3/arm/init.c [iso-8859-1] Wed May 12 20:33:18 2010
@@ -41,7 +41,7 @@
 ULONG MmSessionImageSize;
 PVOID MiSystemViewStart;
 ULONG MmSystemViewSize;
-PFN_NUMBER MmSystemPageDirectory;
+PFN_NUMBER MmSystemPageDirectory[PD_COUNT];
 PMMPTE MmSystemPagePtes;
 ULONG MmNumberOfSystemPtes;
 ULONG MxPfnAllocation;

Modified: trunk/reactos/ntoskrnl/mm/ARM3/mminit.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/mminit.c?rev=47172&r1=47171&r2=47172&view=diff
==============================================================================
--- 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:33:18 2010
@@ -151,7 +151,7 @@
 // map paged pool PDEs into external processes when they fault on a paged pool
 // address.
 //
-PFN_NUMBER MmSystemPageDirectory;
+PFN_NUMBER MmSystemPageDirectory[PD_COUNT];
 PMMPTE MmSystemPagePtes;
 
 //
@@ -1483,7 +1483,8 @@
     // Get the page frame number for the system page directory
     //
     PointerPte = MiAddressToPte(PDE_BASE);
-    MmSystemPageDirectory = PFN_FROM_PTE(PointerPte);
+    ASSERT(PD_COUNT == 1);
+    MmSystemPageDirectory[0] = PFN_FROM_PTE(PointerPte);
     
     //
     // Allocate a system PTE which will hold a copy of the page directory
@@ -1500,7 +1501,8 @@
     // way).
     //
     TempPte = ValidKernelPte;
-    TempPte.u.Hard.PageFrameNumber = MmSystemPageDirectory;
+    ASSERT(PD_COUNT == 1);
+    TempPte.u.Hard.PageFrameNumber = MmSystemPageDirectory[0];
     ASSERT(PointerPte->u.Hard.Valid == 0);
     ASSERT(TempPte.u.Hard.Valid == 1);
     *PointerPte = TempPte;




More information about the Ros-diffs mailing list