update for HEAD-2003021201
[reactos.git] / ntoskrnl / mm / mminit.c
index 6a5948f..1c7eb09 100644 (file)
@@ -266,7 +266,9 @@ VOID MmInit1(ULONG FirstKrnlPhysAddr,
     * Unmap low memory
     */
 #ifndef MP
-   /* FIXME: This is broken in SMP mode */
+   /* 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
    /*
@@ -351,9 +353,18 @@ VOID MmInit2(VOID)
 
 VOID MmInit3(VOID)
 {
+   /*
+    * Unmap low memory
+    */
+#ifdef MP
+   /* In SMP mode we can unmap the low memory  
+      if all processors are started. */
+   MmDeletePageTable(NULL, 0);
+#endif
    MmInitPagerThread();
    MmCreatePhysicalMemorySection();
    MmInitializeRmapList();
+   MmInitializePageOp();
 
    /*
     * Initialise the modified page writer.