2 * PROJECT: ReactOS Kernel
3 * LICENSE: BSD - See COPYING.ARM in the top level directory
4 * FILE: ntoskrnl/mm/ARM3/i386/init.c
5 * PURPOSE: ARM Memory Manager Initialization for x86
6 * PROGRAMMERS: ReactOS Portable Systems Group
9 /* INCLUDES *******************************************************************/
15 #line 15 "ARMĀ³::INIT:X86"
16 #define MODULE_INVOLVED_IN_ARM3
17 #include "../../ARM3/miarm.h"
19 /* GLOBALS ********************************************************************/
22 // Before we have a PFN database, memory comes straight from our physical memory
23 // blocks, which is nice because it's guaranteed contiguous and also because once
24 // we take a page from here, the system doesn't see it anymore.
25 // However, once the fun is over, those pages must be re-integrated back into
26 // PFN society life, and that requires us keeping a copy of the original layout
27 // so that we can parse it later.
29 PMEMORY_ALLOCATION_DESCRIPTOR MxFreeDescriptor
;
30 MEMORY_ALLOCATION_DESCRIPTOR MxOldFreeDescriptor
;
32 /* Template PTE and PDE for a kernel page */
33 MMPTE ValidKernelPde
= {.u
.Hard
.Valid
= 1, .u
.Hard
.Write
= 1, .u
.Hard
.Dirty
= 1, .u
.Hard
.Accessed
= 1};
34 MMPTE ValidKernelPte
= {.u
.Hard
.Valid
= 1, .u
.Hard
.Write
= 1, .u
.Hard
.Dirty
= 1, .u
.Hard
.Accessed
= 1};
36 /* Make the code cleaner with some definitions for size multiples */
38 #define _1MB (1000 * _1KB)
40 /* Architecture specific size of a PDE directory, and size of a page table */
41 #define PDE_SIZE (4096 * sizeof(MMPDE))
42 #define PT_SIZE (1024 * sizeof(MMPTE))
44 /* PRIVATE FUNCTIONS **********************************************************/
48 MiComputeNonPagedPoolVa(IN ULONG FreePages
)
50 IN PFN_NUMBER PoolPages
;
52 /* Check if this is a machine with less than 256MB of RAM, and no overide */
53 if ((MmNumberOfPhysicalPages
<= MI_MIN_PAGES_FOR_NONPAGED_POOL_TUNING
) &&
54 !(MmSizeOfNonPagedPoolInBytes
))
56 /* Force the non paged pool to be 2MB so we can reduce RAM usage */
57 MmSizeOfNonPagedPoolInBytes
= 2 * _1MB
;
60 /* Hyperspace ends here */
61 MmHyperSpaceEnd
= (PVOID
)((ULONG_PTR
)MmSystemCacheWorkingSetList
- 1);
63 /* Check if the user gave a ridicuously large nonpaged pool RAM size */
64 if ((MmSizeOfNonPagedPoolInBytes
>> PAGE_SHIFT
) > (FreePages
* 7 / 8))
66 /* More than 7/8ths of RAM was dedicated to nonpaged pool, ignore! */
67 MmSizeOfNonPagedPoolInBytes
= 0;
70 /* Check if no registry setting was set, or if the setting was too low */
71 if (MmSizeOfNonPagedPoolInBytes
< MmMinimumNonPagedPoolSize
)
73 /* Start with the minimum (256 KB) and add 32 KB for each MB above 4 */
74 MmSizeOfNonPagedPoolInBytes
= MmMinimumNonPagedPoolSize
;
75 MmSizeOfNonPagedPoolInBytes
+= (FreePages
- 1024) / 256 * MmMinAdditionNonPagedPoolPerMb
;
78 /* Check if the registy setting or our dynamic calculation was too high */
79 if (MmSizeOfNonPagedPoolInBytes
> MI_MAX_INIT_NONPAGED_POOL_SIZE
)
81 /* Set it to the maximum */
82 MmSizeOfNonPagedPoolInBytes
= MI_MAX_INIT_NONPAGED_POOL_SIZE
;
85 /* Check if a percentage cap was set through the registry */
86 if (MmMaximumNonPagedPoolPercent
) UNIMPLEMENTED
;
88 /* Page-align the nonpaged pool size */
89 MmSizeOfNonPagedPoolInBytes
&= ~(PAGE_SIZE
- 1);
91 /* Now, check if there was a registry size for the maximum size */
92 if (!MmMaximumNonPagedPoolInBytes
)
94 /* Start with the default (1MB) */
95 MmMaximumNonPagedPoolInBytes
= MmDefaultMaximumNonPagedPool
;
97 /* Add space for PFN database */
98 MmMaximumNonPagedPoolInBytes
+= (ULONG
)
99 PAGE_ALIGN((MmHighestPhysicalPage
+ 1) * sizeof(MMPFN
));
101 /* Check if the machine has more than 512MB of free RAM */
102 if (FreePages
>= 0x1F000)
104 /* Add 200KB for each MB above 4 */
105 MmMaximumNonPagedPoolInBytes
+= (FreePages
- 1024) / 256 *
106 (MmMaxAdditionNonPagedPoolPerMb
/ 2);
107 if (MmMaximumNonPagedPoolInBytes
< MI_MAX_NONPAGED_POOL_SIZE
)
109 /* Make it at least 128MB since this machine has a lot of RAM */
110 MmMaximumNonPagedPoolInBytes
= MI_MAX_NONPAGED_POOL_SIZE
;
115 /* Add 400KB for each MB above 4 */
116 MmMaximumNonPagedPoolInBytes
+= (FreePages
- 1024) / 256 *
117 MmMaxAdditionNonPagedPoolPerMb
;
121 /* Make sure there's at least 16 pages + the PFN available for expansion */
122 PoolPages
= MmSizeOfNonPagedPoolInBytes
+ (PAGE_SIZE
* 16) +
123 ((ULONG
)PAGE_ALIGN(MmHighestPhysicalPage
+ 1) * sizeof(MMPFN
));
124 if (MmMaximumNonPagedPoolInBytes
< PoolPages
)
126 /* The maximum should be at least high enough to cover all the above */
127 MmMaximumNonPagedPoolInBytes
= PoolPages
;
130 /* Systems with 2GB of kernel address space get double the size */
131 PoolPages
= MI_MAX_NONPAGED_POOL_SIZE
* 2;
133 /* On the other hand, make sure that PFN + nonpaged pool doesn't get too big */
134 if (MmMaximumNonPagedPoolInBytes
> PoolPages
)
136 /* Trim it down to the maximum architectural limit (256MB) */
137 MmMaximumNonPagedPoolInBytes
= PoolPages
;
140 /* Check if this is a system with > 128MB of non paged pool */
141 if (MmMaximumNonPagedPoolInBytes
> MI_MAX_NONPAGED_POOL_SIZE
)
143 /* Check if the initial size is less than the extra 128MB boost */
144 if (MmSizeOfNonPagedPoolInBytes
< (MmMaximumNonPagedPoolInBytes
-
145 MI_MAX_NONPAGED_POOL_SIZE
))
147 /* FIXME: Should check if the initial pool can be expanded */
149 /* Assume no expansion possible, check ift he maximum is too large */
150 if (MmMaximumNonPagedPoolInBytes
> (MmSizeOfNonPagedPoolInBytes
+
151 MI_MAX_NONPAGED_POOL_SIZE
))
153 /* Set it to the initial value plus the boost */
154 MmMaximumNonPagedPoolInBytes
= MmSizeOfNonPagedPoolInBytes
+
155 MI_MAX_NONPAGED_POOL_SIZE
;
163 MiInitMachineDependent(IN PLOADER_PARAMETER_BLOCK LoaderBlock
)
165 PLIST_ENTRY NextEntry
;
166 PMEMORY_ALLOCATION_DESCRIPTOR MdBlock
;
168 PFN_NUMBER PageFrameIndex
;
169 PMMPTE StartPde
, EndPde
, PointerPte
, LastPte
;
170 MMPTE TempPde
, TempPte
;
171 PVOID NonPagedPoolExpansionVa
;
172 ULONG OldCount
, L2Associativity
;
173 PFN_NUMBER FreePage
, FreePageCount
, PagesLeft
, BasePage
, PageCount
;
175 /* Check for kernel stack size that's too big */
176 if (MmLargeStackSize
> (KERNEL_LARGE_STACK_SIZE
/ _1KB
))
178 /* Sanitize to default value */
179 MmLargeStackSize
= KERNEL_LARGE_STACK_SIZE
;
183 /* Take the registry setting, and convert it into bytes */
184 MmLargeStackSize
*= _1KB
;
186 /* Now align it to a page boundary */
187 MmLargeStackSize
= PAGE_ROUND_UP(MmLargeStackSize
);
190 ASSERT(MmLargeStackSize
<= KERNEL_LARGE_STACK_SIZE
);
191 ASSERT((MmLargeStackSize
& (PAGE_SIZE
- 1)) == 0);
193 /* Make sure it's not too low */
194 if (MmLargeStackSize
< KERNEL_STACK_SIZE
) MmLargeStackSize
= KERNEL_STACK_SIZE
;
197 /* Check for global bit */
198 if (KeFeatureBits
& KF_GLOBAL_PAGE
)
200 /* Set it on the template PTE and PDE */
201 ValidKernelPte
.u
.Hard
.Global
= TRUE
;
202 ValidKernelPde
.u
.Hard
.Global
= TRUE
;
205 /* Now templates are ready */
206 TempPte
= ValidKernelPte
;
207 TempPde
= ValidKernelPde
;
210 // Set CR3 for the system process
212 PointerPte
= MiAddressToPde(PTE_BASE
);
213 PageFrameIndex
= PFN_FROM_PTE(PointerPte
) << PAGE_SHIFT
;
214 PsGetCurrentProcess()->Pcb
.DirectoryTableBase
[0] = PageFrameIndex
;
217 // Blow away user-mode
219 StartPde
= MiAddressToPde(0);
220 EndPde
= MiAddressToPde(KSEG0_BASE
);
221 RtlZeroMemory(StartPde
, (EndPde
- StartPde
) * sizeof(MMPTE
));
224 // Loop the memory descriptors
226 NextEntry
= LoaderBlock
->MemoryDescriptorListHead
.Flink
;
227 while (NextEntry
!= &LoaderBlock
->MemoryDescriptorListHead
)
230 // Get the memory block
232 MdBlock
= CONTAINING_RECORD(NextEntry
,
233 MEMORY_ALLOCATION_DESCRIPTOR
,
237 // Skip invisible memory
239 if ((MdBlock
->MemoryType
!= LoaderFirmwarePermanent
) &&
240 (MdBlock
->MemoryType
!= LoaderSpecialMemory
) &&
241 (MdBlock
->MemoryType
!= LoaderHALCachedMemory
) &&
242 (MdBlock
->MemoryType
!= LoaderBBTMemory
))
245 // Check if BURNMEM was used
247 if (MdBlock
->MemoryType
!= LoaderBad
)
250 // Count this in the total of pages
252 MmNumberOfPhysicalPages
+= MdBlock
->PageCount
;
256 // Check if this is the new lowest page
258 if (MdBlock
->BasePage
< MmLowestPhysicalPage
)
261 // Update the lowest page
263 MmLowestPhysicalPage
= MdBlock
->BasePage
;
267 // Check if this is the new highest page
269 PageFrameIndex
= MdBlock
->BasePage
+ MdBlock
->PageCount
;
270 if (PageFrameIndex
> MmHighestPhysicalPage
)
273 // Update the highest page
275 MmHighestPhysicalPage
= PageFrameIndex
- 1;
279 // Check if this is free memory
281 if ((MdBlock
->MemoryType
== LoaderFree
) ||
282 (MdBlock
->MemoryType
== LoaderLoadedProgram
) ||
283 (MdBlock
->MemoryType
== LoaderFirmwareTemporary
) ||
284 (MdBlock
->MemoryType
== LoaderOsloaderStack
))
287 // Check if this is the largest memory descriptor
289 if (MdBlock
->PageCount
> FreePages
)
294 MxFreeDescriptor
= MdBlock
;
300 FreePages
+= MdBlock
->PageCount
;
307 NextEntry
= MdBlock
->ListEntry
.Flink
;
311 // Save original values of the free descriptor, since it'll be
312 // altered by early allocations
314 MxOldFreeDescriptor
= *MxFreeDescriptor
;
316 /* Compute non paged pool limits and size */
317 MiComputeNonPagedPoolVa(FreePages
);
320 // Get L2 cache information
322 L2Associativity
= KeGetPcr()->SecondLevelCacheAssociativity
;
323 MmSecondaryColors
= KeGetPcr()->SecondLevelCacheSize
;
324 if (L2Associativity
) MmSecondaryColors
/= L2Associativity
;
327 // Compute final color mask and count
329 MmSecondaryColors
>>= PAGE_SHIFT
;
330 if (!MmSecondaryColors
) MmSecondaryColors
= 1;
331 MmSecondaryColorMask
= MmSecondaryColors
- 1;
336 KeGetCurrentPrcb()->SecondaryColorMask
= MmSecondaryColorMask
;
339 // Calculate the number of bytes for the PFN database
340 // and then convert to pages
342 MxPfnAllocation
= (MmHighestPhysicalPage
+ 1) * sizeof(MMPFN
);
343 MxPfnAllocation
>>= PAGE_SHIFT
;
346 // We have to add one to the count here, because in the process of
347 // shifting down to the page size, we actually ended up getting the
348 // lower aligned size (so say, 0x5FFFF bytes is now 0x5F pages).
349 // Later on, we'll shift this number back into bytes, which would cause
350 // us to end up with only 0x5F000 bytes -- when we actually want to have
356 // Now calculate the nonpaged pool expansion VA region
358 MmNonPagedPoolStart
= (PVOID
)((ULONG_PTR
)MmNonPagedPoolEnd
-
359 MmMaximumNonPagedPoolInBytes
+
360 MmSizeOfNonPagedPoolInBytes
);
361 MmNonPagedPoolStart
= (PVOID
)PAGE_ALIGN(MmNonPagedPoolStart
);
362 NonPagedPoolExpansionVa
= MmNonPagedPoolStart
;
363 DPRINT("NP Pool has been tuned to: %d bytes and %d bytes\n",
364 MmSizeOfNonPagedPoolInBytes
, MmMaximumNonPagedPoolInBytes
);
367 // Now calculate the nonpaged system VA region, which includes the
368 // nonpaged pool expansion (above) and the system PTEs. Note that it is
369 // then aligned to a PDE boundary (4MB).
371 MmNonPagedSystemStart
= (PVOID
)((ULONG_PTR
)MmNonPagedPoolStart
-
372 (MmNumberOfSystemPtes
+ 1) * PAGE_SIZE
);
373 MmNonPagedSystemStart
= (PVOID
)((ULONG_PTR
)MmNonPagedSystemStart
&
374 ~((4 * 1024 * 1024) - 1));
377 // Don't let it go below the minimum
379 if (MmNonPagedSystemStart
< (PVOID
)0xEB000000)
382 // This is a hard-coded limit in the Windows NT address space
384 MmNonPagedSystemStart
= (PVOID
)0xEB000000;
387 // Reduce the amount of system PTEs to reach this point
389 MmNumberOfSystemPtes
= ((ULONG_PTR
)MmNonPagedPoolStart
-
390 (ULONG_PTR
)MmNonPagedSystemStart
) >>
392 MmNumberOfSystemPtes
--;
393 ASSERT(MmNumberOfSystemPtes
> 1000);
397 // Check if we are in a situation where the size of the paged pool
398 // is so large that it overflows into nonpaged pool
400 if (MmSizeOfPagedPoolInBytes
>
401 ((ULONG_PTR
)MmNonPagedSystemStart
- (ULONG_PTR
)MmPagedPoolStart
))
404 // We need some recalculations here
406 DPRINT1("Paged pool is too big!\n");
410 // Normally, the PFN database should start after the loader images.
411 // This is already the case in ReactOS, but for now we want to co-exist
412 // with the old memory manager, so we'll create a "Shadow PFN Database"
413 // instead, and arbitrarly start it at 0xB0000000.
415 MmPfnDatabase
= (PVOID
)0xB0000000;
416 ASSERT(((ULONG_PTR
)MmPfnDatabase
& ((4 * 1024 * 1024) - 1)) == 0);
419 // Non paged pool comes after the PFN database
421 MmNonPagedPoolStart
= (PVOID
)((ULONG_PTR
)MmPfnDatabase
+
422 (MxPfnAllocation
<< PAGE_SHIFT
));
425 // Now we actually need to get these many physical pages. Nonpaged pool
426 // is actually also physically contiguous (but not the expansion)
428 PageFrameIndex
= MxGetNextPage(MxPfnAllocation
+
429 (MmSizeOfNonPagedPoolInBytes
>> PAGE_SHIFT
));
430 ASSERT(PageFrameIndex
!= 0);
431 DPRINT("PFN DB PA PFN begins at: %lx\n", PageFrameIndex
);
432 DPRINT("NP PA PFN begins at: %lx\n", PageFrameIndex
+ MxPfnAllocation
);
435 // Now we need some pages to create the page tables for the NP system VA
436 // which includes system PTEs and expansion NP
438 StartPde
= MiAddressToPde(MmNonPagedSystemStart
);
439 EndPde
= MiAddressToPde((PVOID
)((ULONG_PTR
)MmNonPagedPoolEnd
- 1));
440 while (StartPde
<= EndPde
)
445 ASSERT(StartPde
->u
.Hard
.Valid
== 0);
450 TempPde
.u
.Hard
.PageFrameNumber
= MxGetNextPage(1);
451 ASSERT(TempPde
.u
.Hard
.Valid
== 1);
455 // Zero out the page table
457 PointerPte
= MiPteToAddress(StartPde
);
458 RtlZeroMemory(PointerPte
, PAGE_SIZE
);
467 // Now we need pages for the page tables which will map initial NP
469 StartPde
= MiAddressToPde(MmPfnDatabase
);
470 EndPde
= MiAddressToPde((PVOID
)((ULONG_PTR
)MmNonPagedPoolStart
+
471 MmSizeOfNonPagedPoolInBytes
- 1));
472 while (StartPde
<= EndPde
)
477 ASSERT(StartPde
->u
.Hard
.Valid
== 0);
482 TempPde
.u
.Hard
.PageFrameNumber
= MxGetNextPage(1);
483 ASSERT(TempPde
.u
.Hard
.Valid
== 1);
487 // Zero out the page table
489 PointerPte
= MiPteToAddress(StartPde
);
490 RtlZeroMemory(PointerPte
, PAGE_SIZE
);
499 // Now remember where the expansion starts
501 MmNonPagedPoolExpansionStart
= NonPagedPoolExpansionVa
;
504 // Last step is to actually map the nonpaged pool
506 PointerPte
= MiAddressToPte(MmNonPagedPoolStart
);
507 LastPte
= MiAddressToPte((PVOID
)((ULONG_PTR
)MmNonPagedPoolStart
+
508 MmSizeOfNonPagedPoolInBytes
- 1));
509 while (PointerPte
<= LastPte
)
512 // Use one of our contigous pages
514 TempPte
.u
.Hard
.PageFrameNumber
= PageFrameIndex
++;
515 ASSERT(PointerPte
->u
.Hard
.Valid
== 0);
516 ASSERT(TempPte
.u
.Hard
.Valid
== 1);
517 *PointerPte
++ = TempPte
;
521 // Sanity check: make sure we have properly defined the system PTE space
523 ASSERT(MiAddressToPte(MmNonPagedSystemStart
) <
524 MiAddressToPte(MmNonPagedPoolExpansionStart
));
527 // Now go ahead and initialize the ARMĀ³ nonpaged pool
529 MiInitializeArmPool();
532 // Get current page data, since we won't be using MxGetNextPage as it
533 // would corrupt our state
535 FreePage
= MxFreeDescriptor
->BasePage
;
536 FreePageCount
= MxFreeDescriptor
->PageCount
;
540 // Loop the memory descriptors
542 NextEntry
= KeLoaderBlock
->MemoryDescriptorListHead
.Flink
;
543 while (NextEntry
!= &KeLoaderBlock
->MemoryDescriptorListHead
)
546 // Get the descriptor
548 MdBlock
= CONTAINING_RECORD(NextEntry
,
549 MEMORY_ALLOCATION_DESCRIPTOR
,
551 if ((MdBlock
->MemoryType
== LoaderFirmwarePermanent
) ||
552 (MdBlock
->MemoryType
== LoaderBBTMemory
) ||
553 (MdBlock
->MemoryType
== LoaderSpecialMemory
))
556 // These pages are not part of the PFN database
558 NextEntry
= MdBlock
->ListEntry
.Flink
;
563 // Next, check if this is our special free descriptor we've found
565 if (MdBlock
== MxFreeDescriptor
)
568 // Use the real numbers instead
570 BasePage
= MxOldFreeDescriptor
.BasePage
;
571 PageCount
= MxOldFreeDescriptor
.PageCount
;
576 // Use the descriptor's numbers
578 BasePage
= MdBlock
->BasePage
;
579 PageCount
= MdBlock
->PageCount
;
583 // Get the PTEs for this range
585 PointerPte
= MiAddressToPte(&MmPfnDatabase
[BasePage
]);
586 LastPte
= MiAddressToPte(((ULONG_PTR
)&MmPfnDatabase
[BasePage
+ PageCount
]) - 1);
587 DPRINT("MD Type: %lx Base: %lx Count: %lx\n", MdBlock
->MemoryType
, BasePage
, PageCount
);
592 while (PointerPte
<= LastPte
)
595 // We'll only touch PTEs that aren't already valid
597 if (PointerPte
->u
.Hard
.Valid
== 0)
600 // Use the next free page
602 TempPte
.u
.Hard
.PageFrameNumber
= FreePage
;
603 ASSERT(FreePageCount
!= 0);
606 // Consume free pages
615 KeBugCheckEx(INSTALL_MORE_MEMORY
,
616 MmNumberOfPhysicalPages
,
618 MxOldFreeDescriptor
.PageCount
,
623 // Write out this PTE
626 ASSERT(PointerPte
->u
.Hard
.Valid
== 0);
627 ASSERT(TempPte
.u
.Hard
.Valid
== 1);
628 *PointerPte
= TempPte
;
633 RtlZeroMemory(MiPteToAddress(PointerPte
), PAGE_SIZE
);
643 // Do the next address range
645 NextEntry
= MdBlock
->ListEntry
.Flink
;
649 // Now update the free descriptors to consume the pages we used up during
650 // the PFN allocation loop
652 MxFreeDescriptor
->BasePage
= FreePage
;
653 MxFreeDescriptor
->PageCount
= FreePageCount
;
655 /* Call back into shitMM to setup the PFN database */
656 MmInitializePageList();
659 // Reset the descriptor back so we can create the correct memory blocks
661 *MxFreeDescriptor
= MxOldFreeDescriptor
;
664 // Initialize the nonpaged pool
666 InitializePool(NonPagedPool
, 0);
669 // We PDE-aligned the nonpaged system start VA, so haul some extra PTEs!
671 PointerPte
= MiAddressToPte(MmNonPagedSystemStart
);
672 OldCount
= MmNumberOfSystemPtes
;
673 MmNumberOfSystemPtes
= MiAddressToPte(MmNonPagedPoolExpansionStart
) -
675 MmNumberOfSystemPtes
--;
676 DPRINT("Final System PTE count: %d (%d bytes)\n",
677 MmNumberOfSystemPtes
, MmNumberOfSystemPtes
* PAGE_SIZE
);
680 // Create the system PTE space
682 MiInitializeSystemPtes(PointerPte
, MmNumberOfSystemPtes
, SystemPteSpace
);
685 // Get the PDE For hyperspace
687 StartPde
= MiAddressToPde(HYPER_SPACE
);
690 // Allocate a page for it and create it
692 PageFrameIndex
= MmAllocPage(MC_SYSTEM
, 0);
693 TempPde
.u
.Hard
.PageFrameNumber
= PageFrameIndex
;
694 TempPde
.u
.Hard
.Global
= FALSE
; // Hyperspace is local!
695 ASSERT(StartPde
->u
.Hard
.Valid
== 0);
696 ASSERT(TempPde
.u
.Hard
.Valid
== 1);
700 // Zero out the page table now
702 PointerPte
= MiAddressToPte(HYPER_SPACE
);
703 RtlZeroMemory(PointerPte
, PAGE_SIZE
);
706 // Setup the mapping PTEs
708 MmFirstReservedMappingPte
= MiAddressToPte(MI_MAPPING_RANGE_START
);
709 MmLastReservedMappingPte
= MiAddressToPte(MI_MAPPING_RANGE_END
);
710 MmFirstReservedMappingPte
->u
.Hard
.PageFrameNumber
= MI_HYPERSPACE_PTES
;
713 // Reserve system PTEs for zeroing PTEs and clear them
715 MiFirstReservedZeroingPte
= MiReserveSystemPtes(MI_ZERO_PTES
,
717 RtlZeroMemory(MiFirstReservedZeroingPte
, MI_ZERO_PTES
* sizeof(MMPTE
));
720 // Set the counter to maximum to boot with
722 MiFirstReservedZeroingPte
->u
.Hard
.PageFrameNumber
= MI_ZERO_PTES
- 1;
724 return STATUS_SUCCESS
;