Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

miia64.h File Reference

Go to the source code of this file.

Classes

struct  _MMCOLOR_TABLES
struct  _MMPRIMARY_COLOR_TABLES
struct  _MMPTE_SOFTWARE
struct  _MMPTE_TRANSITION
struct  _MMPTE_PROTOTYPE
struct  _MMPTE_SUBSECTION
struct  _MMPTE_LIST
struct  _MMPTE_HARDWARE
struct  _MMPTE_LARGEPAGE
struct  _ALT_4KPTE
struct  _MMPTE

Defines

#define _MM64_   1
#define _MIALT4K_   1
#define MM_EMPTY_LIST   ((ULONG)0xFFFFFFFF)
#define MM_EMPTY_PTE_LIST   ((ULONG)0xFFFFFFFF)
#define MI_PTE_BASE_FOR_LOWEST_KERNEL_ADDRESS   ((PMMPTE)PTE_KBASE)
#define MASK_43   0x7FFFFFFFFFFUI64
#define MASK_44   0xFFFFFFFFFFFUI64
#define MM_PAGES_IN_KSEG0   ((ULONG)((KSEG2_BASE - KSEG0_BASE) >> PAGE_SHIFT))
#define MM_USER_ADDRESS_RANGE_LIMIT   (0xFFFFFFFFFFFFFFFFUI64)
#define MM_MAXIMUM_ZERO_BITS   53
#define MM_VIRTUAL_PAGE_FILLER   (PAGE_SHIFT - 12)
#define MM_VIRTUAL_PAGE_SIZE   (64-PAGE_SHIFT)
#define CODE_START   KSEG0_BASE
#define CODE_END   KSEG2_BASE
#define MM_SYSTEM_SPACE_START   (KADDRESS_BASE + 0x400000000UI64)
#define MM_SYSTEM_SPACE_END   (KADDRESS_BASE + 0x60000000000UI64)
#define PDE_TOP   PDE_UTOP
#define ALT4KB_PERMISSION_TABLE_START   (UADDRESS_BASE + 0x40000000000)
#define ALT4KB_PERMISSION_TABLE_END   (UADDRESS_BASE + 0x40000400000)
#define HYPER_SPACE   ((PVOID)(UADDRESS_BASE + 0x40000800000))
#define HYPER_SPACE_END   (UADDRESS_BASE + 0x401FFFFFFFF)
#define MM_SYSTEM_VIEW_START   (KADDRESS_BASE + 0xA0000000)
#define MM_SYSTEM_VIEW_SIZE   (48*1024*1024)
#define MM_SESSION_SPACE_DEFAULT   (0x2000000000000000UI64)
#define MM_SYSTEM_VIEW_START_IF_HYDRA   MM_SYSTEM_VIEW_START
#define MM_SYSTEM_VIEW_SIZE_IF_HYDRA   MM_SYSTEM_VIEW_SIZE
#define MM_SYSTEM_CACHE_WORKING_SET   (KADDRESS_BASE + 0x400000000UI64)
#define MM_SYSTEM_CACHE_START   (KADDRESS_BASE + 0x600000000UI64)
#define MM_SYSTEM_CACHE_END   (KADDRESS_BASE + 0x1005FFFFFFFFUI64)
#define MM_MAXIMUM_SYSTEM_CACHE_SIZE   (((ULONG_PTR)MM_SYSTEM_CACHE_END - (ULONG_PTR)MM_SYSTEM_CACHE_START) >> PAGE_SHIFT)
#define MM_PAGED_POOL_START   ((PVOID)(KADDRESS_BASE + 0x10600000000UI64))
#define MM_LOWEST_NONPAGED_SYSTEM_START   ((PVOID)(KADDRESS_BASE + 0x12600000000UI64))
#define MmProtopte_Base   (KADDRESS_BASE)
#define MM_NONPAGED_POOL_END   ((PVOID)(KADDRESS_BASE + 0x16600000000UI64 - (16 * PAGE_SIZE)))
#define MM_CRASH_DUMP_VA   ((PVOID)(KADDRESS_BASE + 0xFF800000))
#define MM_DEBUG_VA   ((PVOID)(KADDRESS_BASE + 0xFF900000))
#define NON_PAGED_SYSTEM_END   (KADDRESS_BASE + 0x16600000000UI64)
#define MM_PFN_DATABASE_START   (KADDRESS_BASE + 0x40000000000UI64)
#define MM_PFN_DATABASE_END   (KADDRESS_BASE + 0x60000000000UI64)
#define MM_MINIMUM_SYSTEM_PTES   7000
#define MM_MAXIMUM_SYSTEM_PTES   50000
#define MM_DEFAULT_SYSTEM_PTES   11000
#define MM_MAX_INITIAL_NONPAGED_POOL   ((SIZE_T)(128 * 1024 * 1024))
#define MM_MAX_ADDITIONAL_NONPAGED_POOL   (((SIZE_T)128 * 1024 * 1024 * 1024) - 16)
#define MM_MAX_PAGED_POOL   ((SIZE_T)128 * 1024 * 1024 * 1024)
#define MM_MAX_DEFAULT_NONPAGED_POOL   ((SIZE_T)8 * 1024 * 1024 * 1024)
#define MM_PROTO_PTE_ALIGNMENT   ((ULONG)PAGE_SIZE)
#define PAGE_DIRECTORY1_MASK   (((ULONG_PTR)1 << PDI1_SHIFT) - 1)
#define PAGE_DIRECTORY2_MASK   (((ULONG_PTR)1 << PDI_SHIFT) -1)
#define MM_VA_MAPPED_BY_PDE   ((ULONG_PTR)1 << PDI_SHIFT)
#define LOWEST_IO_ADDRESS   0xa0000
#define PHYSICAL_ADDRESS_BITS   44
#define MM_MAXIMUM_NUMBER_OF_COLORS   (1)
#define MM_NUMBER_OF_COLORS   (1)
#define MM_COLOR_MASK   (0)
#define MM_COLOR_ALIGNMENT   (0)
#define MM_COLOR_MASK_VIRTUAL   (0)
#define MM_SECONDARY_COLORS_DEFAULT   (64)
#define MM_SECONDARY_COLORS_MIN   (2)
#define MM_SECONDARY_COLORS_MAX   (1024)
#define MAX_PAGE_FILES   16
#define FIRST_MAPPING_PTE   ((PMMPTE)HYPER_SPACE)
#define NUMBER_OF_MAPPING_PTES   255
#define LAST_MAPPING_PTE   ((ULONG_PTR)((ULONG_PTR)FIRST_MAPPING_PTE + (NUMBER_OF_MAPPING_PTES * PAGE_SIZE)))
#define IMAGE_MAPPING_PTE   ((PMMPTE)((ULONG_PTR)LAST_MAPPING_PTE + PAGE_SIZE))
#define ZEROING_PAGE_PTE   ((PMMPTE)((ULONG_PTR)IMAGE_MAPPING_PTE + PAGE_SIZE))
#define WORKING_SET_LIST   ((PVOID)((ULONG_PTR)ZEROING_PAGE_PTE + PAGE_SIZE))
#define MM_MAXIMUM_WORKING_SET   ((ULONG)((ULONG)2*1024*1024*1024 - 64*1024*1024) >> PAGE_SHIFT)
#define MM_WORKING_SET_END   (UADDRESS_BASE + 0x3FFFFFFFFFFUI64)
#define MM_PTE_TB_MA_WB   (0x0 << 2)
#define MM_PTE_TB_MA_UC   (0x4 << 2)
#define MM_PTE_TB_MA_UCE   (0x5 << 2)
#define MM_PTE_TB_MA_WC   (0x6 << 2)
#define MM_PTE_TB_MA_NATPAGE   (0x7 << 2)
#define MM_PTE_CACHE_ENABLED   0
#define MM_PTE_CACHE_DISABLED   4
#define MM_PTE_CACHE_DISPLAY   6
#define MM_PTE_CACHE_RESERVED   1
#define MM_PTE_OWNER_MASK   0x0180
#define MM_PTE_VALID_MASK   1
#define MM_PTE_CACHE_DISABLE_MASK   MM_PTE_TB_MA_UC
#define MM_PTE_ACCESS_MASK   0x0020
#define MM_PTE_DIRTY_MASK   0x0040
#define MM_PTE_EXECUTE_MASK   0x0200
#define MM_PTE_WRITE_MASK   0x0400
#define MM_PTE_LARGE_PAGE_MASK   0
#define MM_PTE_COPY_ON_WRITE_MASK   ((ULONG)1 << (PAGE_SHIFT-1))
#define MM_PTE_PROTOTYPE_MASK   0x0002
#define MM_PTE_TRANSITION_MASK   0x0080
#define MM_PTE_NOACCESS   0x0
#define MM_PTE_READONLY   0x0
#define MM_PTE_READWRITE   MM_PTE_WRITE_MASK
#define MM_PTE_WRITECOPY   MM_PTE_COPY_ON_WRITE_MASK
#define MM_PTE_EXECUTE   MM_PTE_EXECUTE_MASK
#define MM_PTE_EXECUTE_READ   MM_PTE_EXECUTE_MASK
#define MM_PTE_EXECUTE_READWRITE   MM_PTE_EXECUTE_MASK | MM_PTE_WRITE_MASK
#define MM_PTE_EXECUTE_WRITECOPY   MM_PTE_EXECUTE_MASK | MM_PTE_COPY_ON_WRITE_MASK
#define MM_PTE_GUARD   0x0
#define MM_PTE_CACHE   MM_PTE_TB_MA_WB
#define MM_PTE_NOCACHE   MM_PTE_CACHE
#define MM_PTE_EXC_DEFER   0x10000000000000
#define MM_PROTECT_FIELD_SHIFT   2
#define MM_PTE_TB_VALID   0x0001
#define MM_PTE_TB_ACCESSED   0x0020
#define MM_PTE_TB_MODIFIED   0x0040
#define MM_PTE_TB_WRITE   0x0400
#define MM_PTE_TB_EXECUTE   0x0200
#define MM_PTE_TB_EXC_DEFER   0x10000000000000
#define MM_PTE_1MB_PAGE   20
#define MM_PTE_2MB_PAGE   21
#define MM_PTE_4MB_PAGE   22
#define MM_PTE_16MB_PAGE   24
#define MM_PTE_64MB_PAGE   26
#define MM_PTE_256MB_PAGE   28
#define MM_VHPT_PAGES   32
#define MI_MAXIMUM_PTE_WORKING_SET_INDEX   (1 << _HARDWARE_PTE_WORKING_SET_BITS)
#define MM_ZERO_PTE   0
#define MM_ZERO_KERNEL_PTE   0
#define MM_DEMAND_ZERO_WRITE_PTE   ((ULONGLONG)MM_READWRITE << MM_PROTECT_FIELD_SHIFT)
#define MM_KERNEL_DEMAND_ZERO_PTE   ((ULONGLONG)MM_READWRITE << MM_PROTECT_FIELD_SHIFT)
#define MM_KERNEL_NOACCESS_PTE   ((ULONGLONG)MM_NOACCESS << MM_PROTECT_FIELD_SHIFT)
#define MM_STACK_ALIGNMENT   0x0
#define MM_STACK_OFFSET   0x0
#define PDE_PER_PAGE   ((ULONG)(PAGE_SIZE/(1 << PTE_SHIFT)))
#define PTE_PER_PAGE   ((ULONG)(PAGE_SIZE/(1 << PTE_SHIFT)))
#define PTE_PER_PAGE_BITS   11
#define MM_USER_PAGE_TABLE_PAGES   PTE_PER_PAGE
#define MI_MAKE_VALID_PTE_TRANSITION(OUTPTE, PROTECT)
#define MI_MAKE_TRANSITION_PTE(OUTPTE, PAGE, PROTECT, PPTE)
#define MI_SET_PTE_IN_WORKING_SET(PTE, WSINDEX)
#define MI_GET_WORKING_SET_FROM_PTE(PTE)   (ULONG)(PTE)->u.Hard.SoftwareWsIndex
#define MI_SET_PTE_WRITE_COMBINE(PTE)   ((PTE).u.Hard.Cache = MM_PTE_CACHE_DISABLED)
#define MI_SET_PTE_WRITE_COMBINE2(PTE)   ((PTE).u.Hard.Cache = MM_PTE_CACHE_DISPLAY)
#define MI_SET_PTE_DIRTY(PTE)   (PTE).u.Hard.Dirty = 1
#define MI_SET_PTE_CLEAN(PTE)   (PTE).u.Hard.Dirty = 0
#define MI_IS_PTE_DIRTY(PTE)   ((PTE).u.Hard.Dirty != 0)
#define MI_SET_GLOBAL_BIT_IF_SYSTEM(OUTPTE, PPTE)
#define MI_SET_GLOBAL_STATE(PTE, STATE)
#define MI_ENABLE_CACHING(PTE)   ((PTE).u.Hard.Cache = MM_PTE_CACHE_ENABLED)
#define MI_DISABLE_CACHING(PTE)   ((PTE).u.Hard.Cache = MM_PTE_CACHE_DISABLED)
#define MI_IS_CACHING_DISABLED(PPTE)   ((PPTE)->u.Hard.Cache == MM_PTE_CACHE_DISABLED)
#define MI_SET_PFN_DELETED(PPFN)   (((PPFN)->PteAddress = (PMMPTE)((INT_PTR)(LONG)0xFFFFFFFF)))
#define MI_IS_PFN_DELETED(PPFN)   ((PPFN)->PteAddress == (PMMPTE)((INT_PTR)(LONG)0xFFFFFFFF))
#define MI_CHECK_PAGE_ALIGNMENT(PAGE, PPTE)
#define MI_INITIALIZE_HYPERSPACE_MAP(INDEX)
#define MI_GET_PAGE_COLOR_FROM_PTE(PTEADDRESS)   ((ULONG)((MmSystemPageColor++) & MmSecondaryColorMask))
#define MI_GET_PAGE_COLOR_FROM_VA(ADDRESS)   ((ULONG)((MmSystemPageColor++) & MmSecondaryColorMask))
#define MI_GET_PAGE_COLOR_FROM_SESSION(_SessionSpace)   ((ULONG)((_SessionSpace->Color++) & MmSecondaryColorMask))
#define MI_PAGE_COLOR_PTE_PROCESS(PTE, COLOR)   (ULONG)((ULONG_PTR)((*(COLOR))++) & MmSecondaryColorMask)
#define MI_PAGE_COLOR_VA_PROCESS(ADDRESS, COLOR)   ((ULONG)((*(COLOR))++) & MmSecondaryColorMask)
#define MI_GET_NEXT_COLOR(COLOR)   ((COLOR + 1) & MM_COLOR_MASK)
#define MI_GET_PREVIOUS_COLOR(COLOR)   (0)
#define MI_GET_SECONDARY_COLOR(PAGE, PFN)   ((ULONG)(PAGE & MmSecondaryColorMask))
#define MI_GET_COLOR_FROM_SECONDARY(SECONDARY_COLOR)   (0)
#define MI_GET_MODIFIED_PAGE_BY_COLOR(PAGE, COLOR)   PAGE = MmModifiedPageListByColor[COLOR].Flink
#define MI_GET_MODIFIED_PAGE_ANY_COLOR(PAGE, COLOR)
#define MI_MAKE_VALID_PTE_WRITE_COPY(PPTE)
#define MI_DETERMINE_OWNER(PPTE)
#define MI_SET_ACCESSED_IN_PTE(PPTE, ACCESSED)
#define MI_GET_ACCESSED_IN_PTE(PPTE)   0
#define MI_SET_OWNER_IN_PTE(PPTE, OWNER)
#define MI_GET_OWNER_IN_PTE(PPTE)   KernelMode
#define CLEAR_FOR_PROTO_PTE_ADDRESS   ((ULONG)0x701)
#define CLEAR_FOR_PAGE_FILE   0x000003E0
#define MI_SET_PAGING_FILE_INFO(OUTPTE, PTE, FILEINFO, OFFSET)
#define MiPteToProto(lpte)   ((PMMPTE) ((ULONG_PTR)((lpte)->u.Proto.ProtoAddress) + MmProtopte_Base))
#define MiProtoAddressForPte(proto_va)
#define MISetProtoAddressForPte(PTE, proto_va)
#define MiProtoAddressForKernelPte(proto_va)   MiProtoAddressForPte(proto_va)
#define MM_SUBSECTION_MAP   (128*1024*1024)
#define MiGetSubsectionAddress(lpte)
#define MiGetSubsectionAddressForPte(VA)
#define MiSetSubsectionAddressForPte(PTE, VA)
#define MiGetPpeOffset(va)   ((ULONG)(((ULONG_PTR)(va) >> PDI1_SHIFT) & PDI_MASK))
#define MiGetPdeOffset(va)   ((ULONG) (((ULONG_PTR)(va) >> PDI_SHIFT) & PDI_MASK))
#define MiGetPpePdeOffset(va)   ((ULONG) ((ULONG_PTR)(va) >> PDI_SHIFT))
#define MiGetPteOffset(va)   ((ULONG) (((ULONG_PTR)(va) >> PTI_SHIFT) & PDI_MASK))
#define MiGetVirtualAddressMappedByPpe(PPE)   MiGetVirtualAddressMappedByPte(MiGetVirtualAddressMappedByPde(PPE))
#define MiGetVirtualAddressMappedByPde(Pde)   MiGetVirtualAddressMappedByPte(MiGetVirtualAddressMappedByPte(Pde))
#define MiGetVirtualAddressMappedByPte(PTE)   ((PVOID)((ULONG_PTR)(PTE) << (PAGE_SHIFT - PTE_SHIFT)))
#define MiIsVirtualAddressOnPpeBoundary(VA)   (((ULONG_PTR)(VA) & PAGE_DIRECTORY1_MASK) == 0)
#define MiIsVirtualAddressOnPdeBoundary(VA)   (((ULONG_PTR)(VA) & PAGE_DIRECTORY2_MASK) == 0)
#define MiIsPteOnPpeBoundary(PTE)   (((ULONG_PTR)(PTE) & (MM_VA_MAPPED_BY_PDE - 1)) == 0)
#define MiIsPteOnPdeBoundary(PTE)   (((ULONG_PTR)(PTE) & (PAGE_SIZE - 1)) == 0)
#define GET_PAGING_FILE_NUMBER(PTE)   ((ULONG) (PTE).u.Soft.PageFileLow)
#define GET_PAGING_FILE_OFFSET(PTE)   ((ULONG) (PTE).u.Soft.PageFileHigh)
#define IS_PTE_NOT_DEMAND_ZERO(PTE)
#define MI_MAKING_VALID_PTE_INVALID(SYSTEM_WIDE)
#define MI_MAKING_MULTIPLE_PTES_INVALID(SYSTEM_WIDE)
#define MI_MAKE_PROTECT_WRITE_COPY(PTE)
#define MI_SET_PAGE_DIRTY(PPTE, VA, PFNHELD)
#define MI_NO_FAULT_FOUND(TEMP, PPTE, VA, PFNHELD)
#define MI_CAPTURE_DIRTY_BIT_TO_PFN(PPTE, PPFN)
#define MI_IS_PHYSICAL_ADDRESS(Va)
#define MI_CONVERT_PHYSICAL_TO_PFN(Va)
#define _MM_PAGING_FILE_LOW_SHIFT   28
#define _MM_PAGING_FILE_HIGH_SHIFT   32
#define MI_PTE_LOOKUP_NEEDED   ((ULONG64)0xffffffff)
#define _MM_PROTO_ADDRESS_SHIFT   12
#define _MM_PTE_SUBSECTION_ADDRESS_SHIFT   12
#define _HARDWARE_PTE_WORKING_SET_BITS   11
#define MI_GET_PAGE_FRAME_FROM_PTE(PTE)   ((ULONG)((PTE)->u.Hard.PageFrameNumber))
#define MI_GET_PAGE_FRAME_FROM_TRANSITION_PTE(PTE)   ((ULONG)((PTE)->u.Trans.PageFrameNumber))
#define MI_GET_PROTECTION_FROM_SOFT_PTE(PTE)   ((ULONG)((PTE)->u.Soft.Protection))
#define MI_GET_PROTECTION_FROM_TRANSITION_PTE(PTE)   ((ULONG)((PTE)->u.Trans.Protection))
#define MI_WRITE_VALID_PTE(_PointerPte, _PteContents)   (*(_PointerPte) = (_PteContents))
#define MI_WRITE_INVALID_PTE(_PointerPte, _PteContents)   (*(_PointerPte) = (_PteContents))
#define MI_WRITE_VALID_PTE_NEW_PROTECTION(_PointerPte, _PteContents)   (*(_PointerPte) = (_PteContents))
#define MiFillMemoryPte(Destination, Length, Pattern)   RtlFillMemoryUlonglong ((Destination), (Length), (Pattern))
#define KiWbInvalidateCache
#define MI_IS_PAGE_TABLE_ADDRESS(VA)
#define MI_IS_HYPER_SPACE_ADDRESS(VA)   (((ULONG_PTR)VA >= (ULONG_PTR)HYPER_SPACE) && ((ULONG_PTR)VA <= HYPER_SPACE_END))
#define MI_IS_PTE_ADDRESS(PTE)
#define MI_IS_PPE_ADDRESS(PTE)
#define MI_IS_KERNEL_PTE_ADDRESS(PTE)   (((PMMPTE)PTE >= (PMMPTE)PTE_KBASE) && ((PMMPTE)PTE <= (PMMPTE)PTE_KTOP))
#define MI_IS_USER_PTE_ADDRESS(PTE)   ((PTE >= (PMMPTE)PTE_UBASE) && (PTE <= (PMMPTE)PTE_UTOP))
#define MI_IS_PAGE_DIRECTORY_ADDRESS(PDE)
#define MI_IS_USER_PDE_ADDRESS(PDE)   ((PDE >= (PMMPTE)PDE_UBASE) && (PDE <= (PMMPTE)PDE_UTOP))
#define MI_IS_KERNEL_PDE_ADDRESS(PDE)   ((PDE >= (PMMPTE)PDE_KBASE) && (PDE <= (PMMPTE)PDE_KTOP))
#define MI_IS_PROCESS_SPACE_ADDRESS(VA)   (((ULONG_PTR)VA >> 61) == UREGION_INDEX)
#define MI_IS_SYSTEM_ADDRESS(VA)   (((ULONG_PTR)VA >> 61) == KREGION_INDEX)
#define KSEG0_ADDRESS(PAGE)   (PVOID)(KSEG0_BASE | ((PAGE) << PAGE_SHIFT))
#define MiGetPpeAddress(Va)
#define MiGetPdeAddress(Va)
#define MiGetPteAddress(Va)
#define MI_IS_PTE_PROTOTYPE(PointerPte)   (!MI_IS_USER_PTE_ADDRESS (PointerPte))
#define MI_IS_SYSTEM_CACHE_ADDRESS(VA)
#define PAGE_4K   4096
#define PAGE_4K_SHIFT   12
#define PAGE_4K_MASK   (PAGE_4K - 1)
#define PAGE_4K_ALIGN(Va)   ((PVOID)((ULONG_PTR)(Va) & ~(PAGE_4K - 1)))
#define ROUND_TO_4K_PAGES(Size)   (((ULONG_PTR)(Size) + PAGE_4K - 1) & ~(PAGE_4K - 1))
#define PAGE_NEXT_ALIGN(Va)   ((PVOID)(PAGE_ALIGN((ULONG_PTR)Va + PAGE_SIZE - 1)))
#define BYTES_TO_4K_PAGES(Size)
#define SPLITS_PER_PAGE   (PAGE_SIZE / PAGE_4K)
#define PAGE_SHIFT_DIFF   (PAGE_SHIFT - PAGE_4K_SHIFT)
#define ALT_PTE_SHIFT   3
#define ALT_PROTECTION_MASK   (MM_PTE_EXECUTE_MASK|MM_PTE_WRITE_MASK)
#define MiGetAltPteAddress(VA)
#define MI_ALTFLG_FLUSH2G   0x0000000000000001
#define ALT_ALLOCATE   1
#define ALT_COMMIT   2
#define ALT_CHANGE   4
#define MM_ATE_COMMIT   0x0000000000000001
#define MM_ATE_ACCESS   0x0000000000000020
#define MM_ATE_READONLY   0x0000000000000200
#define MM_ATE_EXECUTE   0x0400000000000200
#define MM_ATE_EXECUTE_READ   0x0400000000000200
#define MM_ATE_READWRITE   0x0000000000000600
#define MM_ATE_WRITECOPY   0x0020000000000200
#define MM_ATE_EXECUTE_READWRITE   0x0400000000000600
#define MM_ATE_EXECUTE_WRITECOPY   0x0420000000000400
#define MM_ATE_ZEROFILL   0x0800000000000000
#define MM_ATE_NOACCESS   0x1000000000000000
#define MM_ATE_COPY_ON_WRITE   0x2000000000000000
#define MM_ATE_PRIVATE   0x8000000000000000
#define MM_ATE_PROTO_MASK   0x0000000000000621
#define _MAX_WOW64_ADDRESS   (0x00000000080000000UI64)
#define MiMakeProtectionAteMask(NewProtect)   MmProtectToAteMask[NewProtect]
#define _ALTPERM_BITMAP_MASK   ((_MAX_WOW64_ADDRESS - 1) >> PTI_SHIFT)
#define MI_MAKE_VALID_PTE(OUTPTE, FRAME, PMASK, PPTE)
#define MI_MAKE_TRANSITION_PTE_VALID(OUTPTE, PPTE)
#define LOCK_ALTERNATE_TABLE(PWOW64)   ExAcquireFastMutex( &(PWOW64)->AlternateTableLock)
#define UNLOCK_ALTERNATE_TABLE(PWOW64)   ExReleaseFastMutex(&(PWOW64)->AlternateTableLock)
#define MI_IS_ALT_PAGE_TABLE_ADDRESS(PPTE)
#define MI_BARRIER_SYNCHRONIZE(TimeStamp)
#define MI_BARRIER_STAMP_ZEROED_PAGE(PointerTimeStamp)
#define MI_FLUSH_SINGLE_SESSION_TB(Virtual, Invalid, AllProcessors, PtePointer, PteValue, PreviousPte)
#define MI_FLUSH_ENTIRE_SESSION_TB(Invalid, AllProcessors)   KeFlushEntireTb (Invalid, AllProcessors);
#define MI_IS_PCR_PAGE(Va)   (((PVOID)PCR <= Va) && (Va < (PVOID)(PCR+PAGE_SIZE)))
#define MI_IS_ADDRESS_VALID_FOR_KD(VirtualAddress)

Typedefs

typedef _MMCOLOR_TABLES MMCOLOR_TABLES
typedef _MMCOLOR_TABLESPMMCOLOR_TABLES
typedef _MMPRIMARY_COLOR_TABLES MMPRIMARY_COLOR_TABLES
typedef _MMPRIMARY_COLOR_TABLESPMMPRIMARY_COLOR_TABLES
typedef _MMPTE_SOFTWARE MMPTE_SOFTWARE
typedef _MMPTE_TRANSITION MMPTE_TRANSITION
typedef _MMPTE_PROTOTYPE MMPTE_PROTOTYPE
typedef _MMPTE_SUBSECTION MMPTE_SUBSECTION
typedef _MMPTE_LIST MMPTE_LIST
typedef _MMPTE_HARDWARE MMPTE_HARDWARE
typedef _MMPTE_HARDWAREPMMPTE_HARDWARE
typedef _MMPTE_LARGEPAGE MMPTE_LARGEPAGE
typedef _MMPTE_LARGEPAGEPMMPTE_LARGEPAGE
typedef _ALT_4KPTE ALT_4KPTE
typedef _ALT_4KPTEPALT_4KPTE
typedef _MMPTE MMPTE
typedef MMPTEPMMPTE

Functions

PVOID KiGetPhysicalAddress (IN PVOID VirtualAddress)
PVOID MiCreatePebOrTeb (IN PEPROCESS TargetProcess, IN ULONG Size)
 MmX86Fault (IN BOOLEAN StoreInstruction, IN PVOID VirtualAddress, IN KPROCESSOR_MODE PreviousMode, IN PVOID TrapInformation)
VOID MiProtectFor4kPage (IN PVOID Base, IN SIZE_T Size, IN ULONG NewProtect, IN ULONG Flags, IN PEPROCESS Process)
VOID MiProtectMapFileFor4kPage (IN PVOID Base, IN SIZE_T Size, IN ULONG NewProtect, IN PMMPTE PointerPte, IN PEPROCESS Process)
VOID MiProtectImageFileFor4kPage (IN PVOID Base, IN SIZE_T Size, IN PMMPTE PointerPte, IN PEPROCESS Process)
VOID MiReleaseFor4kPage (IN PVOID StartVirtual, IN PVOID EndVirtual, IN PEPROCESS Process)
VOID MiDecommitFor4kPage (IN PVOID StartVirtual, IN PVOID EndVirtual, IN PEPROCESS Process)
VOID MiDeleteFor4kPage (IN PVOID StartVirtual, IN PVOID EndVirtual, IN PEPROCESS Process)
VOID MiQueryRegionFor4kPage (IN PVOID BaseAddress, IN PVOID EndAddress, IN OUT PSIZE_T RegionSize, IN OUT PULONG RegionState, IN OUT PULONG RegionProtect, IN PEPROCESS Process)
ULONG MiQueryProtectionFor4kPage (IN PVOID BaseAddress, IN PEPROCESS Process)
NTSTATUS MiInitializeAlternateTable (PEPROCESS Process)
VOID MiDeleteAlternateTable (PEPROCESS Process)
VOID MiLockFor4kPage (PVOID CapturedBase, SIZE_T CapturedRegionSize, PEPROCESS Process)
NTSTATUS MiUnlockFor4kPage (PVOID CapturedBase, SIZE_T CapturedRegionSize, PEPROCESS Process)
BOOLEAN MiShouldBeUnlockedFor4kPage (PVOID VirtualAddress, PEPROCESS Process)
VOID MiMarkSplitPages (IN PVOID StartVirtual, IN PVOID EndVirtual, IN PULONG Bitmap, IN BOOLEAN SetBit)
ULONG MiMakeProtectForNativePage (IN PVOID VirtualAddress, IN ULONG NewProtect, IN PEPROCESS Process)
VOID MiSweepCacheMachineDependent (IN PVOID VirtualAddress, IN SIZE_T Size, IN MEMORY_CACHING_TYPE CacheType)

Variables

ULONG_PTR MmKseg2Frame
ULONGLONG MmPageSizeInfo
ULONG MiMaximumSystemCacheSize
ULONG MmSecondaryColorMask
ULONG_PTR MmPteGlobal
PMMCOLOR_TABLES MmFreePagesByColor [2]
ULONG MmTotalPagesForPagingFile
MMPTE ValidPpePte
PFN_NUMBER MmSystemParentTablePage
ULONG MmProtectToPteMaskForIA32 [32]
ULONG MmProtectToPteMaskForSplit [32]
ULONGLONG MmProtectToAteMask [32]


Define Documentation

#define _ALTPERM_BITMAP_MASK   ((_MAX_WOW64_ADDRESS - 1) >> PTI_SHIFT)
 

Definition at line 3400 of file miia64.h.

#define _HARDWARE_PTE_WORKING_SET_BITS   11
 

Definition at line 2476 of file miia64.h.

#define _MAX_WOW64_ADDRESS   (0x00000000080000000UI64)
 

Definition at line 3274 of file miia64.h.

Referenced by KiMemoryFault().

#define _MIALT4K_   1
 

Definition at line 197 of file miia64.h.

#define _MM64_   1
 

Definition at line 195 of file miia64.h.

#define _MM_PAGING_FILE_HIGH_SHIFT   32
 

Definition at line 2415 of file miia64.h.

#define _MM_PAGING_FILE_LOW_SHIFT   28
 

Definition at line 2414 of file miia64.h.

#define _MM_PROTO_ADDRESS_SHIFT   12
 

Definition at line 2441 of file miia64.h.

#define _MM_PTE_SUBSECTION_ADDRESS_SHIFT   12
 

Definition at line 2452 of file miia64.h.

#define ALT4KB_PERMISSION_TABLE_END   (UADDRESS_BASE + 0x40000400000)
 

Definition at line 257 of file miia64.h.

#define ALT4KB_PERMISSION_TABLE_START   (UADDRESS_BASE + 0x40000000000)
 

Definition at line 255 of file miia64.h.

#define ALT_ALLOCATE   1
 

Definition at line 3244 of file miia64.h.

Referenced by NtAllocateVirtualMemory().

#define ALT_CHANGE   4
 

Definition at line 3246 of file miia64.h.

Referenced by MiProtectVirtualMemory().

#define ALT_COMMIT   2
 

Definition at line 3245 of file miia64.h.

Referenced by NtAllocateVirtualMemory().

#define ALT_PROTECTION_MASK   (MM_PTE_EXECUTE_MASK|MM_PTE_WRITE_MASK)
 

Definition at line 3228 of file miia64.h.

#define ALT_PTE_SHIFT   3
 

Definition at line 3226 of file miia64.h.

#define BYTES_TO_4K_PAGES Size   ) 
 

Value:

((ULONG)((ULONG_PTR)(Size) >> PAGE_4K_SHIFT) + \ (((ULONG)(Size) & (PAGE_4K - 1)) != 0))

Definition at line 3216 of file miia64.h.

#define CLEAR_FOR_PAGE_FILE   0x000003E0
 

Definition at line 1576 of file miia64.h.

#define CLEAR_FOR_PROTO_PTE_ADDRESS   ((ULONG)0x701)
 

Definition at line 1570 of file miia64.h.

#define CODE_END   KSEG2_BASE
 

Definition at line 243 of file miia64.h.

#define CODE_START   KSEG0_BASE
 

Definition at line 241 of file miia64.h.

#define FIRST_MAPPING_PTE   ((PMMPTE)HYPER_SPACE)
 

Definition at line 435 of file miia64.h.

#define GET_PAGING_FILE_NUMBER PTE   )     ((ULONG) (PTE).u.Soft.PageFileLow)
 

Definition at line 2091 of file miia64.h.

#define GET_PAGING_FILE_OFFSET PTE   )     ((ULONG) (PTE).u.Soft.PageFileHigh)
 

Definition at line 2115 of file miia64.h.

#define HYPER_SPACE   ((PVOID)(UADDRESS_BASE + 0x40000800000))
 

Definition at line 263 of file miia64.h.

#define HYPER_SPACE_END   (UADDRESS_BASE + 0x401FFFFFFFF)
 

Definition at line 265 of file miia64.h.

#define IMAGE_MAPPING_PTE   ((PMMPTE)((ULONG_PTR)LAST_MAPPING_PTE + PAGE_SIZE))
 

Definition at line 441 of file miia64.h.

#define IS_PTE_NOT_DEMAND_ZERO PTE   ) 
 

Value:

((PTE).u.Long & ((ULONG_PTR)0xFFFFFFFFFFFFF000 | \ MM_PTE_VALID_MASK | \ MM_PTE_PROTOTYPE_MASK | \ MM_PTE_TRANSITION_MASK))

Definition at line 2140 of file miia64.h.

#define KiWbInvalidateCache
 

Definition at line 2683 of file miia64.h.

#define KSEG0_ADDRESS PAGE   )     (PVOID)(KSEG0_BASE | ((PAGE) << PAGE_SHIFT))
 

Definition at line 3006 of file miia64.h.

#define LAST_MAPPING_PTE   ((ULONG_PTR)((ULONG_PTR)FIRST_MAPPING_PTE + (NUMBER_OF_MAPPING_PTES * PAGE_SIZE)))
 

Definition at line 438 of file miia64.h.

#define LOCK_ALTERNATE_TABLE PWOW64   )     ExAcquireFastMutex( &(PWOW64)->AlternateTableLock)
 

Definition at line 3498 of file miia64.h.

#define LOWEST_IO_ADDRESS   0xa0000
 

Definition at line 374 of file miia64.h.

#define MASK_43   0x7FFFFFFFFFFUI64
 

Definition at line 213 of file miia64.h.

#define MASK_44   0xFFFFFFFFFFFUI64
 

Definition at line 219 of file miia64.h.

#define MAX_PAGE_FILES   16
 

Definition at line 428 of file miia64.h.

#define MI_ALTFLG_FLUSH2G   0x0000000000000001
 

Definition at line 3238 of file miia64.h.

Referenced by KeFlushMultipleTb(), and KeFlushSingleTb().

#define MI_BARRIER_STAMP_ZEROED_PAGE PointerTimeStamp   ) 
 

Definition at line 3581 of file miia64.h.

#define MI_BARRIER_SYNCHRONIZE TimeStamp   ) 
 

Definition at line 3554 of file miia64.h.

#define MI_CAPTURE_DIRTY_BIT_TO_PFN PPTE,
PPFN   ) 
 

Value:

ASSERT (KeGetCurrentIrql() > APC_LEVEL); \ if (((PPFN)->u3.e1.Modified == 0) && \ ((PPTE)->u.Hard.Dirty != 0)) { \ (PPFN)->u3.e1.Modified = 1; \ if (((PPFN)->OriginalPte.u.Soft.Prototype == 0) && \ ((PPFN)->u3.e1.WriteInProgress == 0)) { \ MiReleasePageFileSpace ((PPFN)->OriginalPte); \ (PPFN)->OriginalPte.u.Soft.PageFileHigh = 0; \ } \ }

Definition at line 2320 of file miia64.h.

#define MI_CHECK_PAGE_ALIGNMENT PAGE,
PPTE   ) 
 

Definition at line 1120 of file miia64.h.

#define MI_CONVERT_PHYSICAL_TO_PFN Va   ) 
 

Value:

(((ULONG_PTR)(Va) < KSEG0_BASE) ? \ ((PFN_NUMBER)(((ULONG_PTR)(Va) - KSEG3_BASE) >> PAGE_SHIFT)) : \ ((PFN_NUMBER)(((ULONG_PTR)KiGetPhysicalAddress(Va)) >> PAGE_SHIFT)))

Definition at line 2385 of file miia64.h.

#define MI_DETERMINE_OWNER PPTE   ) 
 

Value:

((((((PPTE) >= (PMMPTE)PTE_UBASE) && ((PPTE) <= MiHighestUserPte))) || \ (MI_IS_ALT_PAGE_TABLE_ADDRESS(PPTE))) ? 3 : 0)

Definition at line 1456 of file miia64.h.

#define MI_DISABLE_CACHING PTE   )     ((PTE).u.Hard.Cache = MM_PTE_CACHE_DISABLED)
 

Definition at line 1011 of file miia64.h.

#define MI_ENABLE_CACHING PTE   )     ((PTE).u.Hard.Cache = MM_PTE_CACHE_ENABLED)
 

Definition at line 986 of file miia64.h.

#define MI_FLUSH_ENTIRE_SESSION_TB Invalid,
AllProcessors   )     KeFlushEntireTb (Invalid, AllProcessors);
 

Definition at line 3651 of file miia64.h.

#define MI_FLUSH_SINGLE_SESSION_TB Virtual,
Invalid,
AllProcessors,
PtePointer,
PteValue,
PreviousPte   ) 
 

Value:

PreviousPte.u.Flush = *PtePointer; \ *PtePointer = PteValue; \ KeFlushEntireTb (TRUE, TRUE);

Definition at line 3622 of file miia64.h.

#define MI_GET_ACCESSED_IN_PTE PPTE   )     0
 

Definition at line 1512 of file miia64.h.

#define MI_GET_COLOR_FROM_SECONDARY SECONDARY_COLOR   )     (0)
 

Definition at line 1332 of file miia64.h.

#define MI_GET_MODIFIED_PAGE_ANY_COLOR PAGE,
COLOR   ) 
 

Value:

{ \ if (MmTotalPagesForPagingFile == 0) { \ PAGE = MM_EMPTY_LIST; \ } else { \ PAGE = MmModifiedPageListByColor[COLOR].Flink; \ } \ }

Definition at line 1393 of file miia64.h.

#define MI_GET_MODIFIED_PAGE_BY_COLOR PAGE,
COLOR   )     PAGE = MmModifiedPageListByColor[COLOR].Flink
 

Definition at line 1361 of file miia64.h.

#define MI_GET_NEXT_COLOR COLOR   )     ((COLOR + 1) & MM_COLOR_MASK)
 

Definition at line 1303 of file miia64.h.

#define MI_GET_OWNER_IN_PTE PPTE   )     KernelMode
 

Definition at line 1562 of file miia64.h.

#define MI_GET_PAGE_COLOR_FROM_PTE PTEADDRESS   )     ((ULONG)((MmSystemPageColor++) & MmSecondaryColorMask))
 

Definition at line 1172 of file miia64.h.

#define MI_GET_PAGE_COLOR_FROM_SESSION _SessionSpace   )     ((ULONG)((_SessionSpace->Color++) & MmSecondaryColorMask))
 

Definition at line 1225 of file miia64.h.

#define MI_GET_PAGE_COLOR_FROM_VA ADDRESS   )     ((ULONG)((MmSystemPageColor++) & MmSecondaryColorMask))
 

Definition at line 1199 of file miia64.h.

#define MI_GET_PAGE_FRAME_FROM_PTE PTE   )     ((ULONG)((PTE)->u.Hard.PageFrameNumber))
 

Definition at line 2537 of file miia64.h.

#define MI_GET_PAGE_FRAME_FROM_TRANSITION_PTE PTE   )     ((ULONG)((PTE)->u.Trans.PageFrameNumber))
 

Definition at line 2538 of file miia64.h.

#define MI_GET_PREVIOUS_COLOR COLOR   )     (0)
 

Definition at line 1326 of file miia64.h.

#define MI_GET_PROTECTION_FROM_SOFT_PTE PTE   )     ((ULONG)((PTE)->u.Soft.Protection))
 

Definition at line 2539 of file miia64.h.

#define MI_GET_PROTECTION_FROM_TRANSITION_PTE PTE   )     ((ULONG)((PTE)->u.Trans.Protection))
 

Definition at line 2540 of file miia64.h.

#define MI_GET_SECONDARY_COLOR PAGE,
PFN   )     ((ULONG)(PAGE & MmSecondaryColorMask))
 

Definition at line 1329 of file miia64.h.

#define MI_GET_WORKING_SET_FROM_PTE PTE   )     (ULONG)(PTE)->u.Hard.SoftwareWsIndex
 

Definition at line 810 of file miia64.h.

#define MI_INITIALIZE_HYPERSPACE_MAP INDEX   ) 
 

Definition at line 1148 of file miia64.h.

#define MI_IS_ADDRESS_VALID_FOR_KD VirtualAddress   ) 
 

Value:

((VirtualAddress <= (PVOID)(HYPER_SPACE_END)) || \ (MI_IS_PTE_ADDRESS((PMMPTE)VirtualAddress)) || \ (MI_IS_PAGE_DIRECTORY_ADDRESS((PMMPTE)VirtualAddress)) || \ (MI_IS_PPE_ADDRESS((PMMPTE)VirtualAddress)) || \ ((VirtualAddress >= MM_SYSTEM_RANGE_START) && \ (VirtualAddress < (PVOID)MM_SYSTEM_SPACE_END)) || \ (MI_IS_SESSION_ADDRESS(VirtualAddress)) || \ (MI_IS_PHYSICAL_ADDRESS(VirtualAddress)) || \ (MI_IS_PCR_PAGE(VirtualAddress)))

Definition at line 3685 of file miia64.h.

Referenced by MmDbgReadCheck(), and MmDbgWriteCheck().

#define MI_IS_ALT_PAGE_TABLE_ADDRESS PPTE   ) 
 

Value:

Definition at line 3504 of file miia64.h.

#define MI_IS_CACHING_DISABLED PPTE   )     ((PPTE)->u.Hard.Cache == MM_PTE_CACHE_DISABLED)
 

Definition at line 1037 of file miia64.h.

#define MI_IS_HYPER_SPACE_ADDRESS VA   )     (((ULONG_PTR)VA >= (ULONG_PTR)HYPER_SPACE) && ((ULONG_PTR)VA <= HYPER_SPACE_END))
 

Definition at line 2742 of file miia64.h.

#define MI_IS_KERNEL_PDE_ADDRESS PDE   )     ((PDE >= (PMMPTE)PDE_KBASE) && (PDE <= (PMMPTE)PDE_KTOP))
 

Definition at line 2899 of file miia64.h.

#define MI_IS_KERNEL_PTE_ADDRESS PTE   )     (((PMMPTE)PTE >= (PMMPTE)PTE_KBASE) && ((PMMPTE)PTE <= (PMMPTE)PTE_KTOP))
 

Definition at line 2798 of file miia64.h.

#define MI_IS_PAGE_DIRECTORY_ADDRESS PDE   ) 
 

Value:

(((PDE >= (PMMPTE)PDE_UBASE) && (PDE <= (PMMPTE)PDE_UTOP)) || \ ((PDE >= (PMMPTE)PDE_KBASE) && (PDE <= (PMMPTE)PDE_KTOP)) || \ ((PDE >= (PMMPTE)PDE_SBASE) && (PDE <= (PMMPTE)PDE_STOP)))

Definition at line 2848 of file miia64.h.

#define MI_IS_PAGE_TABLE_ADDRESS VA   ) 
 

Value:

((((ULONG_PTR)VA >= PTE_UBASE) && ((ULONG_PTR)VA <= (PDE_UTBASE + PAGE_SIZE))) || \ (((ULONG_PTR)VA >= PTE_KBASE) && ((ULONG_PTR)VA <= (PDE_KTBASE + PAGE_SIZE))) || \ (((ULONG_PTR)VA >= PTE_SBASE) && ((ULONG_PTR)VA <= (PDE_STBASE + PAGE_SIZE))) || \ (((ULONG_PTR)VA >= ALT4KB_PERMISSION_TABLE_START) && \ ((ULONG_PTR)VA <= ALT4KB_PERMISSION_TABLE_END)))

Definition at line 2708 of file miia64.h.

#define MI_IS_PCR_PAGE Va   )     (((PVOID)PCR <= Va) && (Va < (PVOID)(PCR+PAGE_SIZE)))
 

Definition at line 3661 of file miia64.h.

Referenced by MmDbgReadCheck(), and MmDbgWriteCheck().

#define MI_IS_PFN_DELETED PPFN   )     ((PPFN)->PteAddress == (PMMPTE)((INT_PTR)(LONG)0xFFFFFFFF))
 

Definition at line 1089 of file miia64.h.

#define MI_IS_PHYSICAL_ADDRESS Va   ) 
 

Value:

((((ULONG_PTR)(Va) >= KSEG3_BASE) && ((ULONG_PTR)(Va) < KSEG3_LIMIT)) || \ (((ULONG_PTR)Va >= KSEG0_BASE) && ((ULONG_PTR)Va < KSEG2_BASE)))

Definition at line 2355 of file miia64.h.

#define MI_IS_PPE_ADDRESS PTE   ) 
 

Value:

(((PTE >= (PMMPTE)PDE_UTBASE) && (PTE <= (PMMPTE)(PDE_UTBASE + PAGE_SIZE))) || \ ((PTE >= (PMMPTE)PDE_KTBASE) && (PTE <= (PMMPTE)(PDE_KTBASE + PAGE_SIZE))) || \ ((PTE >= (PMMPTE)PDE_STBASE) && (PTE <= (PMMPTE)(PDE_STBASE + PAGE_SIZE))))

Definition at line 2772 of file miia64.h.

#define MI_IS_PROCESS_SPACE_ADDRESS VA   )     (((ULONG_PTR)VA >> 61) == UREGION_INDEX)
 

Definition at line 2924 of file miia64.h.

#define MI_IS_PTE_ADDRESS PTE   ) 
 

Value:

(((PTE >= (PMMPTE)PTE_UBASE) && (PTE <= (PMMPTE)PTE_UTOP)) || \ ((PTE >= (PMMPTE)PTE_KBASE) && (PTE <= (PMMPTE)PTE_KTOP)) || \ ((PTE >= (PMMPTE)PTE_SBASE) && (PTE <= (PMMPTE)PTE_STOP)))

Definition at line 2766 of file miia64.h.

#define MI_IS_PTE_DIRTY PTE   )     ((PTE).u.Hard.Dirty != 0)
 

Definition at line 906 of file miia64.h.

#define MI_IS_PTE_PROTOTYPE PointerPte   )     (!MI_IS_USER_PTE_ADDRESS (PointerPte))
 

Definition at line 3171 of file miia64.h.

#define MI_IS_SYSTEM_ADDRESS VA   )     (((ULONG_PTR)VA >> 61) == KREGION_INDEX)
 

Definition at line 2947 of file miia64.h.

Referenced by MiEnsureAvailablePageOrWait().

#define MI_IS_SYSTEM_CACHE_ADDRESS VA   ) 
 

Value:

(((PVOID)(VA) >= (PVOID)MmSystemCacheStart && \ (PVOID)(VA) <= (PVOID)MmSystemCacheEnd))

Definition at line 3194 of file miia64.h.

#define MI_IS_USER_PDE_ADDRESS PDE   )     ((PDE >= (PMMPTE)PDE_UBASE) && (PDE <= (PMMPTE)PDE_UTOP))
 

Definition at line 2874 of file miia64.h.

#define MI_IS_USER_PTE_ADDRESS PTE   )     ((PTE >= (PMMPTE)PTE_UBASE) && (PTE <= (PMMPTE)PTE_UTOP))
 

Definition at line 2823 of file miia64.h.

#define MI_MAKE_PROTECT_WRITE_COPY PTE   ) 
 

Value:

if ((PTE).u.Soft.Protection & MM_PROTECTION_WRITE_MASK) { \ (PTE).u.Long |= MM_PROTECTION_COPY_MASK << MM_PROTECT_FIELD_SHIFT; \ }

Definition at line 2216 of file miia64.h.

#define MI_MAKE_TRANSITION_PTE OUTPTE,
PAGE,
PROTECT,
PPTE   ) 
 

Value:

(OUTPTE).u.Long = 0; \ (OUTPTE).u.Trans.PageFrameNumber = PAGE; \ (OUTPTE).u.Trans.Transition = 1; \ (OUTPTE).u.Trans.Protection = PROTECT;

Definition at line 710 of file miia64.h.

#define MI_MAKE_TRANSITION_PTE_VALID OUTPTE,
PPTE   ) 
 

Value:

ASSERT (((PPTE)->u.Hard.Valid == 0) && \ ((PPTE)->u.Trans.Prototype == 0) && \ ((PPTE)->u.Trans.Transition == 1)); \ (OUTPTE).u.Long = (PPTE)->u.Long & 0x1FFFFFFFE000; \ (OUTPTE).u.Hard.Valid = 1; \ (OUTPTE).u.Hard.Cache = MM_PTE_CACHE_ENABLED; \ (OUTPTE).u.Hard.Exception = 1; \ (OUTPTE).u.Hard.Owner = MI_DETERMINE_OWNER(PPTE); \ { \ PWOW64_PROCESS _Wow64Process = PsGetCurrentProcess()->Wow64Process; \ if ((_Wow64Process != NULL) && \ ((PPTE >= (PMMPTE)PTE_UBASE) && \ (PPTE < MiGetPteAddress(_MAX_WOW64_ADDRESS)))) { \ if (MI_CHECK_BIT(_Wow64Process->AltPermBitmap, \ ((ULONG_PTR)PPTE >> PTE_SHIFT) & _ALTPERM_BITMAP_MASK) != 0) { \ (OUTPTE).u.Long |= (MmProtectToPteMaskForSplit[(PPTE)->u.Trans.Protection]); \ } else { \ (OUTPTE).u.Long |= (MmProtectToPteMaskForIA32[(PPTE)->u.Trans.Protection]); \ (OUTPTE).u.Hard.Accessed = 1; \ } \ } else { \ (OUTPTE).u.Hard.Accessed = 1; \ (OUTPTE).u.Long |=(MmProtectToPteMask[(PPTE)->u.Trans.Protection]);\ }\ }

Definition at line 3429 of file miia64.h.

#define MI_MAKE_VALID_PTE OUTPTE,
FRAME,
PMASK,
PPTE   ) 
 

Value:

(OUTPTE).u.Long = 0; \ (OUTPTE).u.Hard.Valid = 1; \ (OUTPTE).u.Hard.Cache = MM_PTE_CACHE_ENABLED; \ (OUTPTE).u.Hard.Exception = 1; \ (OUTPTE).u.Hard.PageFrameNumber = FRAME; \ (OUTPTE).u.Hard.Owner = MI_DETERMINE_OWNER(PPTE); \ { \ PWOW64_PROCESS _Wow64Process = PsGetCurrentProcess()->Wow64Process; \ if ((_Wow64Process != NULL) && \ ((PPTE >= (PMMPTE)PTE_UBASE) && \ (PPTE < MiGetPteAddress(_MAX_WOW64_ADDRESS)))) { \ if (MI_CHECK_BIT(_Wow64Process->AltPermBitmap, \ ((ULONG_PTR)PPTE >> PTE_SHIFT) & _ALTPERM_BITMAP_MASK) != 0) { \ (OUTPTE).u.Long |= (MmProtectToPteMaskForSplit[PMASK]); \ } else { \ (OUTPTE).u.Long |= (MmProtectToPteMaskForIA32[PMASK]); \ (OUTPTE).u.Hard.Accessed = 1; \ } \ } else { \ (OUTPTE).u.Hard.Accessed = 1; \ (OUTPTE).u.Long |= (MmProtectToPteMask[PMASK]);\ }\ }

Definition at line 3403 of file miia64.h.

#define MI_MAKE_VALID_PTE_TRANSITION OUTPTE,
PROTECT   ) 
 

Value:

(OUTPTE).u.Soft.Transition = 1; \ (OUTPTE).u.Soft.Valid = 0; \ (OUTPTE).u.Soft.Prototype = 0; \ (OUTPTE).u.Soft.Protection = PROTECT;

Definition at line 674 of file miia64.h.

#define MI_MAKE_VALID_PTE_WRITE_COPY PPTE   ) 
 

Value:

if ((PPTE)->u.Hard.Write == 1) { \ (PPTE)->u.Hard.CopyOnWrite = 1; \ (PPTE)->u.Hard.Write = 0; \ }

Definition at line 1426 of file miia64.h.

#define MI_MAKING_MULTIPLE_PTES_INVALID SYSTEM_WIDE   ) 
 

Definition at line 2192 of file miia64.h.

#define MI_MAKING_VALID_PTE_INVALID SYSTEM_WIDE   ) 
 

Definition at line 2168 of file miia64.h.

#define MI_MAXIMUM_PTE_WORKING_SET_INDEX   (1 << _HARDWARE_PTE_WORKING_SET_BITS)
 

Definition at line 541 of file miia64.h.

#define MI_NO_FAULT_FOUND TEMP,
PPTE,
VA,
PFNHELD   ) 
 

Value:

if (StoreInstruction && ((PPTE)->u.Hard.Dirty == 0)) { \ MiSetDirtyBit ((VA),(PPTE),(PFNHELD)); \ }

Definition at line 2286 of file miia64.h.

#define MI_PAGE_COLOR_PTE_PROCESS PTE,
COLOR   )     (ULONG)((ULONG_PTR)((*(COLOR))++) & MmSecondaryColorMask)
 

Definition at line 1251 of file miia64.h.

#define MI_PAGE_COLOR_VA_PROCESS ADDRESS,
COLOR   )     ((ULONG)((*(COLOR))++) & MmSecondaryColorMask)
 

Definition at line 1278 of file miia64.h.

#define MI_PTE_BASE_FOR_LOWEST_KERNEL_ADDRESS   ((PMMPTE)PTE_KBASE)
 

Definition at line 207 of file miia64.h.

#define MI_PTE_LOOKUP_NEEDED   ((ULONG64)0xffffffff)
 

Definition at line 2417 of file miia64.h.

#define MI_SET_ACCESSED_IN_PTE PPTE,
ACCESSED   ) 
 

Definition at line 1488 of file miia64.h.

#define MI_SET_GLOBAL_BIT_IF_SYSTEM OUTPTE,
PPTE   ) 
 

Definition at line 934 of file miia64.h.

#define MI_SET_GLOBAL_STATE PTE,
STATE   ) 
 

Definition at line 961 of file miia64.h.

#define MI_SET_OWNER_IN_PTE PPTE,
OWNER   ) 
 

Definition at line 1537 of file miia64.h.

#define MI_SET_PAGE_DIRTY PPTE,
VA,
PFNHELD   ) 
 

Value:

if ((PPTE)->u.Hard.Dirty == 1) { \ MiSetDirtyBit ((VA),(PPTE),(PFNHELD)); \ }

Definition at line 2250 of file miia64.h.

#define MI_SET_PAGING_FILE_INFO OUTPTE,
PTE,
FILEINFO,
OFFSET   ) 
 

Value:

(OUTPTE).u.Long = (((PTE).u.Soft.Protection << MM_PROTECT_FIELD_SHIFT) | \ ((ULONGLONG)(FILEINFO) << _MM_PAGING_FILE_LOW_SHIFT) | \ ((ULONGLONG)(OFFSET) << _MM_PAGING_FILE_HIGH_SHIFT));

Definition at line 1609 of file miia64.h.

#define MI_SET_PFN_DELETED PPFN   )     (((PPFN)->PteAddress = (PMMPTE)((INT_PTR)(LONG)0xFFFFFFFF)))
 

Definition at line 1063 of file miia64.h.

#define MI_SET_PTE_CLEAN PTE   )     (PTE).u.Hard.Dirty = 0
 

Definition at line 882 of file miia64.h.

#define MI_SET_PTE_DIRTY PTE   )     (PTE).u.Hard.Dirty = 1
 

Definition at line 859 of file miia64.h.

#define MI_SET_PTE_IN_WORKING_SET PTE,
WSINDEX   ) 
 

Value:

{ \ MMPTE _TempPte; \ _TempPte = *(PTE); \ _TempPte.u.Hard.SoftwareWsIndex = (WSINDEX); \ *(PTE) = _TempPte; \ }

Definition at line 783 of file miia64.h.

#define MI_SET_PTE_WRITE_COMBINE PTE   )     ((PTE).u.Hard.Cache = MM_PTE_CACHE_DISABLED)
 

Definition at line 832 of file miia64.h.

#define MI_SET_PTE_WRITE_COMBINE2 PTE   )     ((PTE).u.Hard.Cache = MM_PTE_CACHE_DISPLAY)
 

Definition at line 835 of file miia64.h.

#define MI_WRITE_INVALID_PTE _PointerPte,
_PteContents   )     (*(_PointerPte) = (_PteContents))
 

Definition at line 2611 of file miia64.h.

#define MI_WRITE_VALID_PTE _PointerPte,
_PteContents   )     (*(_PointerPte) = (_PteContents))
 

Definition at line 2584 of file miia64.h.

#define MI_WRITE_VALID_PTE_NEW_PROTECTION _PointerPte,
_PteContents   )     (*(_PointerPte) = (_PteContents))
 

Definition at line 2638 of file miia64.h.

#define MiFillMemoryPte Destination,
Length,
Pattern   )     RtlFillMemoryUlonglong ((Destination), (Length), (Pattern))
 

Definition at line 2679 of file miia64.h.

#define MiGetAltPteAddress VA   ) 
 

Value:

((PMMPTE) (ALT4KB_PERMISSION_TABLE_START + \ ((((ULONG_PTR) (VA)) >> PAGE_4K_SHIFT) << ALT_PTE_SHIFT)))

Definition at line 3230 of file miia64.h.

#define MiGetPdeAddress Va   ) 
 

Value:

(((((ULONG_PTR)(Va)) & PDE_BASE) == PDE_BASE) ? \ ((PMMPTE)((((ULONG_PTR)(Va)) & VRN_MASK) | (PDE_TBASE + PAGE_SIZE - sizeof(MMPTE)))) :\ ((PMMPTE)(((((ULONG_PTR)(Va)) & VRN_MASK)) | \ ((((((ULONG_PTR)(Va)) >> PDI_SHIFT) << PTE_SHIFT) & (~(PDE_BASE|VRN_MASK))) + PDE_BASE))))

Definition at line 3109 of file miia64.h.

#define MiGetPdeOffset va   )     ((ULONG) (((ULONG_PTR)(va) >> PDI_SHIFT) & PDI_MASK))
 

Definition at line 1837 of file miia64.h.

#define MiGetPpeAddress Va   ) 
 

Value:

(((((ULONG_PTR)(Va)) & PTE_BASE) == PTE_BASE) ? \ ((PMMPTE)((((ULONG_PTR)(Va)) & VRN_MASK) | (PDE_TBASE + PAGE_SIZE - sizeof(MMPTE)))) :\ ((PMMPTE)(((((ULONG_PTR)(Va)) & VRN_MASK)) | \ ((((((ULONG_PTR)(Va)) >> PDI1_SHIFT) << PTE_SHIFT) & \ (~(PDE_TBASE|VRN_MASK)) ) + PDE_TBASE))))

Definition at line 3059 of file miia64.h.

#define MiGetPpeOffset va   )     ((ULONG)(((ULONG_PTR)(va) >> PDI1_SHIFT) & PDI_MASK))
 

Definition at line 1814 of file miia64.h.

#define MiGetPpePdeOffset va   )     ((ULONG) ((ULONG_PTR)(va) >> PDI_SHIFT))
 

Definition at line 1863 of file miia64.h.

#define MiGetPteAddress Va   ) 
 

Value:

(((((ULONG_PTR)(Va)) & PDE_TBASE) == PDE_TBASE) ? \ ((PMMPTE)((((ULONG_PTR)(Va)) & VRN_MASK) | (PDE_TBASE + PAGE_SIZE - sizeof(MMPTE)))) :\ ((PMMPTE)(((((ULONG_PTR)(Va)) & VRN_MASK)) | \ ((((((ULONG_PTR)(Va)) >> PTI_SHIFT) << PTE_SHIFT) & (~(PTE_BASE|VRN_MASK))) + PTE_BASE))))

Definition at line 3162 of file miia64.h.

#define MiGetPteOffset va   )     ((ULONG) (((ULONG_PTR)(va) >> PTI_SHIFT) & PDI_MASK))
 

Definition at line 1886 of file miia64.h.

#define MiGetSubsectionAddress lpte   ) 
 

Value:

(((lpte)->u.Subsect.WhichPool == 1) ? \ ((PSUBSECTION)((ULONG_PTR)MmSubsectionBase + \ ((ULONG_PTR)(lpte)->u.Subsect.SubsectionAddress))) \ : \ ((PSUBSECTION)((ULONG_PTR)MM_NONPAGED_POOL_END - \ ((ULONG_PTR)(lpte)->u.Subsect.SubsectionAddress))))

Definition at line 1742 of file miia64.h.

#define MiGetSubsectionAddressForPte VA   ) 
 

Value:

( ((ULONG_PTR)(VA) < (ULONG_PTR)KSEG2_BASE) ? \ ( ((ULONGLONG)((ULONG_PTR)VA - (ULONG_PTR)MmSubsectionBase) \ << (_MM_PTE_SUBSECTION_ADDRESS_SHIFT)) | 0x80) \ : \ ((ULONGLONG)((ULONG_PTR)MM_NONPAGED_POOL_END - (ULONG_PTR)VA) \ << (_MM_PTE_SUBSECTION_ADDRESS_SHIFT)) )

Definition at line 1774 of file miia64.h.

#define MiGetVirtualAddressMappedByPde Pde   )     MiGetVirtualAddressMappedByPte(MiGetVirtualAddressMappedByPte(Pde))
 

Definition at line 1935 of file miia64.h.

#define MiGetVirtualAddressMappedByPpe PPE   )     MiGetVirtualAddressMappedByPte(MiGetVirtualAddressMappedByPde(PPE))
 

Definition at line 1911 of file miia64.h.

#define MiGetVirtualAddressMappedByPte PTE   )     ((PVOID)((ULONG_PTR)(PTE) << (PAGE_SHIFT - PTE_SHIFT)))
 

Definition at line 1969 of file miia64.h.

#define MiIsPteOnPdeBoundary PTE   )     (((ULONG_PTR)(PTE) & (PAGE_SIZE - 1)) == 0)
 

Definition at line 2068 of file miia64.h.

#define MiIsPteOnPpeBoundary PTE   )     (((ULONG_PTR)(PTE) & (MM_VA_MAPPED_BY_PDE - 1)) == 0)
 

Definition at line 2043 of file miia64.h.

#define MiIsVirtualAddressOnPdeBoundary VA   )     (((ULONG_PTR)(VA) & PAGE_DIRECTORY2_MASK) == 0)
 

Definition at line 2019 of file miia64.h.

#define MiIsVirtualAddressOnPpeBoundary VA   )     (((ULONG_PTR)(VA) & PAGE_DIRECTORY1_MASK) == 0)
 

Definition at line 1995 of file miia64.h.

#define MiMakeProtectionAteMask NewProtect   )     MmProtectToAteMask[NewProtect]
 

Definition at line 3397 of file miia64.h.

#define MiProtoAddressForKernelPte proto_va   )     MiProtoAddressForPte(proto_va)
 

Definition at line 1711 of file miia64.h.

#define MiProtoAddressForPte proto_va   ) 
 

Value:

(( (ULONGLONG)((ULONG_PTR)proto_va - MmProtopte_Base) << \ (_MM_PROTO_ADDRESS_SHIFT)) | MM_PTE_PROTOTYPE_MASK)

Definition at line 1672 of file miia64.h.

#define MiPteToProto lpte   )     ((PMMPTE) ((ULONG_PTR)((lpte)->u.Proto.ProtoAddress) + MmProtopte_Base))
 

Definition at line 1645 of file miia64.h.

#define MISetProtoAddressForPte PTE,
proto_va   ) 
 

Value:

(PTE).u.Long = 0; \ (PTE).u.Proto.Prototype = 1; \ (PTE).u.Proto.ProtoAddress = (ULONG_PTR)proto_va - MmProtopte_Base;

Definition at line 1676 of file miia64.h.

#define MiSetSubsectionAddressForPte PTE,
VA   ) 
 

Value:

(PTE).u.Long = 0; \ if ((ULONG_PTR)(VA) < (ULONG_PTR)KSEG2_BASE) { \ (PTE).u.Subsect.SubsectionAddress = (ULONG_PTR)VA - (ULONG_PTR)MmSubsectionBase; \ (PTE).u.Subsect.WhichPool = 1; \ } else { \ (PTE).u.Subsect.SubsectionAddress = (ULONG_PTR)MM_NONPAGED_POOL_END - (ULONG_PTR)VA; \ }

Definition at line 1782 of file miia64.h.

#define MM_ATE_ACCESS   0x0000000000000020
 

Definition at line 3253 of file miia64.h.

#define MM_ATE_COMMIT   0x0000000000000001
 

Definition at line 3252 of file miia64.h.

#define MM_ATE_COPY_ON_WRITE   0x2000000000000000
 

Definition at line 3265 of file miia64.h.

#define MM_ATE_EXECUTE   0x0400000000000200
 

Definition at line 3256 of file miia64.h.

#define MM_ATE_EXECUTE_READ   0x0400000000000200
 

Definition at line 3257 of file miia64.h.

#define MM_ATE_EXECUTE_READWRITE   0x0400000000000600
 

Definition at line 3260 of file miia64.h.

#define MM_ATE_EXECUTE_WRITECOPY   0x0420000000000400
 

Definition at line 3261 of file miia64.h.

#define MM_ATE_NOACCESS   0x1000000000000000
 

Definition at line 3264 of file miia64.h.

#define MM_ATE_PRIVATE   0x8000000000000000
 

Definition at line 3266 of file miia64.h.

#define MM_ATE_PROTO_MASK   0x0000000000000621
 

Definition at line 3267 of file miia64.h.

#define MM_ATE_READONLY   0x0000000000000200
 

Definition at line 3255 of file miia64.h.

#define MM_ATE_READWRITE   0x0000000000000600
 

Definition at line 3258 of file miia64.h.

#define MM_ATE_WRITECOPY   0x0020000000000200
 

Definition at line 3259 of file miia64.h.

#define MM_ATE_ZEROFILL   0x0800000000000000
 

Definition at line 3263 of file miia64.h.

#define MM_COLOR_ALIGNMENT   (0)
 

Definition at line 400 of file miia64.h.

#define MM_COLOR_MASK   (0)
 

Definition at line 394 of file miia64.h.

#define MM_COLOR_MASK_VIRTUAL   (0)
 

Definition at line 406 of file miia64.h.

#define MM_CRASH_DUMP_VA   ((PVOID)(KADDRESS_BASE + 0xFF800000))
 

Definition at line 303 of file miia64.h.

#define MM_DEBUG_VA   ((PVOID)(KADDRESS_BASE + 0xFF900000))
 

Definition at line 307 of file miia64.h.

#define MM_DEFAULT_SYSTEM_PTES   11000
 

Definition at line 325 of file miia64.h.

#define MM_DEMAND_ZERO_WRITE_PTE   ((ULONGLONG)MM_READWRITE << MM_PROTECT_FIELD_SHIFT)
 

Definition at line 559 of file miia64.h.

#define MM_EMPTY_LIST   ((ULONG)0xFFFFFFFF)
 

Definition at line 204 of file miia64.h.

#define MM_EMPTY_PTE_LIST   ((ULONG)0xFFFFFFFF)
 

Definition at line 205 of file miia64.h.

#define MM_KERNEL_DEMAND_ZERO_PTE   ((ULONGLONG)MM_READWRITE << MM_PROTECT_FIELD_SHIFT)
 

Definition at line 566 of file miia64.h.

#define MM_KERNEL_NOACCESS_PTE   ((ULONGLONG)MM_NOACCESS << MM_PROTECT_FIELD_SHIFT)
 

Definition at line 572 of file miia64.h.

#define MM_LOWEST_NONPAGED_SYSTEM_START   ((PVOID)(KADDRESS_BASE + 0x12600000000UI64))
 

Definition at line 297 of file miia64.h.

#define MM_MAX_ADDITIONAL_NONPAGED_POOL   (((SIZE_T)128 * 1024 * 1024 * 1024) - 16)
 

Definition at line 341 of file miia64.h.

#define MM_MAX_DEFAULT_NONPAGED_POOL   ((SIZE_T)8 * 1024 * 1024 * 1024)
 

Definition at line 353 of file miia64.h.

#define MM_MAX_INITIAL_NONPAGED_POOL   ((SIZE_T)(128 * 1024 * 1024))
 

Definition at line 335 of file miia64.h.

#define MM_MAX_PAGED_POOL   ((SIZE_T)128 * 1024 * 1024 * 1024)
 

Definition at line 347 of file miia64.h.

#define MM_MAXIMUM_NUMBER_OF_COLORS   (1)
 

Definition at line 382 of file miia64.h.

#define MM_MAXIMUM_SYSTEM_CACHE_SIZE   (((ULONG_PTR)MM_SYSTEM_CACHE_END - (ULONG_PTR)MM_SYSTEM_CACHE_START) >> PAGE_SHIFT)
 

Definition at line 292 of file miia64.h.

#define MM_MAXIMUM_SYSTEM_PTES   50000
 

Definition at line 323 of file miia64.h.

#define MM_MAXIMUM_WORKING_SET   ((ULONG)((ULONG)2*1024*1024*1024 - 64*1024*1024) >> PAGE_SHIFT)
 

Definition at line 447 of file miia64.h.

#define MM_MAXIMUM_ZERO_BITS   53
 

Definition at line 227 of file miia64.h.

#define MM_MINIMUM_SYSTEM_PTES   7000
 

Definition at line 321 of file miia64.h.

#define MM_NONPAGED_POOL_END   ((PVOID)(KADDRESS_BASE + 0x16600000000UI64 - (16 * PAGE_SIZE)))
 

Definition at line 301 of file miia64.h.

#define MM_NUMBER_OF_COLORS   (1)
 

Definition at line 388 of file miia64.h.

#define MM_PAGED_POOL_START   ((PVOID)(KADDRESS_BASE + 0x10600000000UI64))
 

Definition at line 295 of file miia64.h.

#define MM_PAGES_IN_KSEG0   ((ULONG)((KSEG2_BASE - KSEG0_BASE) >> PAGE_SHIFT))
 

Definition at line 221 of file miia64.h.

#define MM_PFN_DATABASE_END   (KADDRESS_BASE + 0x60000000000UI64)
 

Definition at line 313 of file miia64.h.

#define MM_PFN_DATABASE_START   (KADDRESS_BASE + 0x40000000000UI64)
 

Definition at line 311 of file miia64.h.

Referenced by MiInitMachineDependent().

#define MM_PROTECT_FIELD_SHIFT   2
 

Definition at line 507 of file miia64.h.

#define MM_PROTO_PTE_ALIGNMENT   ((ULONG)PAGE_SIZE)
 

Definition at line 360 of file miia64.h.

#define MM_PTE_16MB_PAGE   24
 

Definition at line 527 of file miia64.h.

Referenced by MiInitMachineDependent().

#define MM_PTE_1MB_PAGE   20
 

Definition at line 524 of file miia64.h.

Referenced by MiInitMachineDependent().

#define MM_PTE_256MB_PAGE   28
 

Definition at line 529 of file miia64.h.

Referenced by MiInitMachineDependent().

#define MM_PTE_2MB_PAGE   21
 

Definition at line 525 of file miia64.h.

#define MM_PTE_4MB_PAGE   22
 

Definition at line 526 of file miia64.h.

Referenced by MiInitMachineDependent().

#define MM_PTE_64MB_PAGE   26
 

Definition at line 528 of file miia64.h.

Referenced by MiInitMachineDependent().

#define MM_PTE_ACCESS_MASK   0x0020
 

Definition at line 478 of file miia64.h.

#define MM_PTE_CACHE   MM_PTE_TB_MA_WB
 

Definition at line 502 of file miia64.h.

#define MM_PTE_CACHE_DISABLE_MASK   MM_PTE_TB_MA_UC
 

Definition at line 477 of file miia64.h.

#define MM_PTE_CACHE_DISABLED   4
 

Definition at line 467 of file miia64.h.

#define MM_PTE_CACHE_DISPLAY   6
 

Definition at line 468 of file miia64.h.

#define MM_PTE_CACHE_ENABLED   0
 

Definition at line 466 of file miia64.h.

#define MM_PTE_CACHE_RESERVED   1
 

Definition at line 469 of file miia64.h.

#define MM_PTE_COPY_ON_WRITE_MASK   ((ULONG)1 << (PAGE_SHIFT-1))
 

Definition at line 483 of file miia64.h.

#define MM_PTE_DIRTY_MASK   0x0040
 

Definition at line 479 of file miia64.h.

#define MM_PTE_EXC_DEFER   0x10000000000000
 

Definition at line 504 of file miia64.h.

#define MM_PTE_EXECUTE   MM_PTE_EXECUTE_MASK
 

Definition at line 497 of file miia64.h.

#define MM_PTE_EXECUTE_MASK   0x0200
 

Definition at line 480 of file miia64.h.

#define MM_PTE_EXECUTE_READ   MM_PTE_EXECUTE_MASK
 

Definition at line 498 of file miia64.h.

#define MM_PTE_EXECUTE_READWRITE   MM_PTE_EXECUTE_MASK | MM_PTE_WRITE_MASK
 

Definition at line 499 of file miia64.h.

#define MM_PTE_EXECUTE_WRITECOPY   MM_PTE_EXECUTE_MASK | MM_PTE_COPY_ON_WRITE_MASK
 

Definition at line 500 of file miia64.h.

#define MM_PTE_GUARD   0x0
 

Definition at line 501 of file miia64.h.

#define MM_PTE_LARGE_PAGE_MASK   0
 

Definition at line 482 of file miia64.h.

#define MM_PTE_NOACCESS   0x0
 

Definition at line 493 of file miia64.h.

#define MM_PTE_NOCACHE   MM_PTE_CACHE
 

Definition at line 503 of file miia64.h.

#define MM_PTE_OWNER_MASK   0x0180
 

Definition at line 475 of file miia64.h.

#define MM_PTE_PROTOTYPE_MASK   0x0002
 

Definition at line 485 of file miia64.h.

#define MM_PTE_READONLY   0x0
 

Definition at line 494 of file miia64.h.

#define MM_PTE_READWRITE   MM_PTE_WRITE_MASK
 

Definition at line 495 of file miia64.h.

#define MM_PTE_TB_ACCESSED   0x0020
 

Definition at line 514 of file miia64.h.

#define MM_PTE_TB_EXC_DEFER   0x10000000000000
 

Definition at line 518 of file miia64.h.

#define MM_PTE_TB_EXECUTE   0x0200
 

Definition at line 517 of file miia64.h.

#define MM_PTE_TB_MA_NATPAGE   (0x7 << 2)
 

Definition at line 460 of file miia64.h.

#define MM_PTE_TB_MA_UC   (0x4 << 2)
 

Definition at line 457 of file miia64.h.

#define MM_PTE_TB_MA_UCE   (0x5 << 2)
 

Definition at line 458 of file miia64.h.

#define MM_PTE_TB_MA_WB   (0x0 << 2)
 

Definition at line 456 of file miia64.h.

#define MM_PTE_TB_MA_WC   (0x6 << 2)
 

Definition at line 459 of file miia64.h.

#define MM_PTE_TB_MODIFIED   0x0040
 

Definition at line 515 of file miia64.h.

#define MM_PTE_TB_VALID   0x0001
 

Definition at line 513 of file miia64.h.

#define MM_PTE_TB_WRITE   0x0400
 

Definition at line 516 of file miia64.h.

#define MM_PTE_TRANSITION_MASK   0x0080
 

Definition at line 486 of file miia64.h.

#define MM_PTE_VALID_MASK   1
 

Definition at line 476 of file miia64.h.

#define MM_PTE_WRITE_MASK   0x0400
 

Definition at line 481 of file miia64.h.

#define MM_PTE_WRITECOPY   MM_PTE_COPY_ON_WRITE_MASK
 

Definition at line 496 of file miia64.h.

#define MM_SECONDARY_COLORS_DEFAULT   (64)
 

Definition at line 412 of file miia64.h.

#define MM_SECONDARY_COLORS_MAX   (1024)
 

Definition at line 416 of file miia64.h.

#define MM_SECONDARY_COLORS_MIN   (2)
 

Definition at line 414 of file miia64.h.

#define MM_SESSION_SPACE_DEFAULT   (0x2000000000000000UI64)
 

Definition at line 275 of file miia64.h.

#define MM_STACK_ALIGNMENT   0x0
 

Definition at line 580 of file miia64.h.

#define MM_STACK_OFFSET   0x0
 

Definition at line 582 of file miia64.h.

#define MM_SUBSECTION_MAP   (128*1024*1024)
 

Definition at line 1714 of file miia64.h.

#define MM_SYSTEM_CACHE_END   (KADDRESS_BASE + 0x1005FFFFFFFFUI64)
 

Definition at line 290 of file miia64.h.

#define MM_SYSTEM_CACHE_START   (KADDRESS_BASE + 0x600000000UI64)
 

Definition at line 288 of file miia64.h.

#define MM_SYSTEM_CACHE_WORKING_SET   (KADDRESS_BASE + 0x400000000UI64)
 

Definition at line 286 of file miia64.h.

#define MM_SYSTEM_SPACE_END   (KADDRESS_BASE + 0x60000000000UI64)
 

Definition at line 247 of file miia64.h.

#define MM_SYSTEM_SPACE_START   (KADDRESS_BASE + 0x400000000UI64)
 

Definition at line 245 of file miia64.h.

#define MM_SYSTEM_VIEW_SIZE   (48*1024*1024)
 

Definition at line 273 of file miia64.h.

#define MM_SYSTEM_VIEW_SIZE_IF_HYDRA   MM_SYSTEM_VIEW_SIZE
 

Definition at line 279 of file miia64.h.

#define MM_SYSTEM_VIEW_START   (KADDRESS_BASE + 0xA0000000)
 

Definition at line 271 of file miia64.h.

#define MM_SYSTEM_VIEW_START_IF_HYDRA   MM_SYSTEM_VIEW_START
 

Definition at line 277 of file miia64.h.

#define MM_USER_ADDRESS_RANGE_LIMIT   (0xFFFFFFFFFFFFFFFFUI64)
 

Definition at line 226 of file miia64.h.

#define MM_USER_PAGE_TABLE_PAGES   PTE_PER_PAGE
 

Definition at line 602 of file miia64.h.

#define MM_VA_MAPPED_BY_PDE   ((ULONG_PTR)1 << PDI_SHIFT)
 

Definition at line 372 of file miia64.h.

#define MM_VHPT_PAGES   32
 

Definition at line 535 of file miia64.h.

#define MM_VIRTUAL_PAGE_FILLER   (PAGE_SHIFT - 12)
 

Definition at line 234 of file miia64.h.

#define MM_VIRTUAL_PAGE_SIZE   (64-PAGE_SHIFT)
 

Definition at line 235 of file miia64.h.

#define MM_WORKING_SET_END   (UADDRESS_BASE + 0x3FFFFFFFFFFUI64)
 

Definition at line 450 of file miia64.h.

#define MM_ZERO_KERNEL_PTE   0
 

Definition at line 553 of file miia64.h.

#define MM_ZERO_PTE   0
 

Definition at line 547 of file miia64.h.

#define MmProtopte_Base   (KADDRESS_BASE)
 

Definition at line 299 of file miia64.h.

#define NON_PAGED_SYSTEM_END   (KADDRESS_BASE + 0x16600000000UI64)
 

Definition at line 309 of file miia64.h.

#define NUMBER_OF_MAPPING_PTES   255
 

Definition at line 437 of file miia64.h.

#define PAGE_4K   4096
 

Definition at line 3208 of file miia64.h.

Referenced by MiMapViewOfDataSection(), MiProtectVirtualMemory(), NtAllocateVirtualMemory(), NtFreeVirtualMemory(), NtLockVirtualMemory(), and NtUnlockVirtualMemory().

#define PAGE_4K_ALIGN Va   )     ((PVOID)((ULONG_PTR)(Va) & ~(PAGE_4K - 1)))
 

Definition at line 3211 of file miia64.h.

Referenced by MiProtectVirtualMemory(), NtAllocateVirtualMemory(), NtFreeVirtualMemory(), NtLockVirtualMemory(), NtQueryVirtualMemory(), and NtUnlockVirtualMemory().

#define PAGE_4K_MASK   (PAGE_4K - 1)
 

Definition at line 3210 of file miia64.h.

#define PAGE_4K_SHIFT   12
 

Definition at line 3209 of file miia64.h.

#define PAGE_DIRECTORY1_MASK   (((ULONG_PTR)1 << PDI1_SHIFT) - 1)
 

Definition at line 369 of file miia64.h.

#define PAGE_DIRECTORY2_MASK   (((ULONG_PTR)1 << PDI_SHIFT) -1)
 

Definition at line 370 of file miia64.h.

#define PAGE_NEXT_ALIGN Va   )     ((PVOID)(PAGE_ALIGN((ULONG_PTR)Va + PAGE_SIZE - 1)))
 

Definition at line 3214 of file miia64.h.

Referenced by NtFreeVirtualMemory().

#define PAGE_SHIFT_DIFF   (PAGE_SHIFT - PAGE_4K_SHIFT)
 

Definition at line 3224 of file miia64.h.

#define PDE_PER_PAGE   ((ULONG)(PAGE_SIZE/(1 << PTE_SHIFT)))
 

Definition at line 588 of file miia64.h.

#define PDE_TOP   PDE_UTOP
 

Definition at line 249 of file miia64.h.

#define PHYSICAL_ADDRESS_BITS   44
 

Definition at line 380 of file miia64.h.

#define PTE_PER_PAGE   ((ULONG)(PAGE_SIZE/(1 << PTE_SHIFT)))
 

Definition at line 590 of file miia64.h.

#define PTE_PER_PAGE_BITS   11
 

Definition at line 592 of file miia64.h.

#define ROUND_TO_4K_PAGES Size   )     (((ULONG_PTR)(Size) + PAGE_4K - 1) & ~(PAGE_4K - 1))
 

Definition at line 3212 of file miia64.h.

Referenced by NtAllocateVirtualMemory().

#define SPLITS_PER_PAGE   (PAGE_SIZE / PAGE_4K)
 

Definition at line 3223 of file miia64.h.

#define UNLOCK_ALTERNATE_TABLE PWOW64   )     ExReleaseFastMutex(&(PWOW64)->AlternateTableLock)
 

Definition at line 3501 of file miia64.h.

#define WORKING_SET_LIST   ((PVOID)((ULONG_PTR)ZEROING_PAGE_PTE + PAGE_SIZE))
 

Definition at line 445 of file miia64.h.

#define ZEROING_PAGE_PTE   ((PMMPTE)((ULONG_PTR)IMAGE_MAPPING_PTE + PAGE_SIZE))
 

Definition at line 443 of file miia64.h.


Typedef Documentation

typedef struct _ALT_4KPTE ALT_4KPTE
 

typedef struct _MMCOLOR_TABLES MMCOLOR_TABLES
 

typedef struct _MMPRIMARY_COLOR_TABLES MMPRIMARY_COLOR_TABLES
 

typedef struct _MMPTE MMPTE
 

typedef struct _MMPTE_HARDWARE MMPTE_HARDWARE
 

typedef struct _MMPTE_LARGEPAGE MMPTE_LARGEPAGE
 

typedef struct _MMPTE_LIST MMPTE_LIST
 

typedef struct _MMPTE_PROTOTYPE MMPTE_PROTOTYPE
 

typedef struct _MMPTE_SOFTWARE MMPTE_SOFTWARE
 

typedef struct _MMPTE_SUBSECTION MMPTE_SUBSECTION
 

typedef struct _MMPTE_TRANSITION MMPTE_TRANSITION
 

typedef struct _ALT_4KPTE * PALT_4KPTE
 

typedef struct _MMCOLOR_TABLES * PMMCOLOR_TABLES
 

typedef struct _MMPRIMARY_COLOR_TABLES * PMMPRIMARY_COLOR_TABLES
 

typedef MMPTE* PMMPTE
 

Definition at line 2558 of file miia64.h.

typedef struct _MMPTE_HARDWARE * PMMPTE_HARDWARE
 

typedef struct _MMPTE_LARGEPAGE * PMMPTE_LARGEPAGE
 


Function Documentation

PVOID KiGetPhysicalAddress IN PVOID  VirtualAddress  ) 
 

Definition at line 81 of file mips/buserror.c.

References KSEG0_BASE, KSEG1_BASE, and MmGetPhysicalAddress().

Referenced by KiDataBusError(), and KiInstructionBusError().

00087 : 00088 00089 This function computes the physical address for a given virtual address. 00090 00091 Arguments: 00092 00093 VirtualAddress - Supplies the virtual address whose physical address is 00094 to be computed. 00095 00096 Return Value: 00097 00098 The physical address that correcponds to the specified virtual address. 00099 00100 --*/ 00101 00102 { 00103 PHYSICAL_ADDRESS PhysicalAddress; 00104 00105 // 00106 // If the address is a KSEG0 or KSEG1 address, then mask off the high 00107 // three address bits and return the result as the physical address. 00108 // Otherwise, call memory management to convert the virtual address to 00109 // a physical address. 00110 // 00111 00112 if (((ULONG)VirtualAddress >= KSEG0_BASE) && 00113 ((ULONG)VirtualAddress < (KSEG1_BASE + 0x20000000))) { 00114 PhysicalAddress.LowPart = (ULONG)VirtualAddress & 0x1fffffff; 00115 PhysicalAddress.HighPart = 0; 00116 return PhysicalAddress; 00117 00118 } else { 00119 return MmGetPhysicalAddress(VirtualAddress); 00120 } 00121 }

PVOID MiCreatePebOrTeb IN PEPROCESS  TargetProcess,
IN ULONG  Size
 

Definition at line 4202 of file procsup.c.

References BYTES_TO_PAGES, _MMVAD::EndingVpn, ExAllocatePoolWithTag, EXCEPTION_EXECUTE_HANDLER, ExFreePool(), ExRaiseStatus(), KeDetachProcess(), LOCK_WS_AND_ADDRESS_SPACE, MI_VA_TO_VPN, MI_VPN_TO_VA_ENDING, MiFindEmptyAddressRangeDown, MiInsertVad(), MM_EXECUTE_READWRITE, MM_HIGHEST_VAD_ADDRESS, NonPagedPool, NULL, PAGE_SIZE, ROUND_TO_PAGES, Size, _MMVAD::StartingVpn, _MMVAD::u, _MMVAD::u2, _MMVAD::u3, and UNLOCK_WS_AND_ADDRESS_SPACE.

04209 : 04210 04211 This routine creates a TEB or PEB page within the target process. 04212 04213 Arguments: 04214 04215 TargetProcess - Supplies a pointer to the process in which to create 04216 the structure. 04217 04218 Size - Supplies the size of the structure to create a VAD for. 04219 04220 Return Value: 04221 04222 Returns the address of the base of the newly created TEB or PEB. 04223 04224 Environment: 04225 04226 Kernel mode, attached to the specified process. 04227 04228 --*/ 04229 04230 { 04231 04232 PVOID Base; 04233 PMMVAD Vad; 04234 04235 // 04236 // Get the address creation mutex to block multiple threads from 04237 // creating or deleting address space at the same time and 04238 // get the working set mutex so virtual address descriptors can 04239 // be inserted and walked. 04240 // 04241 04242 LOCK_WS_AND_ADDRESS_SPACE (TargetProcess); 04243 04244 try { 04245 Vad = (PMMVAD)NULL; 04246 04247 // 04248 // Find a VA for a PEB on a page-size boundary. 04249 // 04250 04251 Base = MiFindEmptyAddressRangeDown ( 04252 ROUND_TO_PAGES (Size), 04253 ((PCHAR)MM_HIGHEST_VAD_ADDRESS + 1), 04254 PAGE_SIZE); 04255 04256 // 04257 // An unoccupied address range has been found, build the virtual 04258 // address descriptor to describe this range. 04259 // 04260 04261 Vad = (PMMVAD)ExAllocatePoolWithTag (NonPagedPool, 04262 sizeof(MMVAD), 04263 ' daV'); 04264 if (Vad == (PMMVAD)0) { 04265 ExRaiseStatus (STATUS_NO_MEMORY); 04266 } 04267 04268 Vad->StartingVpn = MI_VA_TO_VPN (Base); 04269 Vad->EndingVpn = MI_VA_TO_VPN ((PCHAR)Base + Size - 1); 04270 04271 Vad->u.LongFlags = 0; 04272 04273 Vad->u.VadFlags.CommitCharge = BYTES_TO_PAGES (Size); 04274 Vad->u.VadFlags.MemCommit = 1; 04275 Vad->u.VadFlags.PrivateMemory = 1; 04276 Vad->u.VadFlags.Protection = MM_EXECUTE_READWRITE; 04277 04278 // 04279 // Mark VAD as not deletable, no protection change. 04280 // 04281 04282 Vad->u.VadFlags.NoChange = 1; 04283 Vad->u2.LongFlags2 = 0; 04284 Vad->u2.VadFlags2.OneSecured = 1; 04285 Vad->u2.VadFlags2.StoredInVad = 1; 04286 Vad->u2.VadFlags2.ReadOnly = 0; 04287 Vad->u3.Secured.StartVpn = (ULONG_PTR)Base; 04288 Vad->u3.Secured.EndVpn = (ULONG_PTR)MI_VPN_TO_VA_ENDING (Vad->EndingVpn); 04289 04290 MiInsertVad (Vad); 04291 04292 } except (EXCEPTION_EXECUTE_HANDLER) { 04293 04294 // 04295 // An exception has occurred. If pool was allocated, deallocate 04296 // it and raise an exception for the caller. 04297 // 04298 04299 if (Vad != (PMMVAD)NULL) { 04300 ExFreePool (Vad); 04301 } 04302 04303 UNLOCK_WS_AND_ADDRESS_SPACE (TargetProcess); 04304 KeDetachProcess(); 04305 ExRaiseStatus (GetExceptionCode ()); 04306 } 04307 04308 UNLOCK_WS_AND_ADDRESS_SPACE (TargetProcess); 04309 04310 return Base; 04311 }

VOID MiDecommitFor4kPage IN PVOID  StartVirtual,
IN PVOID  EndVirtual,
IN PEPROCESS  Process
 

Referenced by NtFreeVirtualMemory().

VOID MiDeleteAlternateTable PEPROCESS  Process  ) 
 

Referenced by MmCleanProcessAddressSpace().

VOID MiDeleteFor4kPage IN PVOID  StartVirtual,
IN PVOID  EndVirtual,
IN PEPROCESS  Process
 

Referenced by MmUnmapViewOfSection().

NTSTATUS MiInitializeAlternateTable PEPROCESS  Process  ) 
 

Referenced by MmInitializeProcessAddressSpace().

VOID MiLockFor4kPage PVOID  CapturedBase,
SIZE_T  CapturedRegionSize,
PEPROCESS  Process
 

Referenced by NtLockVirtualMemory().

ULONG MiMakeProtectForNativePage IN PVOID  VirtualAddress,
IN ULONG  NewProtect,
IN PEPROCESS  Process
 

Referenced by MiProtectVirtualMemory(), and NtAllocateVirtualMemory().

VOID MiMarkSplitPages IN PVOID  StartVirtual,
IN PVOID  EndVirtual,
IN PULONG  Bitmap,
IN BOOLEAN  SetBit
 

VOID MiProtectFor4kPage IN PVOID  Base,
IN SIZE_T  Size,
IN ULONG  NewProtect,
IN ULONG  Flags,
IN PEPROCESS  Process
 

Referenced by MiProtectVirtualMemory(), and NtAllocateVirtualMemory().

VOID MiProtectImageFileFor4kPage IN PVOID  Base,
IN SIZE_T  Size,
IN PMMPTE  PointerPte,
IN PEPROCESS  Process
 

Referenced by MiMapViewOfImageSection().

VOID MiProtectMapFileFor4kPage IN PVOID  Base,
IN SIZE_T  Size,
IN ULONG  NewProtect,
IN PMMPTE  PointerPte,
IN PEPROCESS  Process
 

Referenced by MiMapViewOfDataSection().

ULONG MiQueryProtectionFor4kPage IN PVOID  BaseAddress,
IN PEPROCESS  Process
 

Referenced by MiProtectVirtualMemory().

VOID MiQueryRegionFor4kPage IN PVOID  BaseAddress,
IN PVOID  EndAddress,
IN OUT PSIZE_T  RegionSize,
IN OUT PULONG  RegionState,
IN OUT PULONG  RegionProtect,
IN PEPROCESS  Process
 

Referenced by NtQueryVirtualMemory().

VOID MiReleaseFor4kPage IN PVOID  StartVirtual,
IN PVOID  EndVirtual,
IN PEPROCESS  Process
 

Referenced by NtFreeVirtualMemory().

BOOLEAN MiShouldBeUnlockedFor4kPage PVOID  VirtualAddress,
PEPROCESS  Process
 

Referenced by NtUnlockVirtualMemory().

VOID MiSweepCacheMachineDependent IN PVOID  VirtualAddress,
IN SIZE_T  Size,
IN MEMORY_CACHING_TYPE  CacheType
 

Definition at line 2042 of file mm/ia64/initia64.c.

References COMPUTE_PAGES_SPANNED, KeSweepCacheRangeWithDrain(), MEMORY_CACHING_TYPE, MI_SET_PTE_WRITE_COMBINE, MI_WRITE_VALID_PTE, MiGetPteAddress, MmWriteCombined, PAGE_ALIGN, PAGE_SIZE, Size, and TRUE.

Referenced by MiMapLockedPagesInUserSpace(), MiMapSinglePage(), MiMapViewOfPhysicalSection(), MmAllocateNonCachedMemory(), MmMapIoSpace(), and MmMapLockedPagesSpecifyCache().

02049 : 02050 02051 This function checks and perform appropriate cache flushing operations. 02052 02053 Arguments: 02054 02055 StartVirtual - the start address of the region of pages to be examined. 02056 02057 Size - the size of the region of pages 02058 02059 Cache - the new cache type 02060 02061 Return Value: 02062 02063 None. 02064 02065 --*/ 02066 { 02067 PFN_NUMBER j; 02068 PFN_NUMBER NumberOfPages; 02069 KIRQL OldIrql; 02070 PMMPTE PointerPte; 02071 MMPTE TempPte; 02072 02073 NumberOfPages = COMPUTE_PAGES_SPANNED (VirtualAddress, Size); 02074 VirtualAddress = PAGE_ALIGN(VirtualAddress); 02075 Size = NumberOfPages * PAGE_SIZE; 02076 02077 KeSweepCacheRangeWithDrain(TRUE, VirtualAddress, (ULONG)Size); 02078 02079 if (CacheType == MmWriteCombined) { 02080 PointerPte = MiGetPteAddress(VirtualAddress); 02081 for (j = 0; j < NumberOfPages; j += 1) { 02082 TempPte = *PointerPte; 02083 MI_SET_PTE_WRITE_COMBINE (TempPte); 02084 MI_WRITE_VALID_PTE (PointerPte, TempPte); 02085 PointerPte += 1; 02086 } 02087 } 02088 }

NTSTATUS MiUnlockFor4kPage PVOID  CapturedBase,
SIZE_T  CapturedRegionSize,
PEPROCESS  Process
 

Referenced by NtUnlockVirtualMemory().

MmX86Fault IN BOOLEAN  StoreInstruction,
IN PVOID  VirtualAddress,
IN KPROCESSOR_MODE  PreviousMode,
IN PVOID  TrapInformation
 

Referenced by KiMemoryFault().


Variable Documentation

ULONG MiMaximumSystemCacheSize
 

Definition at line 315 of file miia64.h.

PMMCOLOR_TABLES MmFreePagesByColor[2]
 

Definition at line 2405 of file miia64.h.

ULONG_PTR MmKseg2Frame
 

Definition at line 223 of file miia64.h.

ULONGLONG MmPageSizeInfo
 

Definition at line 224 of file miia64.h.

Referenced by MiMapViewOfPhysicalSection(), and MmMapVideoDisplay().

ULONGLONG MmProtectToAteMask[32]
 

Definition at line 3394 of file miia64.h.

ULONG MmProtectToPteMaskForIA32[32]
 

Definition at line 3392 of file miia64.h.

ULONG MmProtectToPteMaskForSplit[32]
 

Definition at line 3393 of file miia64.h.

ULONG_PTR MmPteGlobal
 

Definition at line 574 of file miia64.h.

Referenced by MiDetermineUserGlobalPteMask(), and MiInitMachineDependent().

ULONG MmSecondaryColorMask
 

Definition at line 422 of file miia64.h.

PFN_NUMBER MmSystemParentTablePage
 

Definition at line 3012 of file miia64.h.

Referenced by MiInitMachineDependent().

ULONG MmTotalPagesForPagingFile
 

Definition at line 2407 of file miia64.h.

MMPTE ValidPpePte
 

Definition at line 3010 of file miia64.h.


Generated on Sat May 15 19:44:42 2004 for test by doxygen 1.3.7