From af3c87e2985e9a3917634302c907977ea099ebc1 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Thu, 29 Mar 2012 10:07:25 +0000 Subject: [PATCH] [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 --- reactos/ntoskrnl/mm/amd64/init.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/reactos/ntoskrnl/mm/amd64/init.c b/reactos/ntoskrnl/mm/amd64/init.c index 5d81595306f..1a2e6bad142 100644 --- a/reactos/ntoskrnl/mm/amd64/init.c +++ b/reactos/ntoskrnl/mm/amd64/init.c @@ -351,8 +351,6 @@ MiBuildNonPagedPool(VOID) MiInitializeNonPagedPool(); MiInitializeNonPagedPoolThresholds(); - /* Initialize the nonpaged pool */ - InitializePool(NonPagedPool, 0); } VOID @@ -655,7 +653,7 @@ MiBuildPfnDatabase(IN PLOADER_PARAMETER_BLOCK LoaderBlock) PageCount = MxFreeDescriptor->BasePage - BasePage; 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; } @@ -698,8 +696,17 @@ MiInitMachineDependent(IN PLOADER_PARAMETER_BLOCK LoaderBlock) /* Now process the page tables */ MiBuildPfnDatabaseFromPageTables(); + /* PFNs are initialized now! */ 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); /* Initialize the balancer */