Author: tkreuzer Date: Mon Nov 16 20:35:36 2009 New Revision: 44204
URL: http://svn.reactos.org/svn/reactos?rev=44204&view=rev Log: On amd64 the NextEntry member of MMPTE_LIST has 32 bits, but 36 would be required to cover the whole pte space. Therefore use MmSystemPtesStart[SystemPtePoolType] as base for the pfn linked list instead of MmSystemPteBase, which is set to PTE_BASE.
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/mm/ARM3/syspte.c
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/mm/ARM3/syspte.c URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntoskr... ============================================================================== --- branches/ros-amd64-bringup/reactos/ntoskrnl/mm/ARM3/syspte.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/ntoskrnl/mm/ARM3/syspte.c [iso-8859-1] Mon Nov 16 20:35:36 2009 @@ -64,7 +64,8 @@ // 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 @@ // 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 @@ // 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 @@ // // 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 @@ 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