- Temporary revert 29342.

See issue #2715 for more details.

svn path=/trunk/; revision=29360
This commit is contained in:
Aleksey Bragin 2007-10-02 20:09:31 +00:00
parent 2a4148f4c2
commit 5535e33b64
2 changed files with 28 additions and 12 deletions

View file

@ -18,6 +18,10 @@
KSPIN_LOCK KiFreezeExecutionLock; KSPIN_LOCK KiFreezeExecutionLock;
KSPIN_LOCK Ki486CompatibilityLock; KSPIN_LOCK Ki486CompatibilityLock;
/* BIOS Memory Map. Not NTLDR-compliant yet */
extern ULONG KeMemoryMapRangeCount;
extern ADDRESS_RANGE KeMemoryMap[64];
/* FUNCTIONS *****************************************************************/ /* FUNCTIONS *****************************************************************/
VOID VOID
@ -532,6 +536,14 @@ KiInitializeKernel(IN PKPROCESS InitProcess,
/* HACK for MmUpdatePageDir */ /* HACK for MmUpdatePageDir */
((PETHREAD)InitThread)->ThreadsProcess = (PEPROCESS)InitProcess; ((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 */ /* Set basic CPU Features that user mode can read */
SharedUserData->ProcessorFeatures[PF_MMX_INSTRUCTIONS_AVAILABLE] = SharedUserData->ProcessorFeatures[PF_MMX_INSTRUCTIONS_AVAILABLE] =
(KeFeatureBits & KF_MMX) ? TRUE: FALSE; (KeFeatureBits & KF_MMX) ? TRUE: FALSE;

View file

@ -16,10 +16,19 @@
/* GLOBALS *****************************************************************/ /* GLOBALS *****************************************************************/
BOOLEAN RmapReady, PageOpReady, SectionsReady, PagingReady; /*
extern KMUTANT MmSystemLoadLock; * Compiler defined symbols
extern ULONG KeMemoryMapRangeCount; */
extern ADDRESS_RANGE KeMemoryMap[64]; #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
static BOOLEAN IsThisAnNtAsSystem = FALSE; static BOOLEAN IsThisAnNtAsSystem = FALSE;
MM_SYSTEMSIZE MmSystemSize = MmSmallSystem; MM_SYSTEMSIZE MmSystemSize = MmSmallSystem;
@ -413,6 +422,9 @@ MmInit1(ULONG_PTR FirstKrnlPhysAddr,
MmInitializeMdlImplementation(); MmInitializeMdlImplementation();
} }
BOOLEAN RmapReady, PageOpReady, SectionsReady, PagingReady;
extern KMUTANT MmSystemLoadLock;
BOOLEAN BOOLEAN
NTAPI NTAPI
MmInitSystem(IN ULONG Phase, MmInitSystem(IN ULONG Phase,
@ -421,14 +433,6 @@ MmInitSystem(IN ULONG Phase,
ULONG Flags = 0; ULONG Flags = 0;
if (Phase == 0) if (Phase == 0)
{ {
/* Initialize Kernel Memory Address Space */
MmInit1(MmFreeLdrFirstKrnlPhysAddr,
MmFreeLdrLastKrnlPhysAddr,
MmFreeLdrLastKernelAddress,
KeMemoryMap,
KeMemoryMapRangeCount,
4096);
/* Initialize the Loader Lock */ /* Initialize the Loader Lock */
KeInitializeMutant(&MmSystemLoadLock, FALSE); KeInitializeMutant(&MmSystemLoadLock, FALSE);