Author: ros-arm-bringup
Date: Thu Oct 15 20:54:35 2009
New Revision: 43486
URL:
http://svn.reactos.org/svn/reactos?rev=43486&view=rev
Log:
- Fix a bug in memory area creation: Static memory areas had the static flag embedded in
their type, so code that was switch()ing on the type would fail to recognize the actual
type, because MEMORY_AREA_STATIC was ORed in.
- Add a new memory area type: MEMORY_AREA_OWNED_BY_ARM3. This will allow us to instruct
the ReactOS Memory MAnager to "Back. The Fuck. Off." during page faults and
such, so we can handle page faults inside ARM3-owned PTEs ourselves.
- Right now, all ARM3 PTEs and data is nonpaged, so no page faults should happen, but
this may change in the future.
- Also will allow us to manage our own PDEs so we can do on-demand inpage instead of
syncing with the ReactOS Mm hack cache.
- Create all memory areas in one shot in MmCreateSystemMemoryAreas (get rid of
MiInitPageDirectoryMap and MiInitPagedPool memory area creation).
- Mark all of ours as owned by ARM3.
- Make them all static.
- The only non-ARM3 one right now is paged pool, we own all the other static areas.
- Move this code into mm, instead of mm/ARM3, since memory areas are not an ARM3
concept.
- Also create memory areas for session space, session view, and other ARM3 memory
ranges, so nobody touches those ranges.
- Dump the kernel address space after all this is done, in a MmDbg function in mm.
- This cleans up ARM3 of some ROS-specific code, and also collapses Phase 1 and 2 into a
single phase.
Modified:
trunk/reactos/ntoskrnl/include/internal/mm.h
trunk/reactos/ntoskrnl/mm/ARM3/i386/init.c
trunk/reactos/ntoskrnl/mm/ARM3/miarm.h
trunk/reactos/ntoskrnl/mm/i386/page.c
trunk/reactos/ntoskrnl/mm/marea.c
trunk/reactos/ntoskrnl/mm/mminit.c
trunk/reactos/ntoskrnl/mm/ppool.c
Modified: trunk/reactos/ntoskrnl/include/internal/mm.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/mm.h [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/include/internal/mm.h [iso-8859-1] Thu Oct 15 20:54:35 2009
@@ -46,7 +46,7 @@
#define MMDBG_COPY_MAX_SIZE 0x8
-#define MI_STATIC_MEMORY_AREAS (8)
+#define MI_STATIC_MEMORY_AREAS (12)
#define MEMORY_AREA_INVALID (0)
#define MEMORY_AREA_SECTION_VIEW (1)
@@ -62,6 +62,7 @@
#define MEMORY_AREA_PAGED_POOL (12)
#define MEMORY_AREA_NO_ACCESS (13)
#define MEMORY_AREA_PEB_OR_TEB (14)
+#define MEMORY_AREA_OWNED_BY_ARM3 (15)
#define MEMORY_AREA_STATIC (0x80000000)
#define MM_PHYSICAL_PAGE_MPW_PENDING (0x8)
Modified: trunk/reactos/ntoskrnl/mm/ARM3/i386/init.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/i386/init…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/ARM3/i386/init.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/ARM3/i386/init.c [iso-8859-1] Thu Oct 15 20:54:35 2009
@@ -600,20 +600,16 @@
PLIST_ENTRY NextEntry;
PMEMORY_ALLOCATION_DESCRIPTOR MdBlock;
ULONG FreePages = 0;
- PMEMORY_AREA MArea;
- PHYSICAL_ADDRESS BoundaryAddressMultiple;
PFN_NUMBER PageFrameIndex;
PMMPTE StartPde, EndPde, PointerPte, LastPte;
MMPTE TempPde = HyperTemplatePte, TempPte = HyperTemplatePte;
- PVOID NonPagedPoolExpansionVa, BaseAddress;
- NTSTATUS Status;
+ PVOID NonPagedPoolExpansionVa;
ULONG OldCount;
BOOLEAN IncludeType[LoaderMaximum];
ULONG i;
PVOID Bitmap;
PPHYSICAL_MEMORY_RUN Run;
PFN_NUMBER FreePage, FreePageCount, PagesLeft, BasePage, PageCount;
- BoundaryAddressMultiple.QuadPart = 0;
if (Phase == 0)
{
@@ -1083,37 +1079,6 @@
ASSERT(TempPte.u.Hard.Valid == 1);
*PointerPte++ = TempPte;
}
-
- //
- // ReactOS requires a memory area to keep the initial NP area off-bounds
- //
- BaseAddress = MmNonPagedPoolStart;
- Status = MmCreateMemoryArea(MmGetKernelAddressSpace(),
- MEMORY_AREA_SYSTEM | MEMORY_AREA_STATIC,
- &BaseAddress,
- MmSizeOfNonPagedPoolInBytes,
- PAGE_READWRITE,
- &MArea,
- TRUE,
- 0,
- BoundaryAddressMultiple);
- ASSERT(Status == STATUS_SUCCESS);
-
- //
- // And we need one more for the system NP
- //
- BaseAddress = MmNonPagedSystemStart;
- Status = MmCreateMemoryArea(MmGetKernelAddressSpace(),
- MEMORY_AREA_SYSTEM | MEMORY_AREA_STATIC,
- &BaseAddress,
- (ULONG_PTR)MmNonPagedPoolEnd -
- (ULONG_PTR)MmNonPagedSystemStart,
- PAGE_READWRITE,
- &MArea,
- TRUE,
- 0,
- BoundaryAddressMultiple);
- ASSERT(Status == STATUS_SUCCESS);
//
// Sanity check: make sure we have properly defined the system PTE space
@@ -1324,9 +1289,7 @@
MiSyncARM3WithROS(MmNonPagedSystemStart, (PVOID)((ULONG_PTR)MmNonPagedPoolEnd -
1));
MiSyncARM3WithROS(MmPfnDatabase, (PVOID)((ULONG_PTR)MmNonPagedPoolStart +
MmSizeOfNonPagedPoolInBytes - 1));
MiSyncARM3WithROS((PVOID)HYPER_SPACE, (PVOID)(HYPER_SPACE + PAGE_SIZE - 1));
- }
- else // NOW WE HAVE NONPAGED POOL
- {
+
//
// Instantiate memory that we don't consider RAM/usable
// We use the same exclusions that Windows does, in order to try to be
@@ -1400,53 +1363,6 @@
// Size up paged pool and build the shadow system page directory
//
MiBuildPagedPool();
-
- //
- // Print the memory layout
- //
- DPRINT1(" 0x%p - 0x%p\t%s\n",
- MmSystemRangeStart,
- (ULONG_PTR)MmSystemRangeStart + MmBootImageSize,
- "Boot Loaded Image");
- DPRINT1(" 0x%p - 0x%p\t%s\n",
- MmPagedPoolBase,
- (ULONG_PTR)MmPagedPoolBase + MmPagedPoolSize,
- "Paged Pool");
- DPRINT1(" 0x%p - 0x%p\t%s\n",
- MmPfnDatabase,
- (ULONG_PTR)MmPfnDatabase + (MxPfnAllocation << PAGE_SHIFT),
- "PFN Database");
- DPRINT1(" 0x%p - 0x%p\t%s\n",
- MmNonPagedPoolStart,
- (ULONG_PTR)MmNonPagedPoolStart + MmSizeOfNonPagedPoolInBytes,
- "ARM³ Non Paged Pool");
- DPRINT1(" 0x%p - 0x%p\t%s\n",
- MiSystemViewStart,
- (ULONG_PTR)MiSystemViewStart + MmSystemViewSize,
- "System View Space");
- DPRINT1(" 0x%p - 0x%p\t%s\n",
- MmSessionBase,
- MiSessionSpaceEnd,
- "Session Space");
- DPRINT1(" 0x%p - 0x%p\t%s\n",
- PTE_BASE, PDE_BASE,
- "Page Tables");
- DPRINT1(" 0x%p - 0x%p\t%s\n",
- PDE_BASE, HYPER_SPACE,
- "Page Directories");
- DPRINT1(" 0x%p - 0x%p\t%s\n",
- HYPER_SPACE, HYPER_SPACE + (4 * 1024 * 1024),
- "Hyperspace");
- DPRINT1(" 0x%p - 0x%p\t%s\n",
- MmPagedPoolStart,
- (ULONG_PTR)MmPagedPoolStart + MmSizeOfPagedPoolInBytes,
- "ARM³ Paged Pool");
- DPRINT1(" 0x%p - 0x%p\t%s\n",
- MmNonPagedSystemStart, MmNonPagedPoolExpansionStart,
- "System PTE Space");
- DPRINT1(" 0x%p - 0x%p\t%s\n",
- MmNonPagedPoolExpansionStart, MmNonPagedPoolEnd,
- "Non Paged Pool Expansion PTE Space");
}
//
Modified: trunk/reactos/ntoskrnl/mm/ARM3/miarm.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/miarm.h?r…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/ARM3/miarm.h [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/ARM3/miarm.h [iso-8859-1] Thu Oct 15 20:54:35 2009
@@ -147,6 +147,15 @@
extern MM_PAGED_POOL_INFO MmPagedPoolInfo;
extern RTL_BITMAP MiPfnBitMap;
extern KGUARDED_MUTEX MmPagedPoolMutex;
+extern PVOID MmPagedPoolStart;
+extern PVOID MmPagedPoolEnd;
+extern PVOID MmNonPagedSystemStart;
+extern PVOID MiSystemViewStart;
+extern ULONG MmSystemViewSize;
+extern PVOID MmSessionBase;
+extern PVOID MiSessionSpaceEnd;
+extern ULONG MmSizeOfPagedPoolInBytes;
+extern PMMPTE MmSystemPagePtes;
VOID
NTAPI
Modified: trunk/reactos/ntoskrnl/mm/i386/page.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/i386/page.c?re…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/i386/page.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/i386/page.c [iso-8859-1] Thu Oct 15 20:54:35 2009
@@ -1034,48 +1034,4 @@
}
}
-VOID
-INIT_FUNCTION
-NTAPI
-MiInitPageDirectoryMap(VOID)
-{
- MEMORY_AREA* kernel_map_desc = NULL;
- MEMORY_AREA* hyperspace_desc = NULL;
- PHYSICAL_ADDRESS BoundaryAddressMultiple;
- PVOID BaseAddress;
- NTSTATUS Status;
-
- DPRINT("MiInitPageDirectoryMap()\n");
-
- BoundaryAddressMultiple.QuadPart = 0;
- BaseAddress = (PVOID)PAGETABLE_MAP;
- Status = MmCreateMemoryArea(MmGetKernelAddressSpace(),
- MEMORY_AREA_SYSTEM | MEMORY_AREA_STATIC,
- &BaseAddress,
- 0x400000,
- PAGE_READWRITE,
- &kernel_map_desc,
- TRUE,
- 0,
- BoundaryAddressMultiple);
- if (!NT_SUCCESS(Status))
- {
- KeBugCheck(MEMORY_MANAGEMENT);
- }
- BaseAddress = (PVOID)HYPERSPACE;
- Status = MmCreateMemoryArea(MmGetKernelAddressSpace(),
- MEMORY_AREA_SYSTEM | MEMORY_AREA_STATIC,
- &BaseAddress,
- 0x400000,
- PAGE_READWRITE,
- &hyperspace_desc,
- TRUE,
- 0,
- BoundaryAddressMultiple);
- if (!NT_SUCCESS(Status))
- {
- KeBugCheck(MEMORY_MANAGEMENT);
- }
-}
-
/* EOF */
Modified: trunk/reactos/ntoskrnl/mm/marea.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/marea.c?rev=43…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/marea.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/marea.c [iso-8859-1] Thu Oct 15 20:54:35 2009
@@ -996,6 +996,7 @@
//
ASSERT(MiStaticMemoryAreaCount < MI_STATIC_MEMORY_AREAS);
MemoryArea = &MiStaticMemoryAreas[MiStaticMemoryAreaCount++];
+ Type &= ~MEMORY_AREA_STATIC;
}
else
{
Modified: trunk/reactos/ntoskrnl/mm/mminit.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/mminit.c?rev=4…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/mminit.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/mminit.c [iso-8859-1] Thu Oct 15 20:54:35 2009
@@ -11,6 +11,9 @@
#include <ntoskrnl.h>
#define NDEBUG
#include <debug.h>
+
+#define MODULE_INVOLVED_IN_ARM3
+#include "ARM3/miarm.h"
/* GLOBALS *******************************************************************/
@@ -69,19 +72,151 @@
PVOID BaseAddress;
PHYSICAL_ADDRESS BoundaryAddressMultiple;
PMEMORY_AREA MArea;
+ NTSTATUS Status;
BoundaryAddressMultiple.QuadPart = 0;
//
- // First initialize the page table and hyperspace memory areas
- //
- MiInitPageDirectoryMap();
+ // Create the memory area to define the PTE base
+ //
+ BaseAddress = (PVOID)PTE_BASE;
+ Status = MmCreateMemoryArea(MmGetKernelAddressSpace(),
+ MEMORY_AREA_OWNED_BY_ARM3 | MEMORY_AREA_STATIC,
+ &BaseAddress,
+ 4 * 1024 * 1024,
+ PAGE_READWRITE,
+ &MArea,
+ TRUE,
+ 0,
+ BoundaryAddressMultiple);
+ ASSERT(Status == STATUS_SUCCESS);
+
+ //
+ // Create the memory area to define Hyperspace
+ //
+ BaseAddress = (PVOID)HYPER_SPACE;
+ Status = MmCreateMemoryArea(MmGetKernelAddressSpace(),
+ MEMORY_AREA_OWNED_BY_ARM3 | MEMORY_AREA_STATIC,
+ &BaseAddress,
+ 4 * 1024 * 1024,
+ PAGE_READWRITE,
+ &MArea,
+ TRUE,
+ 0,
+ BoundaryAddressMultiple);
+ ASSERT(Status == STATUS_SUCCESS);
+
+ //
+ // Protect the PFN database
+ //
+ BaseAddress = MmPfnDatabase;
+ Status = MmCreateMemoryArea(MmGetKernelAddressSpace(),
+ MEMORY_AREA_OWNED_BY_ARM3 | MEMORY_AREA_STATIC,
+ &BaseAddress,
+ (MxPfnAllocation << PAGE_SHIFT),
+ PAGE_READWRITE,
+ &MArea,
+ TRUE,
+ 0,
+ BoundaryAddressMultiple);
+ ASSERT(Status == STATUS_SUCCESS);
+
+ //
+ // ReactOS requires a memory area to keep the initial NP area off-bounds
+ //
+ BaseAddress = MmNonPagedPoolStart;
+ Status = MmCreateMemoryArea(MmGetKernelAddressSpace(),
+ MEMORY_AREA_OWNED_BY_ARM3 | MEMORY_AREA_STATIC,
+ &BaseAddress,
+ MmSizeOfNonPagedPoolInBytes,
+ PAGE_READWRITE,
+ &MArea,
+ TRUE,
+ 0,
+ BoundaryAddressMultiple);
+ ASSERT(Status == STATUS_SUCCESS);
+
+ //
+ // And we need one more for the system NP
+ //
+ BaseAddress = MmNonPagedSystemStart;
+ Status = MmCreateMemoryArea(MmGetKernelAddressSpace(),
+ MEMORY_AREA_OWNED_BY_ARM3 | MEMORY_AREA_STATIC,
+ &BaseAddress,
+ (ULONG_PTR)MmNonPagedPoolEnd -
+ (ULONG_PTR)MmNonPagedSystemStart,
+ PAGE_READWRITE,
+ &MArea,
+ TRUE,
+ 0,
+ BoundaryAddressMultiple);
+ ASSERT(Status == STATUS_SUCCESS);
+
+ //
+ // We also need one for system view space
+ //
+ BaseAddress = MiSystemViewStart;
+ Status = MmCreateMemoryArea(MmGetKernelAddressSpace(),
+ MEMORY_AREA_OWNED_BY_ARM3 | MEMORY_AREA_STATIC,
+ &BaseAddress,
+ MmSystemViewSize,
+ PAGE_READWRITE,
+ &MArea,
+ TRUE,
+ 0,
+ BoundaryAddressMultiple);
+ ASSERT(Status == STATUS_SUCCESS);
+
+ //
+ // And another for session space
+ //
+ BaseAddress = MmSessionBase;
+ Status = MmCreateMemoryArea(MmGetKernelAddressSpace(),
+ MEMORY_AREA_OWNED_BY_ARM3 | MEMORY_AREA_STATIC,
+ &BaseAddress,
+ (ULONG_PTR)MiSessionSpaceEnd -
+ (ULONG_PTR)MmSessionBase,
+ PAGE_READWRITE,
+ &MArea,
+ TRUE,
+ 0,
+ BoundaryAddressMultiple);
+ ASSERT(Status == STATUS_SUCCESS);
+
+ //
+ // One more for ARM paged pool
+ //
+ BaseAddress = MmPagedPoolStart;
+ Status = MmCreateMemoryArea(MmGetKernelAddressSpace(),
+ MEMORY_AREA_OWNED_BY_ARM3 | MEMORY_AREA_STATIC,
+ &BaseAddress,
+ MmSizeOfPagedPoolInBytes,
+ PAGE_READWRITE,
+ &MArea,
+ TRUE,
+ 0,
+ BoundaryAddressMultiple);
+ ASSERT(Status == STATUS_SUCCESS);
+
+ //
+ // And now, ReactOS paged pool
+ //
+ BaseAddress = MmPagedPoolBase;
+ MmCreateMemoryArea(MmGetKernelAddressSpace(),
+ MEMORY_AREA_PAGED_POOL | MEMORY_AREA_STATIC,
+ &BaseAddress,
+ MmPagedPoolSize,
+ PAGE_READWRITE,
+ &MArea,
+ TRUE,
+ 0,
+ BoundaryAddressMultiple);
//
// Next, the KPCR
//
BaseAddress = (PVOID)PCR;
MmCreateMemoryArea(MmGetKernelAddressSpace(),
- MEMORY_AREA_SYSTEM | MEMORY_AREA_STATIC,
+ MEMORY_AREA_OWNED_BY_ARM3 | MEMORY_AREA_STATIC,
&BaseAddress,
PAGE_SIZE * KeNumberProcessors,
PAGE_READWRITE,
@@ -89,13 +224,13 @@
TRUE,
0,
BoundaryAddressMultiple);
-
+
//
// Now the KUSER_SHARED_DATA
//
BaseAddress = (PVOID)KI_USER_SHARED_DATA;
MmCreateMemoryArea(MmGetKernelAddressSpace(),
- MEMORY_AREA_SYSTEM | MEMORY_AREA_STATIC,
+ MEMORY_AREA_OWNED_BY_ARM3 | MEMORY_AREA_STATIC,
&BaseAddress,
PAGE_SIZE,
PAGE_READWRITE,
@@ -103,6 +238,58 @@
TRUE,
0,
BoundaryAddressMultiple);
+}
+
+VOID
+NTAPI
+MiDbgDumpAddressSpace(VOID)
+{
+ //
+ // Print the memory layout
+ //
+ DPRINT1(" 0x%p - 0x%p\t%s\n",
+ MmSystemRangeStart,
+ (ULONG_PTR)MmSystemRangeStart + MmBootImageSize,
+ "Boot Loaded Image");
+ DPRINT1(" 0x%p - 0x%p\t%s\n",
+ MmPagedPoolBase,
+ (ULONG_PTR)MmPagedPoolBase + MmPagedPoolSize,
+ "Paged Pool");
+ DPRINT1(" 0x%p - 0x%p\t%s\n",
+ MmPfnDatabase,
+ (ULONG_PTR)MmPfnDatabase + (MxPfnAllocation << PAGE_SHIFT),
+ "PFN Database");
+ DPRINT1(" 0x%p - 0x%p\t%s\n",
+ MmNonPagedPoolStart,
+ (ULONG_PTR)MmNonPagedPoolStart + MmSizeOfNonPagedPoolInBytes,
+ "ARM³ Non Paged Pool");
+ DPRINT1(" 0x%p - 0x%p\t%s\n",
+ MiSystemViewStart,
+ (ULONG_PTR)MiSystemViewStart + MmSystemViewSize,
+ "System View Space");
+ DPRINT1(" 0x%p - 0x%p\t%s\n",
+ MmSessionBase,
+ MiSessionSpaceEnd,
+ "Session Space");
+ DPRINT1(" 0x%p - 0x%p\t%s\n",
+ PTE_BASE, PDE_BASE,
+ "Page Tables");
+ DPRINT1(" 0x%p - 0x%p\t%s\n",
+ PDE_BASE, HYPER_SPACE,
+ "Page Directories");
+ DPRINT1(" 0x%p - 0x%p\t%s\n",
+ HYPER_SPACE, HYPER_SPACE + (4 * 1024 * 1024),
+ "Hyperspace");
+ DPRINT1(" 0x%p - 0x%p\t%s\n",
+ MmPagedPoolStart,
+ (ULONG_PTR)MmPagedPoolStart + MmSizeOfPagedPoolInBytes,
+ "ARM³ Paged Pool");
+ DPRINT1(" 0x%p - 0x%p\t%s\n",
+ MmNonPagedSystemStart, MmNonPagedPoolExpansionStart,
+ "System PTE Space");
+ DPRINT1(" 0x%p - 0x%p\t%s\n",
+ MmNonPagedPoolExpansionStart, MmNonPagedPoolEnd,
+ "Non Paged Pool Expansion PTE Space");
}
VOID
@@ -149,9 +336,6 @@
//
MmArmInitSystem(0, KeLoaderBlock);
- /* Intialize system memory areas */
- MiInitSystemMemoryAreas();
-
/* Initialize the page list */
MmInitializePageList();
@@ -164,12 +348,13 @@
MmPagedPoolBase = (PVOID)PAGE_ROUND_UP((ULONG_PTR)MmSystemRangeStart +
MmBootImageSize);
MmPagedPoolSize = MM_PAGED_POOL_SIZE;
-
- //
- // Initialize ARM³ in phase 2
- //
- MmArmInitSystem(2, KeLoaderBlock);
-
+
+ /* Intialize system memory areas */
+ MiInitSystemMemoryAreas();
+
+ /* Dump the address space */
+ MiDbgDumpAddressSpace();
+
/* Initialize paged pool */
MmInitializePagedPool();
Modified: trunk/reactos/ntoskrnl/mm/ppool.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ppool.c?rev=43…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/ppool.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/ppool.c [iso-8859-1] Thu Oct 15 20:54:35 2009
@@ -51,23 +51,7 @@
INIT_FUNCTION
NTAPI
MmInitializePagedPool(VOID)
-{
- PVOID BaseAddress;
- PHYSICAL_ADDRESS BoundaryAddressMultiple;
- PMEMORY_AREA MArea;
- BoundaryAddressMultiple.QuadPart = 0;
-
- BaseAddress = MmPagedPoolBase;
- MmCreateMemoryArea(MmGetKernelAddressSpace(),
- MEMORY_AREA_PAGED_POOL,
- &BaseAddress,
- MmPagedPoolSize,
- PAGE_READWRITE,
- &MArea,
- TRUE,
- 0,
- BoundaryAddressMultiple);
-
+{
/*
* We are still at a high IRQL level at this point so explicitly commit
* the first page of the paged pool before writing the first block header.