test: mi386.h File Reference

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

# mi386.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

## Defines

#define | MM_EMPTY_LIST ((ULONG)0xFFFFFFFF)
#define | MM_EMPTY_PTE_LIST ((ULONG)0xFFFFF)
#define | MI_PTE_BASE_FOR_LOWEST_KERNEL_ADDRESS (MiGetPteAddress (0x80000000))
#define | MM_SESSION_SPACE_DEFAULT (0xA0000000)
#define | MM_BOOT_IMAGE_SIZE (16 * 1024 * 1024)
#define | KSTACK_POOL_START (0xA4000000)
#define | KSTACK_POOL_END (0xBFFFFFFF)
#define | KSTACK_POOL_SIZE
#define | MM_VIRTUAL_PAGE_FILLER 0
#define | MM_VIRTUAL_PAGE_SIZE 20
#define | MM_KSEG0_BASE ((ULONG)0x80000000)
#define | MM_KSEG2_BASE ((ULONG)0xA0000000)
#define | MM_PAGES_IN_KSEG0 ((MM_KSEG2_BASE - MM_KSEG0_BASE) >> PAGE_SHIFT)
#define | CODE_START MM_KSEG0_BASE
#define | CODE_END MM_KSEG2_BASE
#define | MM_SYSTEM_SPACE_START (0xC0800000)
#define | MM_SYSTEM_SPACE_END (0xFFFFFFFF)
#define | PTE_TOP 0xC03FFFFF
#define | PDE_TOP 0xC03FFFFF
#define | HYPER_SPACE ((PVOID)0xC0400000)
#define | HYPER_SPACE_END (0xC07fffff)
#define | MM_SYSTEM_VIEW_START (0xA0000000)
#define | MM_SYSTEM_VIEW_SIZE (48*1024*1024)
#define | MM_SYSTEM_VIEW_START_IF_HYDRA (0xA3000000)
#define | MM_SYSTEM_VIEW_SIZE_IF_HYDRA (16*1024*1024)
#define | MM_LOWEST_4MB_START ((32*1024*1024)/PAGE_SIZE)
#define | MM_DEFAULT_4MB_START (((1024*1024)/PAGE_SIZE)*4096)
#define | MM_HIGHEST_4MB_START (((1024*1024)/PAGE_SIZE)*4096)
#define | MM_USER_ADDRESS_RANGE_LIMIT 0xFFFFFFFF
#define | MM_MAXIMUM_ZERO_BITS 21
#define | MM_SYSTEM_CACHE_WORKING_SET (0xC0C00000)
#define | MM_SYSTEM_CACHE_START (0xC1000000)
#define | MM_SYSTEM_CACHE_END (0xE1000000)
#define | MM_SYSTEM_CACHE_START_EXTRA (0xA4000000)
#define | MM_SYSTEM_CACHE_END_EXTRA (0xC0000000)
#define | MM_PAGED_POOL_START ((PVOID)(0xE1000000))
#define | MM_LOWEST_NONPAGED_SYSTEM_START ((PVOID)(0xEB000000))
#define | MmProtopte_Base ((ULONG)0xE1000000)
#define | MM_NONPAGED_POOL_END ((PVOID)(0xFFBE0000))
#define | MM_CRASH_DUMP_VA ((PVOID)(0xFFBE0000))
#define | MM_DEBUG_VA ((PVOID)0xFFBFF000)
#define | NON_PAGED_SYSTEM_END ((ULONG)0xFFFFFFF0)
#define | MM_MINIMUM_SYSTEM_PTES 7000
#define | MM_MAXIMUM_SYSTEM_PTES 50000
#define | MM_DEFAULT_SYSTEM_PTES 11000
#define | MM_MAX_INITIAL_NONPAGED_POOL ((ULONG)(128*1024*1024))
#define | MM_MAX_ADDITIONAL_NONPAGED_POOL ((ULONG)(128*1024*1024))
#define | MM_MAX_PAGED_POOL ((ULONG)MM_NONPAGED_POOL_END - (ULONG)MM_PAGED_POOL_START)
#define | MM_MAX_TOTAL_POOL (((ULONG)MM_NONPAGED_POOL_END) - ((ULONG)(MM_PAGED_POOL_START)))
#define | MM_PROTO_PTE_ALIGNMENT ((ULONG)PAGE_SIZE)
#define | PAGE_DIRECTORY_MASK ((ULONG)0x003FFFFF)
#define | MM_VA_MAPPED_BY_PDE (0x400000)
#define | LOWEST_IO_ADDRESS 0xa0000
#define | PTE_SHIFT 2
#define | PHYSICAL_ADDRESS_BITS 32
#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 ((ULONG)0xC0400000)
#define | NUMBER_OF_MAPPING_PTES 255
#define | LAST_MAPPING_PTE ((ULONG)((ULONG)FIRST_MAPPING_PTE + (NUMBER_OF_MAPPING_PTES * PAGE_SIZE)))
#define | IMAGE_MAPPING_PTE ((PMMPTE)((ULONG)LAST_MAPPING_PTE + PAGE_SIZE))
#define | ZEROING_PAGE_PTE ((PMMPTE)((ULONG)IMAGE_MAPPING_PTE + PAGE_SIZE))
#define | WORKING_SET_LIST ((PVOID)((ULONG)ZEROING_PAGE_PTE + PAGE_SIZE))
#define | MM_MAXIMUM_WORKING_SET MiMaximumWorkingSet
#define | MM_WORKING_SET_END ((ULONG)0xC07FF000)
#define | MM_PTE_VALID_MASK 0x1
#define | MM_PTE_WRITE_MASK 0x800
#define | MM_PTE_OWNER_MASK 0x4
#define | MM_PTE_WRITE_THROUGH_MASK 0x8
#define | MM_PTE_CACHE_DISABLE_MASK 0x10
#define | MM_PTE_ACCESS_MASK 0x20
#define | MM_PTE_DIRTY_MASK 0x42
#define | MM_PTE_LARGE_PAGE_MASK 0x80
#define | MM_PTE_GLOBAL_MASK 0x100
#define | MM_PTE_COPY_ON_WRITE_MASK 0x200
#define | MM_PTE_PROTOTYPE_MASK 0x400
#define | MM_PTE_TRANSITION_MASK 0x800
#define | MM_PTE_NOACCESS 0x0
#define | MM_PTE_READONLY 0x0
#define | MM_PTE_READWRITE MM_PTE_WRITE_MASK
#define | MM_PTE_WRITECOPY 0x200
#define | MM_PTE_EXECUTE 0x0
#define | MM_PTE_EXECUTE_READ 0x0
#define | MM_PTE_EXECUTE_READWRITE MM_PTE_WRITE_MASK
#define | MM_PTE_EXECUTE_WRITECOPY 0x200
#define | MM_PTE_NOCACHE 0x010
#define | MM_PTE_GUARD 0x0
#define | MM_PTE_CACHE 0x0
#define | MM_PROTECT_FIELD_SHIFT 5
#define | MI_MAXIMUM_PTE_WORKING_SET_INDEX 0
#define | MM_ZERO_PTE 0
#define | MM_ZERO_KERNEL_PTE 0
#define | MM_DEMAND_ZERO_WRITE_PTE (MM_READWRITE << MM_PROTECT_FIELD_SHIFT)
#define | MM_KERNEL_DEMAND_ZERO_PTE (MM_READWRITE << MM_PROTECT_FIELD_SHIFT)
#define | MM_KERNEL_NOACCESS_PTE (MM_NOACCESS << MM_PROTECT_FIELD_SHIFT)
#define | MM_STACK_ALIGNMENT 0x0
#define | MM_STACK_OFFSET 0x0
#define | PDE_PER_PAGE ((ULONG)1024)
#define | PTE_PER_PAGE ((ULONG)1024)
#define | MM_USER_PAGE_TABLE_PAGES (768)
#define | MI_MAKE_VALID_PTE(OUTPTE, FRAME, PMASK, PPTE)
#define | MI_MAKE_VALID_PTE_TRANSITION(OUTPTE, PROTECT)
#define | MI_MAKE_TRANSITION_PTE(OUTPTE, PAGE, PROTECT, PPTE)
#define | MI_MAKE_TRANSITION_PTE_VALID(OUTPTE, PPTE)
#define | MI_SET_PTE_IN_WORKING_SET(PTE, WSINDEX)
#define | MI_GET_WORKING_SET_FROM_PTE(PTE) 0
#define | MI_SET_PTE_WRITE_COMBINE(PTE)
#define | MI_SET_PTE_DIRTY(PTE) (PTE).u.Long |= HARDWARE_PTE_DIRTY_MASK
#define | MI_SET_PTE_CLEAN(PTE) (PTE).u.Long &= ~HARDWARE_PTE_DIRTY_MASK
#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)
#define | MI_DISABLE_CACHING(PTE)
#define | MI_IS_CACHING_DISABLED(PPTE) ((PPTE)->u.Hard.CacheDisable == 1)
#define | MI_SET_PFN_DELETED(PPFN)
#define | MI_IS_PFN_DELETED(PPFN) ((PPFN)->PteAddress == (PMMPTE)(ULONG_PTR)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)((*(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) (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) ((PPTE)->u.Hard.Owner = OWNER)
#define | MI_GET_OWNER_IN_PTE(PPTE) ((PPTE)->u.Hard.Owner)
#define | CLEAR_FOR_PROTO_PTE_ADDRESS ((ULONG)0x701)
#define | CLEAR_FOR_PAGE_FILE 0x000003E0
#define | MI_SET_PAGING_FILE_INFO(OUTPTE, PPTE, FILEINFO, OFFSET)
#define | MiPteToProto(lpte)
#define | MiProtoAddressForPte(proto_va)
#define | MiProtoAddressForKernelPte(proto_va) MiProtoAddressForPte(proto_va)
#define | MM_SUBSECTION_MAP (128*1024*1024)
#define | MiGetSubsectionAddress(lpte)
#define | MiGetSubsectionAddressForPte(VA)
#define | MiGetPpeAddress(va) ((PMMPTE)0)
#define | MiGetPdeAddress(va) ((PMMPTE)(((((ULONG)(va)) >> 22) << 2) + PDE_BASE))
#define | MiGetPteAddress(va) ((PMMPTE)(((((ULONG)(va)) >> 12) << 2) + PTE_BASE))
#define | MiGetPpeOffset(va) (0)
#define | MiGetPdeOffset(va) (((ULONG)(va)) >> 22)
#define | MiGetPpePdeOffset MiGetPdeOffset
#define | MiGetPteOffset(va) ((((ULONG)(va)) << 10) >> 22)
#define | MiGetVirtualAddressMappedByPpe(PPE) (NULL)
#define | MiGetVirtualAddressMappedByPde(PDE) ((PVOID)((ULONG)(PDE) << 20))
#define | MiGetVirtualAddressMappedByPte(PTE) ((PVOID)((ULONG)(PTE) << 10))
#define | MiIsVirtualAddressOnPpeBoundary(VA) (FALSE)
#define | MiIsVirtualAddressOnPdeBoundary(VA) (((ULONG_PTR)(VA) & PAGE_DIRECTORY_MASK) == 0)
#define | MiIsPteOnPpeBoundary(PTE) (FALSE)
#define | MiIsPteOnPdeBoundary(PTE) (((ULONG_PTR)(PTE) & (PAGE_SIZE - 1)) == 0)
#define | MiDoesPpeExistAndMakeValid(PPE, TARGETPROCESS, PFNMUTEXHELD, WAITED) (1)
#define | GET_PAGING_FILE_NUMBER(PTE) ((((PTE).u.Long) >> 1) & 0x0000000F)
#define | GET_PAGING_FILE_OFFSET(PTE) ((((PTE).u.Long) >> 12) & 0x000FFFFF)
#define | IS_PTE_NOT_DEMAND_ZERO(PTE) ((PTE).u.Long & (ULONG)0xFFFFFC01)
#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) (((ULONG)Va >= MM_KSEG0_BASE) && ((ULONG)Va < MM_KSEG2_BASE) && (MmKseg2Frame))
#define | MI_CONVERT_PHYSICAL_TO_PFN(Va) (((ULONG)Va << 3) >> 15)
#define | MI_PTE_LOOKUP_NEEDED (0xfffff)
#define | HARDWARE_PTE_DIRTY_MASK 0x42
#define | MI_GET_PAGE_FRAME_FROM_PTE(PTE) ((PTE)->u.Hard.PageFrameNumber)
#define | MI_GET_PAGE_FRAME_FROM_TRANSITION_PTE(PTE) ((PTE)->u.Trans.PageFrameNumber)
#define | MI_GET_PROTECTION_FROM_SOFT_PTE(PTE) ((PTE)->u.Soft.Protection)
#define | MI_GET_PROTECTION_FROM_TRANSITION_PTE(PTE) ((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) RtlFillMemoryUlong ((Destination), (Length), (Pattern))
#define | MI_IS_PAGE_TABLE_ADDRESS(VA) ((PVOID)(VA) >= (PVOID)PTE_BASE && (PVOID)(VA) <= (PVOID)PDE_TOP)
#define | MI_IS_KERNEL_PAGE_TABLE_ADDRESS(VA) ((PVOID)(VA) >= (PVOID)MiGetPteAddress(MmSystemRangeStart) && (PVOID)(VA) <= (PVOID)PDE_TOP)
#define | MI_IS_PAGE_DIRECTORY_ADDRESS(VA) ((PVOID)(VA) >= (PVOID)PDE_BASE && (PVOID)(VA) <= (PVOID)PDE_TOP)
#define | MI_IS_HYPER_SPACE_ADDRESS(VA) ((PVOID)(VA) >= (PVOID)HYPER_SPACE && (PVOID)(VA) <= (PVOID)HYPER_SPACE_END)
#define | MI_IS_PROCESS_SPACE_ADDRESS(VA)
#define | MI_IS_PTE_PROTOTYPE(PTE) ((PTE) > (PMMPTE)PDE_TOP)
#define | MI_IS_SYSTEM_CACHE_ADDRESS(VA)
#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) NOTHING;

## Typedefs

typedef _MMCOLOR_TABLES | MMCOLOR_TABLES
typedef _MMCOLOR_TABLES * | PMMCOLOR_TABLES
typedef _MMPRIMARY_COLOR_TABLES | MMPRIMARY_COLOR_TABLES
typedef _MMPRIMARY_COLOR_TABLES * | PMMPRIMARY_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_HARDWARE * | PMMPTE_HARDWARE
typedef _MMPTE | MMPTE
typedef MMPTE * | PMMPTE

## Functions

ULONG FASTCALL | MiDetermineUserGlobalPteMask (IN PMMPTE Pte)

## Variables

ULONG | MiNumberOfExtraSystemPdes
ULONG | MiMaximumSystemCacheSizeExtra
PVOID | MiSystemCacheStartExtra
PVOID | MiSystemCacheEndExtra
ULONG | MmKseg2Frame
BOOLEAN | MiWriteCombiningPtes
ULONG | MmSecondaryColorMask
ULONG | MiMaximumWorkingSet
PMMCOLOR_TABLES | MmFreePagesByColor [2]
ULONG | MmTotalPagesForPagingFile
MMPTE | MmPteGlobal

## Define Documentation

#define CLEAR_FOR_PAGE_FILE 0x000003E0

| Definition at line 1519 of file mi386.h.

#define CLEAR_FOR_PROTO_PTE_ADDRESS ((ULONG)0x701)

| Definition at line 1513 of file mi386.h.

#define CODE_END MM_KSEG2_BASE

| Definition at line 207 of file mi386.h. Referenced by MmCreateProcessAddressSpace().

#define CODE_START MM_KSEG0_BASE

| Definition at line 205 of file mi386.h. Referenced by MmCreateProcessAddressSpace().

#define FIRST_MAPPING_PTE ((ULONG)0xC0400000)

| Definition at line 377 of file mi386.h.

#define GET_PAGING_FILE_NUMBER | ( | PTE |  | ) | ((((PTE).u.Long) >> 1) & 0x0000000F)

| Definition at line 2134 of file mi386.h.

#define GET_PAGING_FILE_OFFSET | ( | PTE |  | ) | ((((PTE).u.Long) >> 12) & 0x000FFFFF)

| Definition at line 2158 of file mi386.h.

#define HARDWARE_PTE_DIRTY_MASK 0x42

| Definition at line 2553 of file mi386.h.

#define HYPER_SPACE ((PVOID)0xC0400000)

| Definition at line 216 of file mi386.h.

#define HYPER_SPACE_END (0xC07fffff)

| Definition at line 218 of file mi386.h.

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

| Definition at line 383 of file mi386.h.

#define IS_PTE_NOT_DEMAND_ZERO | ( | PTE |  | ) | ((PTE).u.Long & (ULONG)0xFFFFFC01)

| Definition at line 2183 of file mi386.h.

#define KSTACK_POOL_END (0xBFFFFFFF)

| Definition at line 172 of file mi386.h.

#define KSTACK_POOL_SIZE

Value:

    ((KSTACK_POOL_END-KSTACK_POOL_START) \
                                              & ~(PAGE_SIZE-1))

Definition at line 174 of file mi386.h.

Referenced by MiInitMachineDependent().

#define KSTACK_POOL_START (0xA4000000)

| Definition at line 170 of file mi386.h. Referenced by MiGetPageProtection(), MiInitMachineDependent(), and MmCreateProcessAddressSpace().

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

| Definition at line 380 of file mi386.h.

#define LOWEST_IO_ADDRESS 0xa0000

| Definition at line 314 of file mi386.h.

#define MAX_PAGE_FILES 16

| Definition at line 370 of file mi386.h.

#define MI_BARRIER_STAMP_ZEROED_PAGE | ( | PointerTimeStamp |  | ) |

| Definition at line 2943 of file mi386.h.

#define MI_BARRIER_SYNCHRONIZE | ( | TimeStamp |  | ) |

| Definition at line 2916 of file mi386.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 2373 of file mi386.h.

#define MI_CHECK_PAGE_ALIGNMENT | ( | PAGE,
|  | PPTE |  | ) |

| Definition at line 1049 of file mi386.h.

#define MI_CONVERT_PHYSICAL_TO_PFN | ( | Va |  | ) | (((ULONG)Va << 3) >> 15)

| Definition at line 2434 of file mi386.h.

#define MI_DETERMINE_OWNER | ( | PPTE |  | ) |

Value:

    ((((PPTE) <= MiHighestUserPte) ||                                       \
          ((PPTE) >= MiGetPdeAddress(NULL) &&                                   \
          ((PPTE) <= MiHighestUserPde))) ? 1 : 0)

Definition at line 1392 of file mi386.h.

#define MI_DISABLE_CACHING | ( | PTE |  | ) |

Value:

    {                                                                \
                    ((PTE).u.Hard.CacheDisable = 1);                             \
                    ((PTE).u.Hard.WriteThrough = 1);                             \
                }

Definition at line 934 of file mi386.h.

#define MI_ENABLE_CACHING | ( | PTE |  | ) |

Value:

    {                                                                \
                    ((PTE).u.Hard.CacheDisable = 0);                             \
                    ((PTE).u.Hard.WriteThrough = 0);                             \
                }

Definition at line 894 of file mi386.h.

#define MI_FLUSH_ENTIRE_SESSION_TB | ( | Invalid,
|  | AllProcessors |  | ) | NOTHING;

| Definition at line 3016 of file mi386.h.

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

Value:

    PreviousPte.u.Flush = KeFlushSingleTb (Virtual,      \
                                               TRUE,         \
                                               TRUE,         \
                                               PtePointer,   \
                                               PteValue);

Definition at line 2984 of file mi386.h.

#define MI_GET_ACCESSED_IN_PTE | ( | PPTE |  | ) | 0

| Definition at line 1455 of file mi386.h.

#define MI_GET_COLOR_FROM_SECONDARY | ( | SECONDARY_COLOR |  | ) | (0)

| Definition at line 1260 of file mi386.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 1321 of file mi386.h.

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

| Definition at line 1289 of file mi386.h.

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

| Definition at line 1231 of file mi386.h.

#define MI_GET_OWNER_IN_PTE | ( | PPTE |  | ) | ((PPTE)->u.Hard.Owner)

| Definition at line 1505 of file mi386.h.

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

| Definition at line 1101 of file mi386.h.

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

| Definition at line 1153 of file mi386.h.

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

| Definition at line 1128 of file mi386.h.

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

| Definition at line 2557 of file mi386.h.

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

| Definition at line 2558 of file mi386.h.

#define MI_GET_PREVIOUS_COLOR | ( | COLOR |  | ) | (0)

| Definition at line 1254 of file mi386.h.

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

| Definition at line 2559 of file mi386.h.

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

| Definition at line 2560 of file mi386.h.

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

| Definition at line 1257 of file mi386.h.

#define MI_GET_WORKING_SET_FROM_PTE | ( | PTE |  | ) | 0

| Definition at line 685 of file mi386.h.

#define MI_INITIALIZE_HYPERSPACE_MAP | ( | INDEX |  | ) |

| Definition at line 1077 of file mi386.h.

#define MI_IS_CACHING_DISABLED | ( | PPTE |  | ) | ((PPTE)->u.Hard.CacheDisable == 1)

| Definition at line 964 of file mi386.h.

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

| Definition at line 2791 of file mi386.h.

#define MI_IS_KERNEL_PAGE_TABLE_ADDRESS | ( | VA |  | ) | ((PVOID)(VA) >= (PVOID)MiGetPteAddress(MmSystemRangeStart) && (PVOID)(VA) <= (PVOID)PDE_TOP)

| Definition at line 2741 of file mi386.h.

#define MI_IS_PAGE_DIRECTORY_ADDRESS | ( | VA |  | ) | ((PVOID)(VA) >= (PVOID)PDE_BASE && (PVOID)(VA) <= (PVOID)PDE_TOP)

| Definition at line 2766 of file mi386.h.

#define MI_IS_PAGE_TABLE_ADDRESS | ( | VA |  | ) | ((PVOID)(VA) >= (PVOID)PTE_BASE && (PVOID)(VA) <= (PVOID)PDE_TOP)

| Definition at line 2717 of file mi386.h.

#define MI_IS_PFN_DELETED | ( | PPFN |  | ) | ((PPFN)->PteAddress == (PMMPTE)(ULONG_PTR)0xFFFFFFFF)

| Definition at line 1018 of file mi386.h.

#define MI_IS_PHYSICAL_ADDRESS | ( | Va |  | ) | (((ULONG)Va >= MM_KSEG0_BASE) && ((ULONG)Va < MM_KSEG2_BASE) && (MmKseg2Frame))

| Definition at line 2408 of file mi386.h.

#define MI_IS_PROCESS_SPACE_ADDRESS | ( | VA |  | ) |

Value:

    (((PVOID)(VA) <= (PVOID)MM_HIGHEST_USER_ADDRESS) || \
                 ((PVOID)(VA) >= (PVOID)PTE_BASE && (PVOID)(VA) <= (PVOID)HYPER_SPACE_END))

Definition at line 2817 of file mi386.h.

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

| Definition at line 792 of file mi386.h.

#define MI_IS_PTE_PROTOTYPE | ( | PTE |  | ) | ((PTE) > (PMMPTE)PDE_TOP)

| Definition at line 2842 of file mi386.h.

#define MI_IS_SYSTEM_CACHE_ADDRESS | ( | VA |  | ) |

Value:

    (((PVOID)(VA) >= (PVOID)MmSystemCacheStart &&            \
                         (PVOID)(VA) <= (PVOID)MmSystemCacheEnd)  ||          \
              ((PVOID)(VA) >= (PVOID)MiSystemCacheStartExtra &&       \
                              (PVOID)(VA) <= (PVOID)MiSystemCacheEndExtra))

Definition at line 2866 of file mi386.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 2257 of file mi386.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;     \
                    (OUTPTE).u.Trans.Owner = MI_DETERMINE_OWNER(PPTE);

Definition at line 597 of file mi386.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 & 0xFFFFF000) |                     \
                             (MmProtectToPteMask[(PPTE)->u.Trans.Protection]) |   \
                              MiDetermineUserGlobalPteMask ((PMMPTE)PPTE));

Definition at line 628 of file mi386.h.

#define MI_MAKE_VALID_PTE | ( | OUTPTE,
|  | FRAME,
|  | PMASK,
|  | PPTE |  | ) |

Value:

    (OUTPTE).u.Long = ((FRAME << 12) |                                     \
                             (MmProtectToPteMask[PMASK]) |                        \
                              MiDetermineUserGlobalPteMask ((PMMPTE)PPTE));

Definition at line 532 of file mi386.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 561 of file mi386.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;       \
                            (PPTE)->u.Hard.Writable = 0;    \
                        }

Definition at line 1361 of file mi386.h.

#define MI_MAKING_MULTIPLE_PTES_INVALID | ( | SYSTEM_WIDE |  | ) |

| Definition at line 2233 of file mi386.h.

#define MI_MAKING_VALID_PTE_INVALID | ( | SYSTEM_WIDE |  | ) |

| Definition at line 2209 of file mi386.h.

#define MI_MAXIMUM_PTE_WORKING_SET_INDEX 0

| Definition at line 445 of file mi386.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 2336 of file mi386.h.

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

| Definition at line 1180 of file mi386.h.

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

| Definition at line 1206 of file mi386.h.

#define MI_PTE_BASE_FOR_LOWEST_KERNEL_ADDRESS (MiGetPteAddress (0x80000000))

| Definition at line 160 of file mi386.h.

#define MI_PTE_LOOKUP_NEEDED (0xfffff)

| Definition at line 2455 of file mi386.h.

#define MI_SET_ACCESSED_IN_PTE | ( | PPTE,
|  | ACCESSED |  | ) |

| Definition at line 1428 of file mi386.h.

#define MI_SET_GLOBAL_BIT_IF_SYSTEM | ( | OUTPTE,
|  | PPTE |  | ) |

Value:

    if ((((PMMPTE)PPTE) > MiHighestUserPte) &&                                \
           ((((PMMPTE)PPTE) <= MiGetPteAddress (PTE_BASE)) ||                    \
           (((PMMPTE)PPTE) >= MiGetPteAddress (MM_SYSTEM_CACHE_WORKING_SET)))) { \
               (OUTPTE).u.Long |= MmPteGlobal.u.Long;                            \
       }                                                                         \
       else {                                                                    \
               (OUTPTE).u.Long &= ~MmPteGlobal.u.Long;                           \
       }

Definition at line 820 of file mi386.h.

#define MI_SET_GLOBAL_STATE | ( | PTE,
|  | STATE |  | ) |

Value:

    if (STATE) {                                             \
                   (PTE).u.Long |= MmPteGlobal.u.Long;                  \
               }                                                        \
               else {                                                   \
                   (PTE).u.Long &= ~MmPteGlobal.u.Long;                 \
               }

Definition at line 854 of file mi386.h.

#define MI_SET_OWNER_IN_PTE | ( | PPTE,
|  | OWNER |  | ) | ((PPTE)->u.Hard.Owner = OWNER)

| Definition at line 1480 of file mi386.h.

#define MI_SET_PAGE_DIRTY | ( | PPTE,
|  | VA,
|  | PFNHELD |  | ) |

Value:

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

Definition at line 2294 of file mi386.h.

#define MI_SET_PAGING_FILE_INFO | ( | OUTPTE,
|  | PPTE,
|  | FILEINFO,
|  | OFFSET |  | ) |

Value:

    (OUTPTE).u.Long = (PPTE).u.Long;                                 \
           (OUTPTE).u.Long &= CLEAR_FOR_PAGE_FILE;                          \
           (OUTPTE).u.Long |= ((FILEINFO << 1) | (OFFSET << 12));

Definition at line 1552 of file mi386.h.

#define MI_SET_PFN_DELETED | ( | PPFN |  | ) |

Value:

    PERFINFO_DELETE_PAGE(PPFN); \
        PPFN->PteAddress = (PMMPTE)0xFFFFFFFF;

Definition at line 990 of file mi386.h.

#define MI_SET_PTE_CLEAN | ( | PTE |  | ) | (PTE).u.Long &= ~HARDWARE_PTE_DIRTY_MASK

| Definition at line 768 of file mi386.h.

#define MI_SET_PTE_DIRTY | ( | PTE |  | ) | (PTE).u.Long |= HARDWARE_PTE_DIRTY_MASK

| Definition at line 745 of file mi386.h.

#define MI_SET_PTE_IN_WORKING_SET | ( | PTE,
|  | WSINDEX |  | ) |

| Definition at line 661 of file mi386.h.

#define MI_SET_PTE_WRITE_COMBINE | ( | PTE |  | ) |

Value:

    {                                                               \
                    if (MiWriteCombiningPtes == TRUE) {                         \
                        ((PTE).u.Hard.CacheDisable = 0);                        \
                        ((PTE).u.Hard.WriteThrough = 1);                        \
                    } else {                                                    \
                        ((PTE).u.Hard.CacheDisable = 1);                        \
                        ((PTE).u.Hard.WriteThrough = 0);                        \
                    }                                                           \
                }

Definition at line 714 of file mi386.h.

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

| Definition at line 2630 of file mi386.h.

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

| Definition at line 2603 of file mi386.h.

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

| Definition at line 2657 of file mi386.h.

#define MiDoesPpeExistAndMakeValid | ( | PPE,
|  | TARGETPROCESS,
|  | PFNMUTEXHELD,
|  | WAITED |  | ) | (1)

| Definition at line 2111 of file mi386.h.

#define MiFillMemoryPte | ( | Destination,
|  | Length,
|  | Pattern |  | ) | RtlFillMemoryUlong ((Destination), (Length), (Pattern))

| Definition at line 2687 of file mi386.h.

#define MiGetPdeAddress | ( | va |  | ) | ((PMMPTE)(((((ULONG)(va)) >> 22) << 2) + PDE_BASE))

| Definition at line 1788 of file mi386.h.

#define MiGetPdeOffset | ( | va |  | ) | (((ULONG)(va)) >> 22)

| Definition at line 1859 of file mi386.h.

#define MiGetPpeAddress | ( | va |  | ) | ((PMMPTE)0)

| Definition at line 1764 of file mi386.h.

#define MiGetPpeOffset | ( | va |  | ) | (0)

| Definition at line 1836 of file mi386.h.

#define MiGetPpePdeOffset MiGetPdeOffset

| Definition at line 1883 of file mi386.h.

#define MiGetPteAddress | ( | va |  | ) | ((PMMPTE)(((((ULONG)(va)) >> 12) << 2) + PTE_BASE))

| Definition at line 1812 of file mi386.h.

#define MiGetPteOffset | ( | va |  | ) | ((((ULONG)(va)) << 10) >> 22)

| Definition at line 1908 of file mi386.h.

#define MiGetSubsectionAddress | ( | lpte |  | ) |

Value:

    (((lpte)->u.Long & 0x80000000) ?                              \
                ((PSUBSECTION)((ULONG)MmSubsectionBase +    \
                    ((((lpte)->u.Long & 0x7ffff800) >> 4) |              \
                    (((lpte)->u.Long<<2) & 0x78)))) \
          : \
                ((PSUBSECTION)((ULONG)MmNonPagedPoolEnd -    \
                    (((((lpte)->u.Long)>>11)<<7) |              \
                    (((lpte)->u.Long<<2) & 0x78)))))

Definition at line 1690 of file mi386.h.

#define MiGetSubsectionAddressForPte | ( | VA |  | ) |

Value:

    (((ULONG)(VA) < (ULONG)MM_KSEG2_BASE) ?                  \
       (((((ULONG)VA - (ULONG)MmSubsectionBase)>>2) & (ULONG)0x0000001E) |  \
       ((((((ULONG)VA - (ULONG)MmSubsectionBase)<<4) & (ULONG)0x7ffff800)))| \
       0x80000000) \
                : \
       (((((ULONG)MmNonPagedPoolEnd - (ULONG)VA)>>2) & (ULONG)0x0000001E) |  \
       ((((((ULONG)MmNonPagedPoolEnd - (ULONG)VA)<<4) & (ULONG)0x7ffff800)))))

Definition at line 1730 of file mi386.h.

#define MiGetVirtualAddressMappedByPde | ( | PDE |  | ) | ((PVOID)((ULONG)(PDE) << 20))

| Definition at line 1956 of file mi386.h.

#define MiGetVirtualAddressMappedByPpe | ( | PPE |  | ) | (NULL)

| Definition at line 1933 of file mi386.h.

#define MiGetVirtualAddressMappedByPte | ( | PTE |  | ) | ((PVOID)((ULONG)(PTE) << 10))

| Definition at line 1980 of file mi386.h.

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

| Definition at line 2076 of file mi386.h.

#define MiIsPteOnPpeBoundary | ( | PTE |  | ) | (FALSE)

| Definition at line 2052 of file mi386.h.

#define MiIsVirtualAddressOnPdeBoundary | ( | VA |  | ) | (((ULONG_PTR)(VA) & PAGE_DIRECTORY_MASK) == 0)

| Definition at line 2028 of file mi386.h.

#define MiIsVirtualAddressOnPpeBoundary | ( | VA |  | ) | (FALSE)

| Definition at line 2004 of file mi386.h.

#define MiProtoAddressForKernelPte | ( | proto_va |  | ) | MiProtoAddressForPte(proto_va)

| Definition at line 1654 of file mi386.h.

#define MiProtoAddressForPte | ( | proto_va |  | ) |

Value:

    ((((((ULONG)proto_va - MmProtopte_Base) >> 1) & (ULONG)0x000000FE)   | \
        (((((ULONG)proto_va - MmProtopte_Base) << 2) & (ULONG)0xfffff800))) | \
        MM_PTE_PROTOTYPE_MASK)

Definition at line 1617 of file mi386.h.

#define MiPteToProto | ( | lpte |  | ) |

Value:

    ((PMMPTE)(((((lpte)->u.Long) >> 11) << 9) +  \
                    (((((lpte)->u.Long)) << 24) >> 23) \
                    + MmProtopte_Base))

Definition at line 1588 of file mi386.h.

#define MM_BOOT_IMAGE_SIZE (16 * 1024 * 1024)

| Definition at line 164 of file mi386.h. Referenced by MiInitMachineDependent(), MmAddVerifierThunks(), and MmInitSystem().

#define MM_COLOR_ALIGNMENT (0)

| Definition at line 342 of file mi386.h.

#define MM_COLOR_MASK (0)

| Definition at line 336 of file mi386.h.

#define MM_COLOR_MASK_VIRTUAL (0)

| Definition at line 348 of file mi386.h.

#define MM_CRASH_DUMP_VA ((PVOID)(0xFFBE0000))

| Definition at line 261 of file mi386.h. Referenced by MiInitMachineDependent().

#define MM_DEBUG_VA ((PVOID)0xFFBFF000)

| Definition at line 263 of file mi386.h. Referenced by MiInitMachineDependent().

#define MM_DEFAULT_4MB_START (((1024*1024)/PAGE_SIZE)*4096)

| Definition at line 230 of file mi386.h.

#define MM_DEFAULT_SYSTEM_PTES 11000

| Definition at line 277 of file mi386.h.

#define MM_DEMAND_ZERO_WRITE_PTE (MM_READWRITE << MM_PROTECT_FIELD_SHIFT)

| Definition at line 463 of file mi386.h.

#define MM_EMPTY_LIST ((ULONG)0xFFFFFFFF)

| Definition at line 157 of file mi386.h.

#define MM_EMPTY_PTE_LIST ((ULONG)0xFFFFF)

| Definition at line 158 of file mi386.h.

#define MM_HIGHEST_4MB_START (((1024*1024)/PAGE_SIZE)*4096)

| Definition at line 232 of file mi386.h.

#define MM_KERNEL_DEMAND_ZERO_PTE (MM_READWRITE << MM_PROTECT_FIELD_SHIFT)

| Definition at line 470 of file mi386.h.

#define MM_KERNEL_NOACCESS_PTE (MM_NOACCESS << MM_PROTECT_FIELD_SHIFT)

| Definition at line 476 of file mi386.h.

#define MM_KSEG0_BASE ((ULONG)0x80000000)

| Definition at line 197 of file mi386.h.

#define MM_KSEG2_BASE ((ULONG)0xA0000000)

| Definition at line 199 of file mi386.h. Referenced by MiAllocatePoolPages(), and MiInitMachineDependent().

#define MM_LOWEST_4MB_START ((32*1024*1024)/PAGE_SIZE)

| Definition at line 228 of file mi386.h.

#define MM_LOWEST_NONPAGED_SYSTEM_START ((PVOID)(0xEB000000))

| Definition at line 255 of file mi386.h.

#define MM_MAX_ADDITIONAL_NONPAGED_POOL ((ULONG)(128*1024*1024))

| Definition at line 293 of file mi386.h.

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

| Definition at line 287 of file mi386.h.

#define MM_MAX_PAGED_POOL ((ULONG)MM_NONPAGED_POOL_END - (ULONG)MM_PAGED_POOL_START)

| Definition at line 299 of file mi386.h.

#define MM_MAX_TOTAL_POOL (((ULONG)MM_NONPAGED_POOL_END) - ((ULONG)(MM_PAGED_POOL_START)))

| Definition at line 301 of file mi386.h.

#define MM_MAXIMUM_NUMBER_OF_COLORS (1)

| Definition at line 324 of file mi386.h.

#define MM_MAXIMUM_SYSTEM_PTES 50000

| Definition at line 275 of file mi386.h.

#define MM_MAXIMUM_WORKING_SET MiMaximumWorkingSet

| Definition at line 389 of file mi386.h.

#define MM_MAXIMUM_ZERO_BITS 21

| Definition at line 235 of file mi386.h.

#define MM_MINIMUM_SYSTEM_PTES 7000

| Definition at line 273 of file mi386.h.

#define MM_NONPAGED_POOL_END ((PVOID)(0xFFBE0000))

| Definition at line 259 of file mi386.h.

#define MM_NUMBER_OF_COLORS (1)

| Definition at line 330 of file mi386.h.

#define MM_PAGED_POOL_START ((PVOID)(0xE1000000))

| Definition at line 253 of file mi386.h.

#define MM_PAGES_IN_KSEG0 ((MM_KSEG2_BASE - MM_KSEG0_BASE) >> PAGE_SHIFT)

| Definition at line 201 of file mi386.h.

#define MM_PROTECT_FIELD_SHIFT 5

| Definition at line 439 of file mi386.h.

#define MM_PROTO_PTE_ALIGNMENT ((ULONG)PAGE_SIZE)

| Definition at line 308 of file mi386.h.

#define MM_PTE_ACCESS_MASK 0x20

| Definition at line 410 of file mi386.h. Referenced by MiInitMachineDependent().

#define MM_PTE_CACHE 0x0

| Definition at line 437 of file mi386.h.

#define MM_PTE_CACHE_DISABLE_MASK 0x10

| Definition at line 409 of file mi386.h.

#define MM_PTE_COPY_ON_WRITE_MASK 0x200

| Definition at line 418 of file mi386.h.

#define MM_PTE_DIRTY_MASK 0x42

| Definition at line 414 of file mi386.h.

#define MM_PTE_EXECUTE 0x0

| Definition at line 431 of file mi386.h.

#define MM_PTE_EXECUTE_READ 0x0

| Definition at line 432 of file mi386.h.

#define MM_PTE_EXECUTE_READWRITE MM_PTE_WRITE_MASK

| Definition at line 433 of file mi386.h.

#define MM_PTE_EXECUTE_WRITECOPY 0x200

| Definition at line 434 of file mi386.h.

#define MM_PTE_GLOBAL_MASK 0x100

| Definition at line 417 of file mi386.h.

#define MM_PTE_GUARD 0x0

| Definition at line 436 of file mi386.h.

#define MM_PTE_LARGE_PAGE_MASK 0x80

| Definition at line 416 of file mi386.h.

#define MM_PTE_NOACCESS 0x0

| Definition at line 427 of file mi386.h.

#define MM_PTE_NOCACHE 0x010

| Definition at line 435 of file mi386.h.

#define MM_PTE_OWNER_MASK 0x4

| Definition at line 407 of file mi386.h.

#define MM_PTE_PROTOTYPE_MASK 0x400

| Definition at line 419 of file mi386.h.

#define MM_PTE_READONLY 0x0

| Definition at line 428 of file mi386.h.

#define MM_PTE_READWRITE MM_PTE_WRITE_MASK

| Definition at line 429 of file mi386.h.

#define MM_PTE_TRANSITION_MASK 0x800

| Definition at line 420 of file mi386.h.

#define MM_PTE_VALID_MASK 0x1

| Definition at line 401 of file mi386.h.

#define MM_PTE_WRITE_MASK 0x800

| Definition at line 405 of file mi386.h.

#define MM_PTE_WRITE_THROUGH_MASK 0x8

| Definition at line 408 of file mi386.h.

#define MM_PTE_WRITECOPY 0x200

| Definition at line 430 of file mi386.h.

#define MM_SECONDARY_COLORS_DEFAULT (64)

| Definition at line 354 of file mi386.h.

#define MM_SECONDARY_COLORS_MAX (1024)

| Definition at line 358 of file mi386.h.

#define MM_SECONDARY_COLORS_MIN (2)

| Definition at line 356 of file mi386.h.

#define MM_SESSION_SPACE_DEFAULT (0xA0000000)

| Definition at line 162 of file mi386.h.

#define MM_STACK_ALIGNMENT 0x0

| Definition at line 482 of file mi386.h.

#define MM_STACK_OFFSET 0x0

| Definition at line 484 of file mi386.h.

#define MM_SUBSECTION_MAP (128*1024*1024)

| Definition at line 1657 of file mi386.h.

#define MM_SYSTEM_CACHE_END (0xE1000000)

| Definition at line 247 of file mi386.h.

#define MM_SYSTEM_CACHE_END_EXTRA (0xC0000000)

| Definition at line 251 of file mi386.h. Referenced by MiInitMachineDependent().

#define MM_SYSTEM_CACHE_START (0xC1000000)

| Definition at line 245 of file mi386.h.

#define MM_SYSTEM_CACHE_START_EXTRA (0xA4000000)

| Definition at line 249 of file mi386.h. Referenced by MiInitMachineDependent(), and MmInitSystem().

#define MM_SYSTEM_CACHE_WORKING_SET (0xC0C00000)

| Definition at line 243 of file mi386.h.

#define MM_SYSTEM_SPACE_END (0xFFFFFFFF)

| Definition at line 211 of file mi386.h.

#define MM_SYSTEM_SPACE_START (0xC0800000)

| Definition at line 209 of file mi386.h.

#define MM_SYSTEM_VIEW_SIZE (48*1024*1024)

| Definition at line 222 of file mi386.h.

#define MM_SYSTEM_VIEW_SIZE_IF_HYDRA (16*1024*1024)

| Definition at line 226 of file mi386.h.

#define MM_SYSTEM_VIEW_START (0xA0000000)

| Definition at line 220 of file mi386.h.

#define MM_SYSTEM_VIEW_START_IF_HYDRA (0xA3000000)

| Definition at line 224 of file mi386.h.

#define MM_USER_ADDRESS_RANGE_LIMIT 0xFFFFFFFF

| Definition at line 234 of file mi386.h.

#define MM_USER_PAGE_TABLE_PAGES (768)

| Definition at line 498 of file mi386.h.

#define MM_VA_MAPPED_BY_PDE (0x400000)

| Definition at line 312 of file mi386.h.

#define MM_VIRTUAL_PAGE_FILLER 0

| Definition at line 190 of file mi386.h.

#define MM_VIRTUAL_PAGE_SIZE 20

| Definition at line 191 of file mi386.h.

#define MM_WORKING_SET_END ((ULONG)0xC07FF000)

| Definition at line 394 of file mi386.h.

#define MM_ZERO_KERNEL_PTE 0

| Definition at line 457 of file mi386.h.

#define MM_ZERO_PTE 0

| Definition at line 451 of file mi386.h.

#define MmProtopte_Base ((ULONG)0xE1000000)

| Definition at line 257 of file mi386.h.

#define NON_PAGED_SYSTEM_END ((ULONG)0xFFFFFFF0)

| Definition at line 265 of file mi386.h.

#define NUMBER_OF_MAPPING_PTES 255

| Definition at line 379 of file mi386.h.

#define PAGE_DIRECTORY_MASK ((ULONG)0x003FFFFF)

| Definition at line 310 of file mi386.h.

#define PDE_PER_PAGE ((ULONG)1024)

| Definition at line 490 of file mi386.h.

#define PDE_TOP 0xC03FFFFF

| Definition at line 214 of file mi386.h.

#define PHYSICAL_ADDRESS_BITS 32

| Definition at line 322 of file mi386.h.

#define PTE_PER_PAGE ((ULONG)1024)

| Definition at line 492 of file mi386.h.

#define PTE_SHIFT 2

| Definition at line 316 of file mi386.h.

#define PTE_TOP 0xC03FFFFF

| Definition at line 213 of file mi386.h.

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

| Definition at line 387 of file mi386.h.

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

| Definition at line 385 of file mi386.h.

## Typedef Documentation

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_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 _MMCOLOR_TABLES * PMMCOLOR_TABLES

typedef struct _MMPRIMARY_COLOR_TABLES * PMMPRIMARY_COLOR_TABLES

typedef MMPTE* PMMPTE

| Definition at line 2575 of file mi386.h.

typedef struct _MMPTE_HARDWARE * PMMPTE_HARDWARE

## Function Documentation

ULONG FASTCALL MiDetermineUserGlobalPteMask | ( | IN PMMPTE | Pte | ) |

Definition at line 84 of file setmodfy.c.

References FALSE, MI_IS_SESSION_PTE, MiGetPdeAddress, MiGetPteAddress, MiHighestUserPde, MiHighestUserPte, MM_SYSTEM_CACHE_WORKING_SET, MmPteGlobal, NULL, PDE_TOP, and _MMPTE::u.

Referenced by MiInitMachineDependent().

    00090                    :
    00091
    00092     Builds a mask to OR with the PTE frame field.
    00093     This mask has the valid and access bits set and
    00094     has the global and owner bits set based on the
    00095     address of the PTE.
    00096
    00097     *******************  NOTE *********************************************
    00098         THIS ROUTINE DOES NOT CHECK FOR PDEs WHICH NEED TO BE
    00099         SET GLOBAL AS IT ASSUMES PDEs FOR SYSTEM SPACE ARE
    00100         PROPERLY SET AT INITIALIZATION TIME!
    00101
    00102 Arguments:
    00103
    00104     Pte - Supplies a pointer to the PTE in which to fill.
    00105
    00106 Return Value:
    00107
    00108     Mask to OR into the frame to make a valid PTE.
    00109
    00110 Environment:
    00111
    00112     Kernel mode, 386 specific.
    00113
    00114 --*/
    00115
    00116
    00117 {
    00118     MMPTE Mask;
    00119
    00120     Mask.u.Long = 0;
    00121     Mask.u.Hard.Valid = 1;
    00122     Mask.u.Hard.Accessed = 1;
    00123
    00124     if (Pte <= MiHighestUserPte) {
    00125         Mask.u.Hard.Owner = 1;
    00126     } else if ((Pte < MiGetPteAddress (PTE_BASE)) ||
    00127         (Pte >= MiGetPteAddress (MM_SYSTEM_CACHE_WORKING_SET))) {
    00128             if (MI_IS_SESSION_PTE (Pte) == FALSE) {
    00129 #if defined (_X86PAE_)
    00130               if ((Pte < (PMMPTE)PDE_BASE) || (Pte > (PMMPTE)PDE_TOP))
    00131 #endif
    00132                 Mask.u.Long |= MmPteGlobal.u.Long;
    00133             }
    00134     } else if ((Pte >= MiGetPdeAddress (NULL)) && (Pte <= MiHighestUserPde)) {
    00135         Mask.u.Hard.Owner = 1;
    00136     }
    00137
    00138     //
    00139     // Since the valid, accessed, global and owner bits are always in the
    00140     // low dword of the PTE, returning a ULONG is ok.
    00141     //
    00142
    00143     return (ULONG)Mask.u.Long;
    00144 }

## Variable Documentation

ULONG MiMaximumSystemCacheSizeExtra

| Definition at line 179 of file mi386.h. Referenced by MiInitMachineDependent(), and MmInitSystem().

ULONG MiMaximumWorkingSet

| Definition at line 391 of file mi386.h. Referenced by MmInitSystem().

ULONG MiNumberOfExtraSystemPdes

| Definition at line 177 of file mi386.h. Referenced by MiAllocateSpecialPool(), MiGetPageProtection(), MiInitializeSpecialPool(), MiInitMachineDependent(), and MmCreateProcessAddressSpace().

PVOID MiSystemCacheEndExtra

| Definition at line 183 of file mi386.h. Referenced by MiInitializeSystemCache(), MmCreateProcessAddressSpace(), MmInitSystem(), and MmSetKernelDumpRange().

PVOID MiSystemCacheStartExtra

| Definition at line 181 of file mi386.h. Referenced by MiInitializeSystemCache(), MmCreateProcessAddressSpace(), MmInitSystem(), and MmSetKernelDumpRange().

BOOLEAN MiWriteCombiningPtes

| Definition at line 267 of file mi386.h. Referenced by MiMapLockedPagesInUserSpace(), MiMapSinglePage(), MiMapViewOfPhysicalSection(), MmMapIoSpace(), and MmMapLockedPagesSpecifyCache().

PMMCOLOR_TABLES MmFreePagesByColor[2]

| Definition at line 2446 of file mi386.h.

ULONG MmKseg2Frame

| Definition at line 203 of file mi386.h.

MMPTE MmPteGlobal

| Definition at line 2577 of file mi386.h.

ULONG MmSecondaryColorMask

| Definition at line 364 of file mi386.h.

ULONG MmTotalPagesForPagingFile

| Definition at line 2448 of file mi386.h.