ReactOS 0.4.15-dev-7842-g558ab78
init.c File Reference
#include <ntoskrnl.h>
#include <debug.h>
#include <mm/ARM3/miarm.h>
Include dependency graph for init.c:

Go to the source code of this file.

Macros

#define NDEBUG
 
#define MODULE_INVOLVED_IN_ARM3
 

Functions

VOID NTAPI MiInitializeSessionSpaceLayout (VOID)
 
VOID NTAPI MiComputeNonPagedPoolVa (IN ULONG FreePages)
 
NTSTATUS NTAPI MiInitMachineDependent (IN PLOADER_PARAMETER_BLOCK LoaderBlock)
 

Variables

MMPTE ValidKernelPde = {{PTE_VALID|PTE_READWRITE|PTE_DIRTY|PTE_ACCESSED}}
 
MMPTE ValidKernelPte = {{PTE_VALID|PTE_READWRITE|PTE_DIRTY|PTE_ACCESSED}}
 
MMPTE ValidKernelPdeLocal = {{PTE_VALID|PTE_READWRITE|PTE_DIRTY|PTE_ACCESSED}}
 
MMPTE ValidKernelPteLocal = {{PTE_VALID|PTE_READWRITE|PTE_DIRTY|PTE_ACCESSED}}
 
MMPDE DemandZeroPde = {{MM_READWRITE << MM_PTE_SOFTWARE_PROTECTION_BITS}}
 
MMPTE DemandZeroPte = {{MM_READWRITE << MM_PTE_SOFTWARE_PROTECTION_BITS}}
 
MMPTE PrototypePte
 
MMPTE MmDecommittedPte = {{MM_DECOMMIT << MM_PTE_SOFTWARE_PROTECTION_BITS}}
 

Macro Definition Documentation

◆ MODULE_INVOLVED_IN_ARM3

#define MODULE_INVOLVED_IN_ARM3

Definition at line 15 of file init.c.

◆ NDEBUG

#define NDEBUG

Definition at line 12 of file init.c.

Function Documentation

◆ MiComputeNonPagedPoolVa()

VOID NTAPI MiComputeNonPagedPoolVa ( IN ULONG  FreePages)

Definition at line 126 of file init.c.

127{
128 IN PFN_NUMBER PoolPages;
129
130 /* Check if this is a machine with less than 256MB of RAM, and no overide */
133 {
134 /* Force the non paged pool to be 2MB so we can reduce RAM usage */
136 }
137
138 /* Hyperspace ends here */
140
141 /* Check if the user gave a ridicuously large nonpaged pool RAM size */
142 if ((MmSizeOfNonPagedPoolInBytes >> PAGE_SHIFT) > (FreePages * 7 / 8))
143 {
144 /* More than 7/8ths of RAM was dedicated to nonpaged pool, ignore! */
146 }
147
148 /* Check if no registry setting was set, or if the setting was too low */
150 {
151 /* Start with the minimum (256 KB) and add 32 KB for each MB above 4 */
154 }
155
156 /* Check if the registy setting or our dynamic calculation was too high */
158 {
159 /* Set it to the maximum */
161 }
162
163 /* Check if a percentage cap was set through the registry */
165
166 /* Page-align the nonpaged pool size */
168
169 /* Now, check if there was a registry size for the maximum size */
171 {
172 /* Start with the default (1MB) */
174
175 /* Add space for PFN database */
177 PAGE_ALIGN((MmHighestPhysicalPage + 1) * sizeof(MMPFN));
178
179 /* Check if the machine has more than 512MB of free RAM */
180 if (FreePages >= 0x1F000)
181 {
182 /* Add 200KB for each MB above 4 */
183 MmMaximumNonPagedPoolInBytes += (FreePages - 1024) / 256 *
186 {
187 /* Make it at least 128MB since this machine has a lot of RAM */
189 }
190 }
191 else
192 {
193 /* Add 400KB for each MB above 4 */
194 MmMaximumNonPagedPoolInBytes += (FreePages - 1024) / 256 *
196 }
197 }
198
199 /* Make sure there's at least 16 pages + the PFN available for expansion */
200 PoolPages = MmSizeOfNonPagedPoolInBytes + (PAGE_SIZE * 16) +
202 if (MmMaximumNonPagedPoolInBytes < PoolPages)
203 {
204 /* The maximum should be at least high enough to cover all the above */
206 }
207
208 /* Systems with 2GB of kernel address space get double the size */
209 PoolPages = MI_MAX_NONPAGED_POOL_SIZE * 2;
210
211 /* On the other hand, make sure that PFN + nonpaged pool doesn't get too big */
212 if (MmMaximumNonPagedPoolInBytes > PoolPages)
213 {
214 /* Trim it down to the maximum architectural limit (256MB) */
216 }
217
218 /* Check if this is a system with > 128MB of non paged pool */
220 {
221 /* Check if the initial size is less than the extra 128MB boost */
224 {
225 /* FIXME: Should check if the initial pool can be expanded */
226
227 /* Assume no expansion possible, check ift he maximum is too large */
230 {
231 /* Set it to the initial value plus the boost */
234 }
235 }
236 }
237}
#define UNIMPLEMENTED
Definition: debug.h:115
#define PAGE_SIZE
Definition: env_spec_w32.h:49
#define PAGE_SHIFT
Definition: env_spec_w32.h:45
PFN_NUMBER MmHighestPhysicalPage
Definition: meminit.c:31
SIZE_T MmMinimumNonPagedPoolSize
Definition: mminit.c:39
PMMWSL MmSystemCacheWorkingSetList
Definition: mminit.c:174
#define _1MB
Definition: miarm.h:19
ULONG MmMaxAdditionNonPagedPoolPerMb
Definition: mminit.c:42
ULONG MmMinAdditionNonPagedPoolPerMb
Definition: mminit.c:40
SIZE_T MmDefaultMaximumNonPagedPool
Definition: mminit.c:41
#define MI_MIN_PAGES_FOR_NONPAGED_POOL_TUNING
Definition: mm.h:54
#define MI_MAX_INIT_NONPAGED_POOL_SIZE
Definition: mm.h:59
#define MI_MAX_NONPAGED_POOL_SIZE
Definition: mm.h:60
PFN_COUNT MmNumberOfPhysicalPages
Definition: init.c:48
struct _MMPFN MMPFN
ULONG MmMaximumNonPagedPoolPercent
Definition: init.c:20
ULONG MmMaximumNonPagedPoolInBytes
Definition: init.c:22
ULONG MmSizeOfNonPagedPoolInBytes
Definition: init.c:21
PVOID MmHyperSpaceEnd
Definition: init.c:56
ULONG PFN_NUMBER
Definition: ke.h:9
void * PVOID
Definition: typedefs.h:50
uint32_t ULONG_PTR
Definition: typedefs.h:65
#define IN
Definition: typedefs.h:39
uint32_t ULONG
Definition: typedefs.h:59
#define PAGE_ALIGN(Va)

Referenced by MiInitMachineDependent().

◆ MiInitializeSessionSpaceLayout()

VOID NTAPI MiInitializeSessionSpaceLayout ( VOID  )

Definition at line 45 of file init.c.

46{
47 //
48 // Set the size of session view, pool, and image
49 //
54
55 //
56 // Set the size of system view
57 //
59
60 //
61 // This is where it all ends
62 //
64
65 //
66 // This is where we will load Win32k.sys and the video driver
67 //
70
71 //
72 // So the view starts right below the session working set (itself below
73 // the image area)
74 //
79
80 //
81 // Session pool follows
82 //
86
87 //
88 // And it all begins here
89 //
91
92 //
93 // Sanity check that our math is correct
94 //
96
97 //
98 // Session space ends wherever image session space ends
99 //
101
102 //
103 // System view space ends at session space, so now that we know where
104 // this is, we can compute the base address of system view space itself.
105 //
108
109 /* Compute the PTE addresses for all the addresses we carved out */
115
116 /* Initialize session space */
121}
PMMPTE MiSessionBasePte
Definition: mminit.c:145
struct _MM_SESSION_SPACE * PMM_SESSION_SPACE
PMM_SESSION_SPACE MmSessionSpace
Definition: session.c:21
PMMPTE MiSessionImagePteEnd
Definition: mminit.c:144
PMMPTE MiSessionLastPte
Definition: mminit.c:146
PMMPTE MiSessionImagePteStart
Definition: mminit.c:143
PVOID MiSessionSpaceWs
Definition: mminit.c:130
#define MiAddressToPte(x)
Definition: mmx86.c:19
#define PTE_BASE
Definition: mmx86.c:14
#define ASSERT(a)
Definition: mode.c:44
#define MM_ALLOCATION_GRANULARITY
Definition: mmtypes.h:36
#define MI_SESSION_WORKING_SET_SIZE
Definition: mm.h:65
#define MI_SESSION_SIZE
Definition: mm.h:66
#define MI_SESSION_VIEW_SIZE
Definition: mm.h:62
#define MI_SESSION_IMAGE_SIZE
Definition: mm.h:64
#define MI_SYSTEM_VIEW_SIZE
Definition: mm.h:61
#define MI_SESSION_POOL_SIZE
Definition: mm.h:63
ULONG MmSessionImageSize
Definition: init.c:37
ULONG MmSessionSize
Definition: init.c:34
PVOID MiSessionViewStart
Definition: init.c:30
ULONG MmSessionViewSize
Definition: init.c:35
PVOID MiSessionImageStart
Definition: init.c:29
PVOID MiSessionPoolStart
Definition: init.c:32
ULONG MmSystemViewSize
Definition: init.c:39
ULONG MmSessionPoolSize
Definition: init.c:36
PVOID MmSessionBase
Definition: init.c:33
PVOID MiSystemViewStart
Definition: init.c:38
PVOID MiSessionImageEnd
Definition: init.c:28
PVOID MiSessionSpaceEnd
Definition: init.c:27
PVOID MiSessionPoolEnd
Definition: init.c:31

◆ MiInitMachineDependent()

NTSTATUS NTAPI MiInitMachineDependent ( IN PLOADER_PARAMETER_BLOCK  LoaderBlock)

Definition at line 242 of file init.c.

243{
244 PFN_NUMBER PageFrameIndex;
245 PMMPTE StartPde, EndPde, PointerPte, LastPte;
247 PVOID NonPagedPoolExpansionVa;
248 SIZE_T NonPagedSystemSize;
250 PMMPFN Pfn1;
251 ULONG Flags;
252
253#if defined(_GLOBAL_PAGES_ARE_AWESOME_)
254
255 /* Check for global bit */
257 {
258 /* Set it on the template PTE and PDE */
261 }
262
263#endif
264
265 /* Now templates are ready */
268
269 //
270 // Set CR3 for the system process
271 //
272 PointerPte = MiAddressToPde(PDE_BASE);
273 PageFrameIndex = PFN_FROM_PTE(PointerPte) << PAGE_SHIFT;
274 PsGetCurrentProcess()->Pcb.DirectoryTableBase[0] = PageFrameIndex;
275
276 //
277 // Blow away user-mode
278 //
279 StartPde = MiAddressToPde(0);
280 EndPde = MiAddressToPde(KSEG0_BASE);
281 RtlZeroMemory(StartPde, (EndPde - StartPde) * sizeof(MMPTE));
282
283 /* Compute non paged pool limits and size */
285
286 //
287 // Now calculate the nonpaged pool expansion VA region
288 //
293 NonPagedPoolExpansionVa = MmNonPagedPoolStart;
294 DPRINT("NP Pool has been tuned to: %lu bytes and %lu bytes\n",
296
297 //
298 // Now calculate the nonpaged system VA region, which includes the
299 // nonpaged pool expansion (above) and the system PTEs. Note that it is
300 // then aligned to a PDE boundary (4MB).
301 //
302 NonPagedSystemSize = (MmNumberOfSystemPtes + 1) * PAGE_SIZE;
304 NonPagedSystemSize);
306 ~(PDE_MAPPED_VA - 1));
307
308 //
309 // Don't let it go below the minimum
310 //
311 if (MmNonPagedSystemStart < (PVOID)0xEB000000)
312 {
313 //
314 // This is a hard-coded limit in the Windows NT address space
315 //
316 MmNonPagedSystemStart = (PVOID)0xEB000000;
317
318 //
319 // Reduce the amount of system PTEs to reach this point
320 //
326 }
327
328 //
329 // Check if we are in a situation where the size of the paged pool
330 // is so large that it overflows into nonpaged pool
331 //
334 {
335 //
336 // We need some recalculations here
337 //
338 DPRINT1("Paged pool is too big!\n");
339 }
340
341 //
342 // Normally, the PFN database should start after the loader images.
343 // This is already the case in ReactOS, but for now we want to co-exist
344 // with the old memory manager, so we'll create a "Shadow PFN Database"
345 // instead, and arbitrarly start it at 0xB0000000.
346 //
347 MmPfnDatabase = (PVOID)0xB0000000;
349
350 //
351 // Non paged pool comes after the PFN database
352 //
355
356 //
357 // Now we actually need to get these many physical pages. Nonpaged pool
358 // is actually also physically contiguous (but not the expansion)
359 //
360 PageFrameIndex = MxGetNextPage(MxPfnAllocation +
362 ASSERT(PageFrameIndex != 0);
363 DPRINT("PFN DB PA PFN begins at: %lx\n", PageFrameIndex);
364 DPRINT("NP PA PFN begins at: %lx\n", PageFrameIndex + MxPfnAllocation);
365
366 /* Convert nonpaged pool size from bytes to pages */
368
369 //
370 // Now we need some pages to create the page tables for the NP system VA
371 // which includes system PTEs and expansion NP
372 //
375 while (StartPde <= EndPde)
376 {
377 //
378 // Get a page
379 //
381 MI_WRITE_VALID_PTE(StartPde, TempPde);
382
383 //
384 // Zero out the page table
385 //
386 PointerPte = MiPteToAddress(StartPde);
387 RtlZeroMemory(PointerPte, PAGE_SIZE);
388
389 //
390 // Next
391 //
392 StartPde++;
393 }
394
395 //
396 // Now we need pages for the page tables which will map initial NP
397 //
398 StartPde = MiAddressToPde(MmPfnDatabase);
401 while (StartPde <= EndPde)
402 {
403 //
404 // Get a page
405 //
407 MI_WRITE_VALID_PTE(StartPde, TempPde);
408
409 //
410 // Zero out the page table
411 //
412 PointerPte = MiPteToAddress(StartPde);
413 RtlZeroMemory(PointerPte, PAGE_SIZE);
414
415 //
416 // Next
417 //
418 StartPde++;
419 }
420
422
423 //
424 // Now remember where the expansion starts
425 //
426 MmNonPagedPoolExpansionStart = NonPagedPoolExpansionVa;
427
428 //
429 // Last step is to actually map the nonpaged pool
430 //
434 while (PointerPte <= LastPte)
435 {
436 //
437 // Use one of our contigous pages
438 //
439 TempPte.u.Hard.PageFrameNumber = PageFrameIndex++;
440 MI_WRITE_VALID_PTE(PointerPte++, TempPte);
441 }
442
443 //
444 // Sanity check: make sure we have properly defined the system PTE space
445 //
448
449 /* Now go ahead and initialize the nonpaged pool */
452
453 /* Map the PFN database pages */
454 MiMapPfnDatabase(LoaderBlock);
455
456 /* Initialize the color tables */
458
459 /* Build the PFN Database */
460 MiInitializePfnDatabase(LoaderBlock);
462
463 //
464 // Reset the descriptor back so we can create the correct memory blocks
465 //
467
468 //
469 // Initialize the nonpaged pool
470 //
472
473 //
474 // We PDE-aligned the nonpaged system start VA, so haul some extra PTEs!
475 //
478 PointerPte;
480 DPRINT("Final System PTE count: %lu (%lu bytes)\n",
482
483 //
484 // Create the system PTE space
485 //
487
488 /* Get the PDE For hyperspace */
489 StartPde = MiAddressToPde(HYPER_SPACE);
490
491 /* Lock PFN database */
492 OldIrql = MiAcquirePfnLock();
493
494 /* Allocate a page for hyperspace and create it */
496 MI_SET_PROCESS2("Kernel");
497 PageFrameIndex = MiRemoveAnyPage(0);
499 TempPde.u.Hard.PageFrameNumber = PageFrameIndex;
500 MI_WRITE_VALID_PTE(StartPde, TempPde);
501 PsGetCurrentProcess()->Pcb.DirectoryTableBase[1] = PageFrameIndex << PAGE_SHIFT;
502
503 /* Flush the TLB */
505
506 /* Release the lock */
507 MiReleasePfnLock(OldIrql);
508
509 //
510 // Zero out the page table now
511 //
512 PointerPte = MiAddressToPte(HYPER_SPACE);
513 RtlZeroMemory(PointerPte, PAGE_SIZE);
514
515 //
516 // Setup the mapping PTEs
517 //
521
522 /* Set the working set address */
524
525 //
526 // Reserve system PTEs for zeroing PTEs and clear them
527 //
531
532 //
533 // Set the counter to maximum to boot with
534 //
536
537 /* Lock PFN database */
538 OldIrql = MiAcquirePfnLock();
539
540 /* Reset the ref/share count so that MmInitializeProcessAddressSpace works */
542 Pfn1->u2.ShareCount = 0;
543 Pfn1->u3.e2.ReferenceCount = 0;
544
545 /* Get a page for the working set list */
547 MI_SET_PROCESS2("Kernel WS List");
548 PageFrameIndex = MiRemoveAnyPage(0);
550 TempPte.u.Hard.PageFrameNumber = PageFrameIndex;
551
552 /* Map the working set list */
553 PointerPte = MiAddressToPte(MmWorkingSetList);
554 MI_WRITE_VALID_PTE(PointerPte, TempPte);
555
556 /* Zero it out, and save the frame index */
558 PsGetCurrentProcess()->WorkingSetPage = PageFrameIndex;
559
560 /* Check for Pentium LOCK errata */
562 {
563 /* Mark the 1st IDT page as Write-Through to prevent a lockup
564 on a F00F instruction.
565 See http://www.rcollins.org/Errata/Dec97/F00FBug.html */
566 PointerPte = MiAddressToPte(KeGetPcr()->IDT);
567 PointerPte->u.Hard.WriteThrough = 1;
568 }
569
570 /* Release the lock */
571 MiReleasePfnLock(OldIrql);
572
573 /* Initialize the bogus address space */
574 Flags = 0;
576
577 /* Make sure the color lists are valid */
579 StartPde = MiAddressToPde(MmFreePagesByColor[0]);
580 ASSERT(StartPde->u.Hard.Valid == 1);
581 PointerPte = MiAddressToPte(MmFreePagesByColor[0]);
582 ASSERT(PointerPte->u.Hard.Valid == 1);
584 ASSERT(LastPte->u.Hard.Valid == 1);
585
586 /* Loop the color list PTEs */
587 while (PointerPte <= LastPte)
588 {
589 /* Get the PFN entry */
590 Pfn1 = MiGetPfnEntry(PFN_FROM_PTE(PointerPte));
591 if (!Pfn1->u3.e2.ReferenceCount)
592 {
593 /* Fill it out */
594 Pfn1->u4.PteFrame = PFN_FROM_PTE(StartPde);
595 Pfn1->PteAddress = PointerPte;
596 Pfn1->u2.ShareCount++;
597 Pfn1->u3.e2.ReferenceCount = 1;
600 }
601
602 /* Keep going */
603 PointerPte++;
604 }
605
606 /* All done */
607 return STATUS_SUCCESS;
608}
HARDWARE_PTE_ARMV6 TempPte
Definition: winldr.c:76
#define PDE_BASE
Definition: winldr.c:21
HARDWARE_PDE_ARMV6 TempPde
Definition: winldr.c:78
#define DPRINT1
Definition: precomp.h:8
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define ULONG_PTR
Definition: config.h:101
UCHAR KIRQL
Definition: env_spec_w32.h:591
#define NonPagedPool
Definition: env_spec_w32.h:307
VOID NTAPI InitializePool(IN POOL_TYPE PoolType, IN ULONG Threshold)
Definition: expool.c:1020
PMMPTE MmLastReservedMappingPte
Definition: hypermap.c:20
PMMPTE MiFirstReservedZeroingPte
Definition: hypermap.c:21
PMMPTE MmFirstReservedMappingPte
Definition: hypermap.c:20
@ SystemPteSpace
Definition: miarm.h:403
VOID NTAPI MiInitializeSystemPtes(IN PMMPTE StartingPte, IN ULONG NumberOfPtes, IN MMSYSTEM_PTE_POOL_TYPE PoolType)
Definition: syspte.c:388
PFN_NUMBER MiNumberOfFreePages
Definition: mminit.c:384
PVOID MmPagedPoolStart
Definition: miarm.h:574
VOID NTAPI MiInitializePfnDatabase(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
Definition: mminit.c:1074
ULONG_PTR MmSubsectionBase
Definition: section.c:196
PVOID MmNonPagedPoolEnd
Definition: mminit.c:99
VOID NTAPI MiInitializeColorTables(VOID)
Definition: mminit.c:562
PFN_NUMBER NTAPI MxGetNextPage(IN PFN_NUMBER PageCount)
Definition: mminit.c:483
ULONG MmSecondaryColors
Definition: mminit.c:256
PFN_NUMBER NTAPI MiRemoveAnyPage(IN ULONG Color)
Definition: pfnlist.c:477
PFN_NUMBER MmMaximumNonPagedPoolInPages
Definition: mminit.c:30
VOID NTAPI MiInitializeNonPagedPoolThresholds(VOID)
Definition: pool.c:186
@ MiCached
Definition: miarm.h:411
PMMPTE NTAPI MiReserveSystemPtes(IN ULONG NumberOfPtes, IN MMSYSTEM_PTE_POOL_TYPE SystemPtePoolType)
Definition: syspte.c:246
VOID NTAPI MiMapPfnDatabase(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
Definition: mminit.c:672
FORCEINLINE VOID MI_WRITE_VALID_PTE(IN PMMPTE PointerPte, IN MMPTE TempPte)
Definition: miarm.h:959
SIZE_T MmSizeOfPagedPoolInBytes
Definition: miarm.h:585
PMMCOLOR_TABLES MmFreePagesByColor[FreePageList+1]
Definition: mminit.c:286
#define MiAddressToPde(x)
Definition: mmx86.c:20
#define KSEG0_BASE
Definition: ketypes.h:339
#define KF_GLOBAL_PAGE
Definition: ketypes.h:35
#define KeGetPcr()
Definition: ketypes.h:81
@ ActiveAndValid
Definition: mmtypes.h:159
PMMWSL MmWorkingSetList
Definition: wslist.cpp:19
#define MI_MAPPING_RANGE_START
Definition: mm.h:47
#define HYPER_SPACE
Definition: mm.h:14
#define MI_HYPERSPACE_PTES
Definition: mm.h:81
#define MI_MAPPING_RANGE_END
Definition: mm.h:48
#define MI_WORKING_SET_LIST
Definition: mm.h:51
#define MI_ZERO_PTES
Definition: mm.h:82
#define PDE_MAPPED_VA
Definition: mm.h:39
#define PFN_FROM_PTE(v)
Definition: mm.h:92
#define MiPteToAddress(_Pte)
Definition: mm.h:116
BOOLEAN KiI386PentiumLockErrataPresent
Definition: cpu.c:42
VOID NTAPI KeFlushCurrentTb(VOID)
Definition: cpu.c:526
ULONG KeFeatureBits
Definition: krnlinit.c:22
FORCEINLINE PMMPFN MiGetPfnEntry(IN PFN_NUMBER Pfn)
Definition: mm.h:1047
#define MI_SET_PROCESS2(x)
Definition: mm.h:319
@ MI_USAGE_PAGE_TABLE
Definition: mm.h:334
NTSTATUS NTAPI MmInitializeProcessAddressSpace(IN PEPROCESS Process, IN PEPROCESS Clone OPTIONAL, IN PVOID Section OPTIONAL, IN OUT PULONG Flags, IN POBJECT_NAME_INFORMATION *AuditName OPTIONAL)
VOID NTAPI MiInitializeNonPagedPool(VOID)
Definition: pool.c:278
PMMPFN MmPfnDatabase
Definition: freelist.c:24
VOID NTAPI MmInitializeBalancer(ULONG NrAvailablePages, ULONG NrSystemPages)
Definition: balance.c:44
#define MI_SET_USAGE(x)
Definition: mm.h:317
PFN_NUMBER MmAvailablePages
Definition: freelist.c:26
ULONG MxPfnAllocation
Definition: init.c:43
PVOID MmNonPagedSystemStart
Definition: init.c:23
PMEMORY_ALLOCATION_DESCRIPTOR MxFreeDescriptor
Definition: init.c:46
ULONG MmNumberOfSystemPtes
Definition: init.c:42
PVOID MmNonPagedPoolExpansionStart
Definition: init.c:25
MEMORY_ALLOCATION_DESCRIPTOR MxOldFreeDescriptor
Definition: init.c:47
PVOID MmNonPagedPoolStart
Definition: init.c:24
MMPTE ValidKernelPteLocal
Definition: init.c:27
MMPTE ValidKernelPdeLocal
Definition: init.c:26
VOID NTAPI MiComputeNonPagedPoolVa(IN ULONG FreePages)
Definition: init.c:126
MMPTE ValidKernelPte
Definition: init.c:29
MMPTE ValidKernelPde
Definition: init.c:28
#define STATUS_SUCCESS
Definition: shellext.h:65
#define DPRINT
Definition: sndvol32.h:71
ULONG PageFrameNumber
Definition: mmtypes.h:74
ULONG PageFrameNumber
Definition: mmtypes.h:109
USHORT CacheAttribute
Definition: mm.h:367
USHORT PageLocation
Definition: mm.h:365
Definition: mm.h:374
union _MMPFN::@1790 u3
union _MMPFN::@1789 u2
PMMPTE PteAddress
Definition: mm.h:386
MMPFNENTRY e1
Definition: mm.h:397
union _MMPFN::@1793 u4
ULONG_PTR ShareCount
Definition: mm.h:390
struct _MMPFN::@1790::@1796 e2
ULONG_PTR PteFrame
Definition: mm.h:418
ULONG64 Valid
Definition: mmtypes.h:150
ULONG64 WriteThrough
Definition: mmtypes.h:161
ULONG64 Global
Definition: mmtypes.h:166
ULONG64 PageFrameNumber
Definition: mmtypes.h:171
union _MMPTE::@2325 u
MMPTE_HARDWARE Hard
Definition: mmtypes.h:217
ULONG_PTR SIZE_T
Definition: typedefs.h:80
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql
Definition: kefuncs.h:778
#define PsGetCurrentProcess
Definition: psfuncs.h:17

Variable Documentation

◆ DemandZeroPde

Definition at line 30 of file init.c.

◆ DemandZeroPte

Definition at line 31 of file init.c.

◆ MmDecommittedPte

Definition at line 38 of file init.c.

◆ PrototypePte

MMPTE PrototypePte
Initial value:
PTE_PROTOTYPE | (MI_PTE_LOOKUP_NEEDED << PAGE_SHIFT)}}
#define MM_READWRITE
Definition: bootanim.c:19
#define MI_PTE_LOOKUP_NEEDED
Definition: miarm.h:241
#define MM_PTE_SOFTWARE_PROTECTION_BITS
Definition: mm.h:75

Definition at line 34 of file init.c.

◆ ValidKernelPde

MMPTE ValidKernelPde = {{PTE_VALID|PTE_READWRITE|PTE_DIRTY|PTE_ACCESSED}}

Definition at line 22 of file init.c.

◆ ValidKernelPdeLocal

MMPTE ValidKernelPdeLocal = {{PTE_VALID|PTE_READWRITE|PTE_DIRTY|PTE_ACCESSED}}

Definition at line 26 of file init.c.

◆ ValidKernelPte

MMPTE ValidKernelPte = {{PTE_VALID|PTE_READWRITE|PTE_DIRTY|PTE_ACCESSED}}

Definition at line 23 of file init.c.

◆ ValidKernelPteLocal

MMPTE ValidKernelPteLocal = {{PTE_VALID|PTE_READWRITE|PTE_DIRTY|PTE_ACCESSED}}

Definition at line 27 of file init.c.