mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 08:25:48 +00:00
- Create \dev\physmem section during section initialization, not later.
- Setup SharedUserData settings during Phase 0, not Phase 1. Fixes an old bug where the Inbv driver assumed ReactOS was in "server mode" simply because the default SharedUserData->NtProductType was "0" (which is an invalid product type, but it's != NtProductTypeNt). - Also fixed it such that this reports NtProductServer, which is what ReactOS reports to be (Windows 2003 Server SP 1). - Initialize the modified page writer and balancer thread in phase 1, not phase 2. - Phase 2 should make the executive pageable, but I don't think this is supported yet... svn path=/trunk/; revision=42251
This commit is contained in:
parent
e754e12bd3
commit
059da34e93
2 changed files with 22 additions and 24 deletions
|
@ -195,8 +195,13 @@ MmInitSystem(IN ULONG Phase,
|
||||||
/* Initialize the loaded module list */
|
/* Initialize the loaded module list */
|
||||||
MiInitializeLoadedModuleList(LoaderBlock);
|
MiInitializeLoadedModuleList(LoaderBlock);
|
||||||
|
|
||||||
/* We're done, for now */
|
/* Setup shared user data settings that NT does as well */
|
||||||
DPRINT("Mm0: COMPLETE\n");
|
ASSERT(SharedUserData->NumberOfPhysicalPages == 0);
|
||||||
|
SharedUserData->NumberOfPhysicalPages = MmStats.NrTotalPages;
|
||||||
|
SharedUserData->LargePageMinimum = 0;
|
||||||
|
|
||||||
|
/* For now, we assume that we're always Server */
|
||||||
|
SharedUserData->NtProductType = NtProductServer;
|
||||||
}
|
}
|
||||||
else if (Phase == 1)
|
else if (Phase == 1)
|
||||||
{
|
{
|
||||||
|
@ -204,32 +209,23 @@ MmInitSystem(IN ULONG Phase,
|
||||||
MmInitializePageOp();
|
MmInitializePageOp();
|
||||||
MmInitSectionImplementation();
|
MmInitSectionImplementation();
|
||||||
MmInitPagingFile();
|
MmInitPagingFile();
|
||||||
MmCreatePhysicalMemorySection();
|
|
||||||
|
/*
|
||||||
/* Setup shared user data settings that NT does as well */
|
* Unmap low memory
|
||||||
ASSERT(SharedUserData->NumberOfPhysicalPages == 0);
|
*/
|
||||||
SharedUserData->NumberOfPhysicalPages = MmStats.NrTotalPages;
|
MiInitBalancerThread();
|
||||||
SharedUserData->LargePageMinimum = 0;
|
|
||||||
|
/*
|
||||||
/* For now, we assume that we're always Workstation */
|
* Initialise the modified page writer.
|
||||||
SharedUserData->NtProductType = NtProductWinNt;
|
*/
|
||||||
|
MmInitMpwThread();
|
||||||
|
|
||||||
|
/* Initialize the balance set manager */
|
||||||
|
MmInitBsmThread();
|
||||||
}
|
}
|
||||||
else if (Phase == 2)
|
else if (Phase == 2)
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
* Unmap low memory
|
|
||||||
*/
|
|
||||||
MiInitBalancerThread();
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Initialise the modified page writer.
|
|
||||||
*/
|
|
||||||
MmInitMpwThread();
|
|
||||||
|
|
||||||
/* Initialize the balance set manager */
|
|
||||||
MmInitBsmThread();
|
|
||||||
|
|
||||||
/* FIXME: Read parameters from memory */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
|
@ -2328,6 +2328,8 @@ MmInitSectionImplementation(VOID)
|
||||||
ObjectTypeInitializer.CloseProcedure = MmpCloseSection;
|
ObjectTypeInitializer.CloseProcedure = MmpCloseSection;
|
||||||
ObjectTypeInitializer.ValidAccessMask = SECTION_ALL_ACCESS;
|
ObjectTypeInitializer.ValidAccessMask = SECTION_ALL_ACCESS;
|
||||||
ObCreateObjectType(&Name, &ObjectTypeInitializer, NULL, &MmSectionObjectType);
|
ObCreateObjectType(&Name, &ObjectTypeInitializer, NULL, &MmSectionObjectType);
|
||||||
|
|
||||||
|
MmCreatePhysicalMemorySection();
|
||||||
|
|
||||||
return(STATUS_SUCCESS);
|
return(STATUS_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue