00001 /*++ 00002 00003 Copyright (c) 1990 Microsoft Corporation 00004 Copyright (c) 1992 Digital Equipment Corporation 00005 00006 Module Name: 00007 00008 dataalpha.c 00009 00010 Abstract: 00011 00012 This module contains the private hardware specific global storage for 00013 the memory management subsystem. 00014 00015 Author: 00016 00017 Lou Perazzoli (loup) 27-Mar-1990 00018 Joe Notarangelo 23-April-1992 00019 00020 Revision History: 00021 00022 --*/ 00023 00024 #include "mi.h" 00025 00026 // 00027 // A zero Pte. 00028 // 00029 00030 MMPTE ZeroPte = {0}; 00031 00032 // 00033 // A kernel zero PTE. 00034 // 00035 00036 MMPTE ZeroKernelPte = {0}; 00037 00038 MMPTE ValidKernelPte = 00039 {(MM_PTE_VALID_MASK | MM_PTE_WRITE_MASK | MM_PTE_GLOBAL_MASK) ^ MM_PTE_DIRTY_MASK}; 00040 00041 MMPTE ValidKernelPteLocal = {(MM_PTE_VALID_MASK | MM_PTE_WRITE_MASK) ^ MM_PTE_DIRTY_MASK}; 00042 00043 MMPTE ValidUserPte = 00044 {(MM_PTE_VALID_MASK | MM_PTE_WRITE_MASK | MM_PTE_OWNER_MASK) ^ MM_PTE_DIRTY_MASK}; 00045 00046 MMPTE ValidPtePte = {(MM_PTE_VALID_MASK | MM_PTE_WRITE_MASK) ^ MM_PTE_DIRTY_MASK}; 00047 00048 MMPTE ValidPdePde = {(MM_PTE_VALID_MASK | MM_PTE_WRITE_MASK) ^ MM_PTE_DIRTY_MASK}; 00049 00050 MMPTE ValidKernelPde = 00051 {(MM_PTE_VALID_MASK | MM_PTE_WRITE_MASK | MM_PTE_GLOBAL_MASK) ^ MM_PTE_DIRTY_MASK}; 00052 00053 MMPTE ValidKernelPdeLocal = {(MM_PTE_VALID_MASK | MM_PTE_WRITE_MASK) ^ MM_PTE_DIRTY_MASK}; 00054 00055 MMPTE DemandZeroPde = {MM_READWRITE << MM_PROTECT_FIELD_SHIFT}; 00056 00057 MMPTE DemandZeroPte = {MM_READWRITE << MM_PROTECT_FIELD_SHIFT}; 00058 00059 MMPTE TransitionPde = 00060 {MM_PTE_TRANSITION_MASK | (MM_READWRITE << MM_PROTECT_FIELD_SHIFT)}; 00061 00062 MMPTE PrototypePte = {(MI_PTE_LOOKUP_NEEDED << 32) | (MM_READWRITE << MM_PROTECT_FIELD_SHIFT) | MM_PTE_PROTOTYPE_MASK}; 00063 00064 // 00065 // PTE which generates an access violation when referenced. 00066 // 00067 00068 MMPTE NoAccessPte = {MM_NOACCESS << MM_PROTECT_FIELD_SHIFT}; 00069 00070 // 00071 // Pool start and end. 00072 // 00073 00074 PVOID MmNonPagedPoolStart; 00075 00076 PVOID MmNonPagedPoolEnd = (PVOID)(MM_NONPAGED_POOL_END); 00077 00078 PVOID MmPagedPoolStart = (PVOID)(MM_PAGED_POOL_START); 00079 00080 PVOID MmPagedPoolEnd; 00081 00082 // 00083 // PTE reserved for mapping physical data for debugger. 00084 // 00085 00086 PMMPTE MmDebugPte = MiGetPteAddress(0xfffdf000); 00087 00088 // 00089 // 16 PTEs reserved for mapping MDLs (128k max). 00090 // 00091 00092 PMMPTE MmCrashDumpPte = (MiGetPteAddress(MM_NONPAGED_POOL_END)); 00093 00094 #if MM_MAXIMUM_NUMBER_OF_COLORS > 1 00095 MMPFNLIST MmFreePagesByPrimaryColor[2][MM_MAXIMUM_NUMBER_OF_COLORS]; 00096 #endif 00097 00098 PMMCOLOR_TABLES MmFreePagesByColor[2]; 00099 00100 MMPFNLIST MmModifiedPageListByColor[MM_MAXIMUM_NUMBER_OF_COLORS] = { 00101 0, ModifiedPageList, MM_EMPTY_LIST, MM_EMPTY_LIST}; 00102 00103 ULONG MmSecondaryColorMask; 00104 00105 // 00106 // Color tables for modified pages destined for the paging file. 00107 // 00108 00109 ULONG MmTotalPagesForPagingFile;