- 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:
ReactOS Portable Systems Group 2009-07-27 00:52:44 +00:00
parent e754e12bd3
commit 059da34e93
2 changed files with 22 additions and 24 deletions

View file

@ -195,8 +195,13 @@ MmInitSystem(IN ULONG Phase,
/* Initialize the loaded module list */
MiInitializeLoadedModuleList(LoaderBlock);
/* We're done, for now */
DPRINT("Mm0: COMPLETE\n");
/* Setup shared user data settings that NT does as well */
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)
{
@ -204,32 +209,23 @@ MmInitSystem(IN ULONG Phase,
MmInitializePageOp();
MmInitSectionImplementation();
MmInitPagingFile();
MmCreatePhysicalMemorySection();
/* Setup shared user data settings that NT does as well */
ASSERT(SharedUserData->NumberOfPhysicalPages == 0);
SharedUserData->NumberOfPhysicalPages = MmStats.NrTotalPages;
SharedUserData->LargePageMinimum = 0;
/* For now, we assume that we're always Workstation */
SharedUserData->NtProductType = NtProductWinNt;
/*
* Unmap low memory
*/
MiInitBalancerThread();
/*
* Initialise the modified page writer.
*/
MmInitMpwThread();
/* Initialize the balance set manager */
MmInitBsmThread();
}
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;

View file

@ -2328,6 +2328,8 @@ MmInitSectionImplementation(VOID)
ObjectTypeInitializer.CloseProcedure = MmpCloseSection;
ObjectTypeInitializer.ValidAccessMask = SECTION_ALL_ACCESS;
ObCreateObjectType(&Name, &ObjectTypeInitializer, NULL, &MmSectionObjectType);
MmCreatePhysicalMemorySection();
return(STATUS_SUCCESS);
}