[NTOSKRNL/AMD64]

- Only initialize the nonpged pool after the pfn database was initialized
- "Fix" IRQL for the initialization of non paged pool

svn path=/trunk/; revision=56271
This commit is contained in:
Timo Kreuzer 2012-03-29 10:07:25 +00:00
parent e322927d5a
commit af3c87e298

View file

@ -351,8 +351,6 @@ MiBuildNonPagedPool(VOID)
MiInitializeNonPagedPool(); MiInitializeNonPagedPool();
MiInitializeNonPagedPoolThresholds(); MiInitializeNonPagedPoolThresholds();
/* Initialize the nonpaged pool */
InitializePool(NonPagedPool, 0);
} }
VOID VOID
@ -655,7 +653,7 @@ MiBuildPfnDatabase(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
PageCount = MxFreeDescriptor->BasePage - BasePage; PageCount = MxFreeDescriptor->BasePage - BasePage;
MiAddDescriptorToDatabase(BasePage, PageCount, LoaderMemoryData); MiAddDescriptorToDatabase(BasePage, PageCount, LoaderMemoryData);
// Reset the descriptor back so we can create the correct memory blocks /* Reset the descriptor back so we can create the correct memory blocks */
*MxFreeDescriptor = MxOldFreeDescriptor; *MxFreeDescriptor = MxOldFreeDescriptor;
} }
@ -698,8 +696,17 @@ MiInitMachineDependent(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
/* Now process the page tables */ /* Now process the page tables */
MiBuildPfnDatabaseFromPageTables(); MiBuildPfnDatabaseFromPageTables();
/* PFNs are initialized now! */
MiPfnsInitialized = TRUE; MiPfnsInitialized = TRUE;
//KeLowerIrql(OldIrql);
/* Need to be at DISPATCH_LEVEL for InitializePool */
//KeRaiseIrql(DISPATCH_LEVEL, &OldIrql);
/* Initialize the nonpaged pool */
InitializePool(NonPagedPool, 0);
KeLowerIrql(OldIrql); KeLowerIrql(OldIrql);
/* Initialize the balancer */ /* Initialize the balancer */