- Finally move MmInit1 to MmInitSystem where it should belong, since FreeLdr now properly sets up SharedUserData. (Thanks to Alex for the hint)

svn path=/trunk/; revision=29342
This commit is contained in:
Aleksey Bragin 2007-10-01 20:24:01 +00:00
parent dc3692a04f
commit fbf1e8f95e
2 changed files with 12 additions and 28 deletions

View file

@ -18,10 +18,6 @@
KSPIN_LOCK KiFreezeExecutionLock;
KSPIN_LOCK Ki486CompatibilityLock;
/* BIOS Memory Map. Not NTLDR-compliant yet */
extern ULONG KeMemoryMapRangeCount;
extern ADDRESS_RANGE KeMemoryMap[64];
/* FUNCTIONS *****************************************************************/
VOID
@ -536,14 +532,6 @@ KiInitializeKernel(IN PKPROCESS InitProcess,
/* 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;

View file

@ -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 @@ MmInit1(ULONG_PTR FirstKrnlPhysAddr,
MmInitializeMdlImplementation();
}
BOOLEAN RmapReady, PageOpReady, SectionsReady, PagingReady;
extern KMUTANT MmSystemLoadLock;
BOOLEAN
NTAPI
MmInitSystem(IN ULONG Phase,
@ -433,6 +421,14 @@ MmInitSystem(IN ULONG Phase,
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);