[RSHELL]
[reactos.git] / ntoskrnl / mm / mmfault.c
index b8628a8..602d708 100644 (file)
@@ -9,9 +9,7 @@
 /* INCLUDES *******************************************************************/
 
 #include <ntoskrnl.h>
-#ifdef NEWCC
 #include "../cache/section/newmm.h"
-#endif
 #define NDEBUG
 #include <debug.h>
 
@@ -34,7 +32,7 @@ MmpAccessFault(KPROCESSOR_MODE Mode,
 
    if (KeGetCurrentIrql() >= DISPATCH_LEVEL)
    {
-      DPRINT1("Page fault at high IRQL was %d\n", KeGetCurrentIrql());
+      DPRINT1("Page fault at high IRQL was %u\n", KeGetCurrentIrql());
       return(STATUS_UNSUCCESSFUL);
    }
 
@@ -82,21 +80,15 @@ MmpAccessFault(KPROCESSOR_MODE Mode,
                                               (PVOID)Address);
             break;
 
-         case MEMORY_AREA_VIRTUAL_MEMORY:
-            Status = STATUS_ACCESS_VIOLATION;
-            break;
-
-#ifdef NEWCC
          case MEMORY_AREA_CACHE:
             // This code locks for itself to keep from having to break a lock
             // passed in.
             if (!FromMdl)
                MmUnlockAddressSpace(AddressSpace);
-            Status = MmAccessFaultCacheSection(Mode, Address, Locked);
+            Status = MmAccessFaultCacheSection(Mode, Address, FromMdl);
             if (!FromMdl)
                MmLockAddressSpace(AddressSpace);
             break;
-#endif
 
          default:
             Status = STATUS_ACCESS_VIOLATION;
@@ -127,7 +119,7 @@ MmNotPresentFault(KPROCESSOR_MODE Mode,
 
    if (KeGetCurrentIrql() >= DISPATCH_LEVEL)
    {
-      DPRINT1("Page fault at high IRQL was %d, address %x\n", KeGetCurrentIrql(), Address);
+      DPRINT1("Page fault at high IRQL was %u, address %x\n", KeGetCurrentIrql(), Address);
       return(STATUS_UNSUCCESSFUL);
    }
 
@@ -176,26 +168,19 @@ MmNotPresentFault(KPROCESSOR_MODE Mode,
          case MEMORY_AREA_SECTION_VIEW:
             Status = MmNotPresentFaultSectionView(AddressSpace,
                                                   MemoryArea,
-                                                  (PVOID)Address);
-            break;
-
-         case MEMORY_AREA_VIRTUAL_MEMORY:
-            Status = MmNotPresentFaultVirtualMemory(AddressSpace,
-                                                    MemoryArea,
-                                                    (PVOID)Address);
+                                                  (PVOID)Address,
+                                                  FromMdl);
             break;
 
-#ifdef  NEWCC
          case MEMORY_AREA_CACHE:
             // This code locks for itself to keep from having to break a lock
             // passed in.
             if (!FromMdl)
                MmUnlockAddressSpace(AddressSpace);
-            Status = MmNotPresentFaultCacheSection(Mode, Address, Locked);
+            Status = MmNotPresentFaultCacheSection(Mode, Address, FromMdl);
             if (!FromMdl)
                MmLockAddressSpace(AddressSpace);
             break;
-#endif
 
          default:
             Status = STATUS_ACCESS_VIOLATION;