Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

121 lines
2.9 KiB

  1. /*++
  2. Copyright (c) 1990 Microsoft Corporation
  3. Copyright (c) 1992 Digital Equipment Corporation
  4. Module Name:
  5. dataalpha.c
  6. Abstract:
  7. This module contains the private hardware specific global storage for
  8. the memory management subsystem.
  9. Author:
  10. Lou Perazzoli (loup) 27-Mar-1990
  11. Joe Notarangelo 23-April-1992
  12. Revision History:
  13. --*/
  14. #include "mi.h"
  15. //
  16. // A zero Pte.
  17. //
  18. const MMPTE ZeroPte = { 0 };
  19. //
  20. // A kernel zero PTE.
  21. //
  22. const MMPTE ZeroKernelPte = { 0 };
  23. MMPTE ValidKernelPte = { MM_PTE_VALID_MASK |
  24. MM_PTE_WRITE_MASK |
  25. MM_PTE_DIRTY_MASK |
  26. MM_PTE_GLOBAL_MASK };
  27. const MMPTE ValidKernelPteLocal = { MM_PTE_VALID_MASK |
  28. MM_PTE_WRITE_MASK |
  29. MM_PTE_DIRTY_MASK };
  30. const MMPTE ValidUserPte = { MM_PTE_VALID_MASK |
  31. MM_PTE_WRITE_MASK |
  32. MM_PTE_OWNER_MASK |
  33. MM_PTE_DIRTY_MASK };
  34. const MMPTE ValidPtePte = { MM_PTE_VALID_MASK |
  35. MM_PTE_WRITE_MASK |
  36. MM_PTE_DIRTY_MASK };
  37. const MMPTE ValidPdePde = { MM_PTE_VALID_MASK |
  38. MM_PTE_WRITE_MASK |
  39. MM_PTE_DIRTY_MASK };
  40. MMPTE ValidKernelPde = { MM_PTE_VALID_MASK |
  41. MM_PTE_WRITE_MASK |
  42. MM_PTE_DIRTY_MASK |
  43. MM_PTE_GLOBAL_MASK };
  44. const MMPTE ValidKernelPdeLocal = { MM_PTE_VALID_MASK |
  45. MM_PTE_WRITE_MASK |
  46. MM_PTE_DIRTY_MASK };
  47. MMPTE DemandZeroPde = { MM_READWRITE << 3 };
  48. const MMPTE DemandZeroPte = { MM_READWRITE << 3 };
  49. const MMPTE TransitionPde = { MM_PTE_TRANSITION_MASK | (MM_READWRITE << 3) };
  50. MMPTE PrototypePte = { 0xFFFFF000 | (MM_READWRITE << 3) | MM_PTE_PROTOTYPE_MASK };
  51. //
  52. // PTE which generates an access violation when referenced.
  53. //
  54. const MMPTE NoAccessPte = {MM_NOACCESS << 3};
  55. //
  56. // Pool start and end.
  57. //
  58. PVOID MmNonPagedPoolStart;
  59. PVOID MmNonPagedPoolEnd = (PVOID)(MM_NONPAGED_POOL_END);
  60. const PVOID MmPagedPoolStart = (PVOID)(MM_PAGED_POOL_START);
  61. PVOID MmPagedPoolEnd;
  62. //
  63. // PTE reserved for mapping physical data for debugger.
  64. //
  65. PMMPTE MmDebugPte = MiGetPteAddress( 0xfffdf000 );
  66. //
  67. // 16 PTEs reserved for mapping MDLs (128k max).
  68. //
  69. PMMPTE MmCrashDumpPte = (MiGetPteAddress(MM_NONPAGED_POOL_END));
  70. #if MM_MAXIMUM_NUMBER_OF_COLORS > 1
  71. MMPFNLIST MmFreePagesByPrimaryColor[2][MM_MAXIMUM_NUMBER_OF_COLORS];
  72. #endif
  73. PMMCOLOR_TABLES MmFreePagesByColor[2];
  74. MMPFNLIST MmModifiedPageListByColor[MM_MAXIMUM_NUMBER_OF_COLORS] = {
  75. 0, ModifiedPageList, MM_EMPTY_LIST, MM_EMPTY_LIST};
  76. //
  77. // Color tables for modified pages destined for the paging file.
  78. //
  79. ULONG MmTotalPagesForPagingFile;