[NTOS] Deduplicate MiSynchronizeSystemPde(). #179
[reactos.git] / ntoskrnl / mm / i386 / page.c
index 457b794..4ed0ebc 100644 (file)
@@ -189,28 +189,6 @@ ProtectToPTE(ULONG flProtect)
     return(Attributes);
 }
 
-/* Taken from ARM3/pagfault.c */
-FORCEINLINE
-BOOLEAN
-MiSynchronizeSystemPde(PMMPDE PointerPde)
-{
-    MMPDE SystemPde;
-    ULONG Index;
-
-    /* Get the Index from the PDE */
-    Index = ((ULONG_PTR)PointerPde & (SYSTEM_PD_SIZE - 1)) / sizeof(MMPTE);
-
-    /* Copy the PDE from the double-mapped system page directory */
-    SystemPde = MmSystemPagePtes[Index];
-    *PointerPde = SystemPde;
-
-    /* Make sure we re-read the PDE and PTE */
-    KeMemoryBarrierWithoutFence();
-
-    /* Return, if we had success */
-    return SystemPde.u.Hard.Valid != 0;
-}
-
 NTSTATUS
 NTAPI
 MiDispatchFault(IN BOOLEAN StoreInstruction,
@@ -765,7 +743,7 @@ MmCreateVirtualMappingUnsafe(PEPROCESS Process,
         /* There should not be anything valid here */
         if (Pte != 0)
         {
-            DPRINT1("Bad PTE %lx\n", Pte);
+            DPRINT1("Bad PTE %lx at %p for %p + %lu\n", Pte, Pt, Address, i);
             KeBugCheck(MEMORY_MANAGEMENT);
         }