Commit in reactos/ntoskrnl/mm on MAIN
mminit.c+19-181.66 -> 1.67
- Changed the sequence of some memory initialisation functions.

reactos/ntoskrnl/mm
mminit.c 1.66 -> 1.67
diff -u -r1.66 -r1.67
--- mminit.c	15 Aug 2004 16:39:08 -0000	1.66
+++ mminit.c	19 Aug 2004 22:17:47 -0000	1.67
@@ -1,4 +1,4 @@
-/* $Id: mminit.c,v 1.66 2004/08/15 16:39:08 chorns Exp $
+/* $Id: mminit.c,v 1.67 2004/08/19 22:17:47 hbirr Exp $
  *
  * COPYRIGHT:   See COPYING in the top directory
  * PROJECT:     ReactOS kernel 
@@ -341,8 +341,6 @@
    MmUserProbeAddress = (PVOID)0x7fff0000;
    MmHighestUserAddress = (PVOID)0x7ffeffff;
 
-   MmInitGlobalKernelPageDirectory();
-
    /*
     * Initialize memory managment statistics
     */
@@ -358,20 +356,6 @@
    MmStats.PagingRequestsInLastFifteenMinutes = 0;
 
    /*
-    * Initialize the kernel address space
-    */
-   MmInitializeKernelAddressSpace();
-
-   /*
-    * Unmap low memory
-    */
-#ifndef MP
-   /* In SMP mode we unmap the low memory in MmInit3.
-      The APIC needs the mapping of the first pages
-      while the processors are starting up. */
-   MmDeletePageTable(NULL, 0);
-#endif
-   /*
     * Free all pages not used for kernel memory
     * (we assume the kernel occupies a continuous range of physical
     * memory)
@@ -397,9 +381,17 @@
    MmStats.NrTotalPages += 16;
 #endif
 
+   /*
+    * Initialize the kernel address space
+    */
+   MmInitializeKernelAddressSpace();
+   
+   MmInitGlobalKernelPageDirectory();
+   
    MiInitKernelMap();
 
 
+
    DbgPrint("Used memory %dKb\n", (MmStats.NrTotalPages * PAGE_SIZE) / 1024);
 
    LastKernelAddress = (ULONG)MmInitializePageList((PVOID)FirstKrnlPhysAddr,
@@ -411,10 +403,19 @@
    kernel_len = LastKrnlPhysAddr - FirstKrnlPhysAddr;
 
    /*
+    * Unmap low memory
+    */
+#ifndef MP
+   /* In SMP mode we unmap the low memory in MmInit3.
+      The APIC needs the mapping of the first pages
+      while the processors are starting up. */
+   MmDeletePageTable(NULL, 0);
+#endif
+
+   /*
     * Create a trap for null pointer references and protect text
     * segment
     */
-   CHECKPOINT;
    DPRINT("_text_start__ %x _init_end__ %x\n",(int)&_text_start__,(int)&_init_end__);
    for (i=PAGE_ROUND_DOWN(((int)&_text_start__));
          i<PAGE_ROUND_UP(((int)&_init_end__));i=i+PAGE_SIZE)
CVSspam 0.2.8