- Use WinXP style /SOS output when enabled. (TODO: Display banner/memory/cpu).
[reactos.git] / reactos / ntoskrnl / mm / mminit.c
index 6ceae12..8607291 100644 (file)
@@ -453,44 +453,39 @@ MmInit1(ULONG_PTR FirstKrnlPhysAddr,
 
 BOOLEAN RmapReady, PageOpReady, SectionsReady, PagingReady;
 
-VOID
-NTAPI
-INIT_FUNCTION
-MmInit2(VOID)
-{
-   MmInitializeRmapList();
-   RmapReady = TRUE;
-   MmInitializePageOp();
-   PageOpReady = TRUE;
-   MmInitSectionImplementation();
-   SectionsReady = TRUE;
-   MmInitPagingFile();
-   PagingReady = TRUE;
-}
-
-VOID
-INIT_FUNCTION
+BOOLEAN
 NTAPI
-MmInit3(VOID)
+MmInitSystem(IN ULONG Phase,
+             IN PLOADER_PARAMETER_BLOCK LoaderBlock)
 {
-   /*
-    * Unmap low memory
-    */
-#ifdef CONFIG_SMP
-   /* In SMP mode we can unmap the low memory
-      if all processors are started. */
-   MmDeletePageTable(NULL, 0);
-#endif
-
-   MmCreatePhysicalMemorySection();
-   MiInitBalancerThread();
-
-   /*
-    * Initialise the modified page writer.
-    */
-   MmInitMpwThread();
-
-   /* FIXME: Read parameters from memory */
+    if (Phase == 1)
+    {
+        MmInitializeRmapList();
+        RmapReady = TRUE;
+        MmInitializePageOp();
+        PageOpReady = TRUE;
+        MmInitSectionImplementation();
+        SectionsReady = TRUE;
+        MmInitPagingFile();
+        PagingReady = TRUE;
+    }
+    else if (Phase == 2)
+    {
+        /*
+        * Unmap low memory
+        */
+        MmCreatePhysicalMemorySection();
+        MiInitBalancerThread();
+
+        /*
+        * Initialise the modified page writer.
+        */
+        MmInitMpwThread();
+
+        /* FIXME: Read parameters from memory */
+    }
+
+    return TRUE;
 }
 
 VOID static