[ros-diffs] [fireball] 29342: - Finally move MmInit1 to MmInitSystem where it should belong, since FreeLdr now properly sets up SharedUserData. (Thanks to Alex for the hint)

fireball at svn.reactos.org fireball at svn.reactos.org
Mon Oct 1 22:24:02 CEST 2007


Author: fireball
Date: Tue Oct  2 00:24:01 2007
New Revision: 29342

URL: http://svn.reactos.org/svn/reactos?rev=29342&view=rev
Log:
- Finally move MmInit1 to MmInitSystem where it should belong, since FreeLdr now properly sets up SharedUserData. (Thanks to Alex for the hint)

Modified:
    trunk/reactos/ntoskrnl/ke/i386/kiinit.c
    trunk/reactos/ntoskrnl/mm/mminit.c

Modified: trunk/reactos/ntoskrnl/ke/i386/kiinit.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/kiinit.c?rev=29342&r1=29341&r2=29342&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/ke/i386/kiinit.c (original)
+++ trunk/reactos/ntoskrnl/ke/i386/kiinit.c Tue Oct  2 00:24:01 2007
@@ -17,10 +17,6 @@
 /* Spinlocks used only on X86 */
 KSPIN_LOCK KiFreezeExecutionLock;
 KSPIN_LOCK Ki486CompatibilityLock;
-
-/* BIOS Memory Map. Not NTLDR-compliant yet */
-extern ULONG KeMemoryMapRangeCount;
-extern ADDRESS_RANGE KeMemoryMap[64];
 
 /* FUNCTIONS *****************************************************************/
 
@@ -536,14 +532,6 @@
     /* HACK for MmUpdatePageDir */
     ((PETHREAD)InitThread)->ThreadsProcess = (PEPROCESS)InitProcess;
 
-    /* Initialize Kernel Memory Address Space */
-    MmInit1(MmFreeLdrFirstKrnlPhysAddr,
-            MmFreeLdrLastKrnlPhysAddr,
-            MmFreeLdrLastKernelAddress,
-            KeMemoryMap,
-            KeMemoryMapRangeCount,
-            4096);
-
     /* Set basic CPU Features that user mode can read */
     SharedUserData->ProcessorFeatures[PF_MMX_INSTRUCTIONS_AVAILABLE] =
         (KeFeatureBits & KF_MMX) ? TRUE: FALSE;

Modified: trunk/reactos/ntoskrnl/mm/mminit.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/mminit.c?rev=29342&r1=29341&r2=29342&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/mm/mminit.c (original)
+++ trunk/reactos/ntoskrnl/mm/mminit.c Tue Oct  2 00:24:01 2007
@@ -16,19 +16,10 @@
 
 /* GLOBALS *****************************************************************/
 
-/*
- * Compiler defined symbols
- */
-#if 0
-extern unsigned int _image_base__;
-extern unsigned int _text_start__;
-extern unsigned int _text_end__;
-
-extern unsigned int _init_start__;
-extern unsigned int _init_end__;
-
-extern unsigned int _bss_end__;
-#endif
+BOOLEAN RmapReady, PageOpReady, SectionsReady, PagingReady;
+extern KMUTANT MmSystemLoadLock;
+extern ULONG KeMemoryMapRangeCount;
+extern ADDRESS_RANGE KeMemoryMap[64];
 
 static BOOLEAN IsThisAnNtAsSystem = FALSE;
 MM_SYSTEMSIZE MmSystemSize = MmSmallSystem;
@@ -422,9 +413,6 @@
    MmInitializeMdlImplementation();
 }
 
-BOOLEAN RmapReady, PageOpReady, SectionsReady, PagingReady;
-extern KMUTANT MmSystemLoadLock;
-
 BOOLEAN
 NTAPI
 MmInitSystem(IN ULONG Phase,
@@ -433,6 +421,14 @@
     ULONG Flags = 0;
     if (Phase == 0)
     {
+        /* Initialize Kernel Memory Address Space */
+        MmInit1(MmFreeLdrFirstKrnlPhysAddr,
+                MmFreeLdrLastKrnlPhysAddr,
+                MmFreeLdrLastKernelAddress,
+                KeMemoryMap,
+                KeMemoryMapRangeCount,
+                4096);
+
         /* Initialize the Loader Lock */
         KeInitializeMutant(&MmSystemLoadLock, FALSE);
 




More information about the Ros-diffs mailing list