ReactOS  r76032
mm.h File Reference

Go to the source code of this file.

Macros

#define _MI_PAGING_LEVELS   4
 
#define MI_USER_PROBE_ADDRESS   (PVOID)0x000007FFFFFF0000ULL
 
#define MI_DEFAULT_SYSTEM_RANGE_START   (PVOID)0xFFFF080000000000ULL
 
#define MI_REAL_SYSTEM_RANGE_START   0xFFFF800000000000ULL
 
#define HYPER_SPACE   0xFFFFF70000000000ULL
 
#define HYPER_SPACE_END   0xFFFFF77FFFFFFFFFULL
 
#define MI_SYSTEM_CACHE_WS_START   0xFFFFF78000001000ULL
 
#define MI_PAGED_POOL_START   (PVOID)0xFFFFF8A000000000ULL
 
#define MI_SESSION_VIEW_END   0xFFFFF97FFF000000ULL
 
#define MI_SESSION_SPACE_END   0xFFFFF97FFFFFFFFFULL
 
#define MM_SYSTEM_SPACE_START   0xFFFFF98000000000ULL
 
#define MI_PFN_DATABASE   0xFFFFFA8000000000ULL
 
#define MI_DEBUG_MAPPING   (PVOID)0xFFFFFFFF80000000ULL
 
#define MI_NONPAGED_POOL_END   (PVOID)0xFFFFFFFFFFBFFFFFULL
 
#define MI_HIGHEST_SYSTEM_ADDRESS   (PVOID)0xFFFFFFFFFFFFFFFFULL
 
#define MmSystemRangeStart   ((PVOID)MI_REAL_SYSTEM_RANGE_START)
 
#define MM_HIGHEST_USER_ADDRESS_WOW64   0x7FFEFFFF
 
#define MM_SYSTEM_RANGE_START_WOW64   0x80000000
 
#define MI_SYSTEM_PTE_BASE   (PVOID)MiAddressToPte(KSEG0_BASE)
 
#define MM_HIGHEST_VAD_ADDRESS   (PVOID)((ULONG_PTR)MM_HIGHEST_USER_ADDRESS - (16 * PAGE_SIZE))
 
#define MI_MAPPING_RANGE_START   HYPER_SPACE
 
#define MI_MAPPING_RANGE_END   (MI_MAPPING_RANGE_START + MI_HYPERSPACE_PTES * PAGE_SIZE)
 
#define MI_DUMMY_PTE   (MI_MAPPING_RANGE_END + PAGE_SIZE)
 
#define MI_VAD_BITMAP   (MI_DUMMY_PTE + PAGE_SIZE)
 
#define MI_WORKING_SET_LIST   (MI_VAD_BITMAP + PAGE_SIZE)
 
#define MI_MIN_PAGES_FOR_NONPAGED_POOL_TUNING   ((255 * _1MB) >> PAGE_SHIFT)
 
#define MI_MIN_PAGES_FOR_SYSPTE_TUNING   ((19 * _1MB) >> PAGE_SHIFT)
 
#define MI_MIN_PAGES_FOR_SYSPTE_BOOST   ((32 * _1MB) >> PAGE_SHIFT)
 
#define MI_MIN_PAGES_FOR_SYSPTE_BOOST_BOOST   ((256 * _1MB) >> PAGE_SHIFT)
 
#define MI_MIN_INIT_PAGED_POOLSIZE   (32 * _1MB)
 
#define MI_MAX_INIT_NONPAGED_POOL_SIZE   (128ULL * 1024 * 1024 * 1024)
 
#define MI_MAX_NONPAGED_POOL_SIZE   (128ULL * 1024 * 1024 * 1024)
 
#define MI_SYSTEM_VIEW_SIZE   (16 * _1MB)
 
#define MI_SESSION_VIEW_SIZE   (20 * _1MB)
 
#define MI_SESSION_POOL_SIZE   (16 * _1MB)
 
#define MI_SESSION_IMAGE_SIZE   (8 * _1MB)
 
#define MI_SESSION_WORKING_SET_SIZE   (4 * _1MB)
 
#define MI_SESSION_SIZE
 
#define MI_MIN_ALLOCATION_FRAGMENT   (4 * _1KB)
 
#define MI_ALLOCATION_FRAGMENT   (64 * _1KB)
 
#define MI_MAX_ALLOCATION_FRAGMENT   (2 * _1MB)
 
#define MM_PTE_SOFTWARE_PROTECTION_BITS   5
 
#define MI_MIN_SECONDARY_COLORS   8
 
#define MI_SECONDARY_COLORS   64
 
#define MI_MAX_SECONDARY_COLORS   1024
 
#define MI_NUMBER_SYSTEM_PTES   22000
 
#define MI_MAX_FREE_PAGE_LISTS   4
 
#define MI_HYPERSPACE_PTES   (256 - 1)
 
#define MI_ZERO_PTES   (32)
 
#define MI_MAX_ZERO_BITS   53
 
#define SESSION_POOL_LOOKASIDES   21
 
#define MM_EMPTY_PTE_LIST   ((ULONG64)0xFFFFFFFF)
 
#define MM_EMPTY_LIST   ((ULONG_PTR)-1)
 
#define PFN_FROM_PTE(v)   ((v)->u.Hard.PageFrameNumber)
 
#define PFN_FROM_PDE(v)   ((v)->u.Hard.PageFrameNumber)
 
#define PFN_FROM_PPE(v)   ((v)->u.Hard.PageFrameNumber)
 
#define PFN_FROM_PXE(v)   ((v)->u.Hard.PageFrameNumber)
 
#define MI_MAKE_DIRTY_PAGE(x)   ((x)->u.Hard.Dirty = 1)
 
#define MI_MAKE_CLEAN_PAGE(x)   ((x)->u.Hard.Dirty = 0)
 
#define MI_MAKE_ACCESSED_PAGE(x)   ((x)->u.Hard.Accessed = 1)
 
#define MI_PAGE_DISABLE_CACHE(x)   ((x)->u.Hard.CacheDisable = 1)
 
#define MI_PAGE_WRITE_THROUGH(x)   ((x)->u.Hard.WriteThrough = 1)
 
#define MI_PAGE_WRITE_COMBINED(x)   ((x)->u.Hard.WriteThrough = 0)
 
#define MI_IS_PAGE_LARGE(x)   ((x)->u.Hard.LargePage == 1)
 
#define MI_IS_PAGE_WRITEABLE(x)   ((x)->u.Hard.Write == 1)
 
#define MI_IS_PAGE_COPY_ON_WRITE(x)   ((x)->u.Hard.CopyOnWrite == 1)
 
#define MI_IS_PAGE_DIRTY(x)   ((x)->u.Hard.Dirty == 1)
 
#define MI_MAKE_OWNER_PAGE(x)   ((x)->u.Hard.Owner = 1)
 
#define MI_MAKE_WRITE_PAGE(x)   ((x)->u.Hard.Write = 1)
 
#define MI_WRITE_VALID_PPE   MI_WRITE_VALID_PTE
 
#define ValidKernelPpe   ValidKernelPde
 
#define MiAddressToPte(x)   _MiAddressToPte((PVOID)(x))
 
#define MiAddressToPde(x)   _MiAddressToPde((PVOID)(x))
 
#define MiAddressToPteOffset(x)   MiAddressToPti(x)
 
#define MiAddressToPdeOffset(x)   MiAddressToPdi(x)
 
#define MiGetPdeOffset(x)   MiAddressToPdi(x)
 
#define MiPdeToPte(_Pde)   ((PMMPTE)MiPteToAddress(_Pde))
 
#define MiPteToPde(_Pte)   ((PMMPDE)MiAddressToPte(_Pte))
 
#define MiPdeToPpe(_Pde)   ((PMMPPE)MiAddressToPte(_Pde))
 
#define MiIsPteOnPdeBoundary(PointerPte)   ((((ULONG_PTR)PointerPte) & (PAGE_SIZE - 1)) == 0)
 
#define MiIsPteOnPpeBoundary(PointerPte)   ((((ULONG_PTR)PointerPte) & (PDE_PER_PAGE * PAGE_SIZE - 1)) == 0)
 
#define MiIsPteOnPxeBoundary(PointerPte)   ((((ULONG_PTR)PointerPte) & (PPE_PER_PAGE * PDE_PER_PAGE * PAGE_SIZE - 1)) == 0)
 
#define MiProtoPteToPte(x)   (PMMPTE)(((LONG64)(x)->u.Long) >> 16) /* Sign extend 48 bits */
 
#define MiSubsectionPteToSubsection(x)   (PMMPTE)((x)->u.Subsect.SubsectionAddress >> 16)
 

Functions

PMMPTE FORCEINLINE _MiAddressToPte (PVOID Address)
 
PMMPTE FORCEINLINE _MiAddressToPde (PVOID Address)
 
PMMPTE FORCEINLINE MiAddressToPpe (PVOID Address)
 
PMMPTE FORCEINLINE MiAddressToPxe (PVOID Address)
 
ULONG FORCEINLINE MiAddressToPti (PVOID Address)
 
ULONG FORCEINLINE MiAddressToPdi (PVOID Address)
 
ULONG FORCEINLINE MiAddressToPxi (PVOID Address)
 
PVOID FORCEINLINE MiPteToAddress (PMMPTE PointerPte)
 
PVOID FORCEINLINE MiPdeToAddress (PMMPTE PointerPde)
 
PVOID FORCEINLINE MiPpeToAddress (PMMPTE PointerPpe)
 
PVOID FORCEINLINE MiPxeToAddress (PMMPTE PointerPxe)
 
FORCEINLINE VOID MI_MAKE_SUBSECTION_PTE (IN PMMPTE NewPte, IN PVOID Segment)
 
FORCEINLINE VOID MI_MAKE_PROTOTYPE_PTE (IN PMMPTE NewPte, IN PMMPTE PointerPte)
 
FORCEINLINE BOOLEAN MI_IS_MAPPED_PTE (PMMPTE PointerPte)
 
VOID FORCEINLINE MmInitGlobalKernelPageDirectory (VOID)
 
BOOLEAN FORCEINLINE MiIsPdeForAddressValid (PVOID Address)
 

Macro Definition Documentation

#define HYPER_SPACE_END   0xFFFFF77FFFFFFFFFULL
#define MI_ALLOCATION_FRAGMENT   (64 * _1KB)

Definition at line 61 of file mm.h.

Referenced by MmArmInitSystem().

#define MI_DEBUG_MAPPING   (PVOID)0xFFFFFFFF80000000ULL

Definition at line 22 of file mm.h.

Referenced by MiInitializePageTable(), and MiInitSystemMemoryAreas().

#define MI_DEFAULT_SYSTEM_RANGE_START   (PVOID)0xFFFF080000000000ULL

Definition at line 10 of file mm.h.

Referenced by MmArmInitSystem().

#define MI_DUMMY_PTE   (MI_MAPPING_RANGE_END + PAGE_SIZE)

Definition at line 39 of file mm.h.

#define MI_HIGHEST_SYSTEM_ADDRESS   (PVOID)0xFFFFFFFFFFFFFFFFULL

Definition at line 24 of file mm.h.

Referenced by MiInitializePageTable().

#define MI_HYPERSPACE_PTES   (256 - 1)

Definition at line 71 of file mm.h.

Referenced by MiInitializePageTable(), MiInitMachineDependent(), and MiMapPageInHyperSpace().

#define MI_IS_PAGE_COPY_ON_WRITE (   x)    ((x)->u.Hard.CopyOnWrite == 1)
#define MI_IS_PAGE_DIRTY (   x)    ((x)->u.Hard.Dirty == 1)

Definition at line 101 of file mm.h.

Referenced by MiRemoveMappedPtes().

#define MI_IS_PAGE_LARGE (   x)    ((x)->u.Hard.LargePage == 1)

Definition at line 94 of file mm.h.

Referenced by MiAddHalIoMappings(), and MmArmAccessFault().

#define MI_IS_PAGE_WRITEABLE (   x)    ((x)->u.Hard.Write == 1)
#define MI_MAKE_ACCESSED_PAGE (   x)    ((x)->u.Hard.Accessed = 1)

Definition at line 90 of file mm.h.

Referenced by MiDetermineUserGlobalPteMask(), and MiDispatchFault().

#define MI_MAKE_CLEAN_PAGE (   x)    ((x)->u.Hard.Dirty = 0)

Definition at line 89 of file mm.h.

Referenced by MiDispatchFault(), and MiResolveTransitionFault().

#define MI_MAKE_DIRTY_PAGE (   x)    ((x)->u.Hard.Dirty = 1)
#define MI_MAKE_OWNER_PAGE (   x)    ((x)->u.Hard.Owner = 1)

Definition at line 102 of file mm.h.

Referenced by MiDetermineUserGlobalPteMask().

#define MI_MAKE_WRITE_PAGE (   x)    ((x)->u.Hard.Write = 1)

Definition at line 104 of file mm.h.

#define MI_MAPPING_RANGE_END   (MI_MAPPING_RANGE_START + MI_HYPERSPACE_PTES * PAGE_SIZE)

Definition at line 38 of file mm.h.

Referenced by MiInitializePageTable(), and MiInitMachineDependent().

#define MI_MAPPING_RANGE_START   HYPER_SPACE

Definition at line 37 of file mm.h.

Referenced by MiInitializePageTable(), and MiInitMachineDependent().

#define MI_MAX_ALLOCATION_FRAGMENT   (2 * _1MB)

Definition at line 62 of file mm.h.

Referenced by MmArmInitSystem().

#define MI_MAX_FREE_PAGE_LISTS   4

Definition at line 70 of file mm.h.

Referenced by MiAllocatePoolPages(), MiFreePoolPages(), and MiInitializeNonPagedPool().

#define MI_MAX_INIT_NONPAGED_POOL_SIZE   (128ULL * 1024 * 1024 * 1024)

Definition at line 49 of file mm.h.

Referenced by MiBuildNonPagedPool(), and MiComputeNonPagedPoolVa().

#define MI_MAX_NONPAGED_POOL_SIZE   (128ULL * 1024 * 1024 * 1024)

Definition at line 50 of file mm.h.

Referenced by MiBuildNonPagedPool(), and MiComputeNonPagedPoolVa().

#define MI_MAX_SECONDARY_COLORS   1024

Definition at line 68 of file mm.h.

Referenced by MiComputeColorInformation().

#define MI_MAX_ZERO_BITS   53

Definition at line 73 of file mm.h.

Referenced by NtAllocateVirtualMemory(), and NtMapViewOfSection().

#define MI_MIN_ALLOCATION_FRAGMENT   (4 * _1KB)

Definition at line 60 of file mm.h.

Referenced by MmArmInitSystem().

#define MI_MIN_INIT_PAGED_POOLSIZE   (32 * _1MB)

Definition at line 48 of file mm.h.

Referenced by MiBuildPagedPool().

#define MI_MIN_PAGES_FOR_NONPAGED_POOL_TUNING   ((255 * _1MB) >> PAGE_SHIFT)

Definition at line 44 of file mm.h.

Referenced by MiBuildNonPagedPool(), and MiComputeNonPagedPoolVa().

#define MI_MIN_PAGES_FOR_SYSPTE_BOOST   ((32 * _1MB) >> PAGE_SHIFT)

Definition at line 46 of file mm.h.

Referenced by MmArmInitSystem().

#define MI_MIN_PAGES_FOR_SYSPTE_BOOST_BOOST   ((256 * _1MB) >> PAGE_SHIFT)

Definition at line 47 of file mm.h.

Referenced by MmArmInitSystem().

#define MI_MIN_PAGES_FOR_SYSPTE_TUNING   ((19 * _1MB) >> PAGE_SHIFT)

Definition at line 45 of file mm.h.

Referenced by MmArmInitSystem().

#define MI_MIN_SECONDARY_COLORS   8

Definition at line 66 of file mm.h.

Referenced by MiComputeColorInformation().

#define MI_NONPAGED_POOL_END   (PVOID)0xFFFFFFFFFFBFFFFFULL

Definition at line 23 of file mm.h.

Referenced by MmArmInitSystem().

#define MI_NUMBER_SYSTEM_PTES   22000

Definition at line 69 of file mm.h.

Referenced by MiBuildSystemPteSpace().

#define MI_PAGE_DISABLE_CACHE (   x)    ((x)->u.Hard.CacheDisable = 1)
#define MI_PAGE_WRITE_COMBINED (   x)    ((x)->u.Hard.WriteThrough = 0)
#define MI_PAGE_WRITE_THROUGH (   x)    ((x)->u.Hard.WriteThrough = 1)
#define MI_PAGED_POOL_START   (PVOID)0xFFFFF8A000000000ULL

Definition at line 15 of file mm.h.

#define MI_PFN_DATABASE   0xFFFFFA8000000000ULL

Definition at line 21 of file mm.h.

Referenced by MiInitMachineDependent().

#define MI_REAL_SYSTEM_RANGE_START   0xFFFF800000000000ULL

Definition at line 11 of file mm.h.

#define MI_SECONDARY_COLORS   64

Definition at line 67 of file mm.h.

Referenced by MiComputeColorInformation().

#define MI_SESSION_IMAGE_SIZE   (8 * _1MB)

Definition at line 54 of file mm.h.

Referenced by MiInitializeSessionSpaceLayout().

#define MI_SESSION_POOL_SIZE   (16 * _1MB)

Definition at line 53 of file mm.h.

Referenced by MiInitializeSessionSpaceLayout().

#define MI_SESSION_SIZE
Value:
#define MI_SESSION_WORKING_SET_SIZE
Definition: mm.h:55
#define MI_SESSION_IMAGE_SIZE
Definition: mm.h:54
#define MI_SESSION_VIEW_SIZE
Definition: mm.h:52
#define MI_SESSION_POOL_SIZE
Definition: mm.h:53

Definition at line 56 of file mm.h.

Referenced by MiInitializeSessionSpaceLayout().

#define MI_SESSION_SPACE_END   0xFFFFF97FFFFFFFFFULL

Definition at line 19 of file mm.h.

Referenced by MiInitializeSessionSpaceLayout().

#define MI_SESSION_VIEW_END   0xFFFFF97FFF000000ULL

Definition at line 18 of file mm.h.

Referenced by MiInitializeSessionSpaceLayout().

#define MI_SESSION_VIEW_SIZE   (20 * _1MB)

Definition at line 52 of file mm.h.

Referenced by MiInitializeSessionSpaceLayout().

#define MI_SESSION_WORKING_SET_SIZE   (4 * _1MB)

Definition at line 55 of file mm.h.

Referenced by MiInitializeSessionSpaceLayout().

#define MI_SYSTEM_CACHE_WS_START   0xFFFFF78000001000ULL

Definition at line 14 of file mm.h.

#define MI_SYSTEM_PTE_BASE   (PVOID)MiAddressToPte(KSEG0_BASE)

Definition at line 35 of file mm.h.

Referenced by MiInitializeSystemPtes().

#define MI_SYSTEM_VIEW_SIZE   (16 * _1MB)

Definition at line 51 of file mm.h.

Referenced by MiInitializeSessionSpaceLayout().

#define MI_USER_PROBE_ADDRESS   (PVOID)0x000007FFFFFF0000ULL

Definition at line 9 of file mm.h.

Referenced by MmArmInitSystem().

#define MI_VAD_BITMAP   (MI_DUMMY_PTE + PAGE_SIZE)

Definition at line 40 of file mm.h.

Referenced by MiInitializePageTable().

#define MI_WORKING_SET_LIST   (MI_VAD_BITMAP + PAGE_SIZE)
#define MI_WRITE_VALID_PPE   MI_WRITE_VALID_PTE

Definition at line 110 of file mm.h.

Referenced by MiBuildPagedPool().

#define MI_ZERO_PTES   (32)
#define MiAddressToPde (   x)    _MiAddressToPde((PVOID)(x))

Definition at line 133 of file mm.h.

Referenced by MiIsPdeForAddressValid().

#define MiAddressToPdeOffset (   x)    MiAddressToPdi(x)

Definition at line 171 of file mm.h.

#define MiAddressToPte (   x)    _MiAddressToPte((PVOID)(x))

Definition at line 122 of file mm.h.

#define MiAddressToPteOffset (   x)    MiAddressToPti(x)

Definition at line 162 of file mm.h.

#define MiIsPteOnPdeBoundary (   PointerPte)    ((((ULONG_PTR)PointerPte) & (PAGE_SIZE - 1)) == 0)
#define MiIsPteOnPpeBoundary (   PointerPte)    ((((ULONG_PTR)PointerPte) & (PDE_PER_PAGE * PAGE_SIZE - 1)) == 0)

Definition at line 226 of file mm.h.

Referenced by MiLockVirtualMemory(), MiUnlockVirtualMemory(), and MmProbeAndLockPages().

#define MiIsPteOnPxeBoundary (   PointerPte)    ((((ULONG_PTR)PointerPte) & (PPE_PER_PAGE * PDE_PER_PAGE * PAGE_SIZE - 1)) == 0)

Definition at line 228 of file mm.h.

Referenced by MiLockVirtualMemory(), MiUnlockVirtualMemory(), and MmProbeAndLockPages().

#define MiPdeToPpe (   _Pde)    ((PMMPPE)MiAddressToPte(_Pde))

Definition at line 221 of file mm.h.

Referenced by MiFillSystemPageDirectory().

#define MiPdeToPte (   _Pde)    ((PMMPTE)MiPteToAddress(_Pde))
#define MiProtoPteToPte (   x)    (PMMPTE)(((LONG64)(x)->u.Long) >> 16) /* Sign extend 48 bits */
#define MiSubsectionPteToSubsection (   x)    (PMMPTE)((x)->u.Subsect.SubsectionAddress >> 16)

Definition at line 240 of file mm.h.

Referenced by MmArmInitSystem().

#define MM_EMPTY_LIST   ((ULONG_PTR)-1)

Definition at line 78 of file mm.h.

Referenced by MmArmInitSystem().

#define MM_HIGHEST_USER_ADDRESS_WOW64   0x7FFEFFFF

Definition at line 28 of file mm.h.

Referenced by ExpInitializeExecutive().

#define MM_PTE_SOFTWARE_PROTECTION_BITS   5

Definition at line 65 of file mm.h.

Referenced by MmArmAccessFault().

#define MM_SYSTEM_RANGE_START_WOW64   0x80000000

Definition at line 29 of file mm.h.

Referenced by ExpInitializeExecutive().

#define MM_SYSTEM_SPACE_START   0xFFFFF98000000000ULL

Definition at line 20 of file mm.h.

Referenced by MiInitMachineDependent().

#define PFN_FROM_PDE (   v)    ((v)->u.Hard.PageFrameNumber)

Definition at line 83 of file mm.h.

Referenced by MiBuildPfnDatabaseFromPageTables().

#define PFN_FROM_PPE (   v)    ((v)->u.Hard.PageFrameNumber)

Definition at line 84 of file mm.h.

Referenced by MiBuildPfnDatabaseFromPageTables().

#define PFN_FROM_PXE (   v)    ((v)->u.Hard.PageFrameNumber)

Definition at line 85 of file mm.h.

Referenced by MiBuildPfnDatabaseFromPageTables().

#define SESSION_POOL_LOOKASIDES   21

Definition at line 74 of file mm.h.

#define ValidKernelPpe   ValidKernelPde

Definition at line 111 of file mm.h.

Referenced by MiBuildPagedPool().

Function Documentation

PMMPTE FORCEINLINE _MiAddressToPde ( PVOID  Address)

Definition at line 127 of file mm.h.

128 {
129  ULONG64 Offset = (ULONG64)Address >> (PDI_SHIFT - 3);
130  Offset &= 0x7FFFFFF << 3;
131  return (PMMPTE)(PDE_BASE + Offset);
132 }
PVOID ULONG Address
Definition: oprghdlr.h:14
#define PDE_BASE
Definition: mm.h:29
_In_ ULONG _In_ ULONG Offset
Definition: ntddpcm.h:101
uint64_t ULONG64
Definition: typedefs.h:65
#define PDI_SHIFT
PMMPTE FORCEINLINE _MiAddressToPte ( PVOID  Address)

Definition at line 116 of file mm.h.

117 {
118  ULONG64 Offset = (ULONG64)Address >> (PTI_SHIFT - 3);
119  Offset &= 0xFFFFFFFFFULL << 3;
120  return (PMMPTE)(PTE_BASE + Offset);
121 }
PVOID ULONG Address
Definition: oprghdlr.h:14
#define PTE_BASE
Definition: mm.h:28
_In_ ULONG _In_ ULONG Offset
Definition: ntddpcm.h:101
uint64_t ULONG64
Definition: typedefs.h:65
#define PTI_SHIFT
#define ULL(a, b)
Definition: format_msg.c:27
FORCEINLINE BOOLEAN MI_IS_MAPPED_PTE ( PMMPTE  PointerPte)

FIXME

Definition at line 267 of file mm.h.

Referenced by MiDeleteVirtualAddresses().

268 {
270  __debugbreak();
271  return ((PointerPte->u.Long & 0xFFFFFC01) != 0);
272 }
void __cdecl __debugbreak(void)
Definition: intrin_ppc.h:698
ULONG_PTR Long
Definition: mmtypes.h:215
union _MMPTE::@2072 u
FORCEINLINE VOID MI_MAKE_PROTOTYPE_PTE ( IN PMMPTE  NewPte,
IN PMMPTE  PointerPte 
)

Definition at line 253 of file mm.h.

Referenced by MiAddMappedPtes(), and MmArmInitSystem().

255 {
256  /* Store the Address */
257  NewPte->u.Long = (ULONG64)PointerPte << 16;
258 
259  /* Mark this as a prototype PTE */
260  NewPte->u.Proto.Prototype = 1;
261 
262  ASSERT(MiProtoPteToPte(NewPte) == PointerPte);
263 }
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel)?(CompletionRoutine!=NULL):TRUE)
uint64_t ULONG64
Definition: typedefs.h:65
#define MiProtoPteToPte(x)
Definition: mm.h:234
FORCEINLINE VOID MI_MAKE_SUBSECTION_PTE ( IN PMMPTE  NewPte,
IN PVOID  Segment 
)

Definition at line 245 of file mm.h.

Referenced by MmArmInitSystem().

247 {
248  ASSERT(FALSE);
249 }
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel)?(CompletionRoutine!=NULL):TRUE)
#define FALSE
Definition: types.h:117
ULONG FORCEINLINE MiAddressToPdi ( PVOID  Address)

Definition at line 167 of file mm.h.

168 {
169  return ((((ULONG64)Address) >> PDI_SHIFT) & 0x1FF);
170 }
PVOID ULONG Address
Definition: oprghdlr.h:14
uint64_t ULONG64
Definition: typedefs.h:65
#define PDI_SHIFT
PMMPTE FORCEINLINE MiAddressToPpe ( PVOID  Address)

Definition at line 138 of file mm.h.

Referenced by MiBuildPagedPool(), MiBuildPfnDatabaseFromPageTables(), MiGetPteForProcess(), MiIsPdeForAddressValid(), MiLockVirtualMemory(), MiMapPPEs(), MiQueryAddressState(), MiUnlockVirtualMemory(), MmArmAccessFault(), MmArmInitSystem(), MmGetPhysicalAddress(), MmIsAddressValid(), and MmProbeAndLockPages().

139 {
140  ULONG64 Offset = (ULONG64)Address >> (PPI_SHIFT - 3);
141  Offset &= 0x3FFFF << 3;
142  return (PMMPTE)(PPE_BASE + Offset);
143 }
PVOID ULONG Address
Definition: oprghdlr.h:14
_In_ ULONG _In_ ULONG Offset
Definition: ntddpcm.h:101
uint64_t ULONG64
Definition: typedefs.h:65
#define PPI_SHIFT
#define PPE_BASE
ULONG FORCEINLINE MiAddressToPti ( PVOID  Address)

Definition at line 158 of file mm.h.

Referenced by MmCreateProcessAddressSpace().

159 {
160  return ((((ULONG64)Address) >> PTI_SHIFT) & 0x1FF);
161 }
PVOID ULONG Address
Definition: oprghdlr.h:14
uint64_t ULONG64
Definition: typedefs.h:65
#define PTI_SHIFT
PMMPTE FORCEINLINE MiAddressToPxe ( PVOID  Address)
ULONG FORCEINLINE MiAddressToPxi ( PVOID  Address)

Definition at line 177 of file mm.h.

Referenced by MmCreateProcessAddressSpace().

178 {
179  return ((((ULONG64)Address) >> PXI_SHIFT) & 0x1FF);
180 }
PVOID ULONG Address
Definition: oprghdlr.h:14
uint64_t ULONG64
Definition: typedefs.h:65
#define PXI_SHIFT
BOOLEAN FORCEINLINE MiIsPdeForAddressValid ( PVOID  Address)

Definition at line 283 of file mm.h.

284 {
285  return ((MiAddressToPxe(Address)->u.Hard.Valid) &&
286  (MiAddressToPpe(Address)->u.Hard.Valid) &&
287  (MiAddressToPde(Address)->u.Hard.Valid));
288 }
PVOID ULONG Address
Definition: oprghdlr.h:14
GLenum GLclampf GLint GLenum GLuint GLenum GLenum GLsizei GLenum const GLvoid GLfloat GLfloat GLfloat GLfloat GLclampd GLint GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean GLboolean GLboolean GLboolean GLint GLenum GLsizei const GLvoid GLenum GLint GLenum GLint GLint GLsizei GLint GLenum GLint GLint GLint GLint GLsizei GLenum GLsizei const GLuint GLboolean GLenum GLenum GLint GLsizei GLenum GLsizei GLenum const GLvoid GLboolean const GLboolean GLenum const GLdouble * u
Definition: glfuncs.h:88
PMMPTE FORCEINLINE MiAddressToPpe(PVOID Address)
Definition: mm.h:138
#define MiAddressToPde(x)
Definition: mm.h:133
PMMPTE FORCEINLINE MiAddressToPxe(PVOID Address)
Definition: mm.h:148
PVOID FORCEINLINE MiPdeToAddress ( PMMPTE  PointerPde)

Definition at line 194 of file mm.h.

Referenced by MiBuildPfnDatabaseFromPageTables(), and MiQueryAddressState().

195 {
196  /* Use signed math */
197  return (PVOID)(((LONG64)PointerPde << 34) >> 16);
198 }
DWORD *typedef PVOID
Definition: winlogon.h:52
int64_t LONG64
Definition: typedefs.h:66
PVOID FORCEINLINE MiPpeToAddress ( PMMPTE  PointerPpe)

Definition at line 203 of file mm.h.

Referenced by MiBuildPfnDatabaseFromPageTables(), and MiQueryAddressState().

204 {
205  /* Use signed math */
206  return (PVOID)(((LONG64)PointerPpe << 43) >> 16);
207 }
DWORD *typedef PVOID
Definition: winlogon.h:52
int64_t LONG64
Definition: typedefs.h:66
PVOID FORCEINLINE MiPxeToAddress ( PMMPTE  PointerPxe)

Definition at line 212 of file mm.h.

Referenced by MiBuildPfnDatabaseFromPageTables(), and MiQueryAddressState().

213 {
214  /* Use signed math */
215  return (PVOID)(((LONG64)PointerPxe << 52) >> 16);
216 }
DWORD *typedef PVOID
Definition: winlogon.h:52
int64_t LONG64
Definition: typedefs.h:66
VOID FORCEINLINE MmInitGlobalKernelPageDirectory ( VOID  )

Definition at line 276 of file mm.h.

Referenced by MmInitSystem().

277 {
278  /* Nothing to do */
279 }