On amd64 the NextEntry member of MMPTE_LIST has 32 bits, but 36 would be required...
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Mon, 16 Nov 2009 19:35:36 +0000 (19:35 +0000)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Mon, 16 Nov 2009 19:35:36 +0000 (19:35 +0000)
svn path=/branches/ros-amd64-bringup/; revision=44204

reactos/ntoskrnl/mm/ARM3/syspte.c

index bbb385e..7be87ac 100644 (file)
@@ -64,7 +64,8 @@ MiReserveAlignedSystemPtes(IN ULONG NumberOfPtes,
     // Now move to the first free system PTE cluster
     //
     PreviousPte = PointerPte;    
-    PointerPte = MmSystemPteBase + PointerPte->u.List.NextEntry;
+    PointerPte = MmSystemPtesStart[SystemPtePoolType] + 
+                 PointerPte->u.List.NextEntry;
     
     //
     // Loop each cluster
@@ -152,7 +153,8 @@ MiReserveAlignedSystemPtes(IN ULONG NumberOfPtes,
         // Go to the next cluster
         //
         PreviousPte = PointerPte;
-        PointerPte = MmSystemPteBase + PointerPte->u.List.NextEntry;
+        PointerPte = MmSystemPtesStart[SystemPtePoolType] + 
+                     PointerPte->u.List.NextEntry;
         ASSERT(PointerPte > PreviousPte);
     }   
     
@@ -214,7 +216,7 @@ MiReleaseSystemPtes(IN PMMPTE StartingPte,
     // Zero PTEs
     //
     RtlZeroMemory(StartingPte, NumberOfPtes * sizeof(MMPTE));
-    CurrentSize = (ULONG_PTR)(StartingPte - MmSystemPteBase);
+    CurrentSize = (ULONG_PTR)(StartingPte - MmSystemPtesStart[SystemPtePoolType]);
     
     //
     // Acquire the system PTE lock
@@ -235,7 +237,8 @@ MiReleaseSystemPtes(IN PMMPTE StartingPte,
         //
         // Get the first real cluster of PTEs and check if it's ours
         //
-        PointerPte = MmSystemPteBase + CurrentPte->u.List.NextEntry;
+        PointerPte = MmSystemPtesStart[SystemPtePoolType] + 
+                     CurrentPte->u.List.NextEntry;
         if (CurrentSize < CurrentPte->u.List.NextEntry)
         {
             //
@@ -395,7 +398,7 @@ MiInitializeSystemPtes(IN PMMPTE StartingPte,
     StartingPte->u.List.NextEntry = ((ULONG)0xFFFFF);
     MmFirstFreeSystemPte[PoolType].u.Long = 0;
     MmFirstFreeSystemPte[PoolType].u.List.NextEntry = StartingPte -
-                                                      MmSystemPteBase;
+                                                      MmSystemPtesStart[PoolType];
     
     //
     // The second entry stores the size of this PTE space