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.

107 lines
2.5 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 =
  24. {(MM_PTE_VALID_MASK | MM_PTE_WRITE_MASK | MM_PTE_GLOBAL_MASK) ^ MM_PTE_DIRTY_MASK};
  25. const MMPTE ValidKernelPteLocal = {(MM_PTE_VALID_MASK | MM_PTE_WRITE_MASK) ^ MM_PTE_DIRTY_MASK};
  26. const MMPTE ValidUserPte =
  27. {(MM_PTE_VALID_MASK | MM_PTE_WRITE_MASK | MM_PTE_OWNER_MASK) ^ MM_PTE_DIRTY_MASK};
  28. const MMPTE ValidPtePte = {(MM_PTE_VALID_MASK | MM_PTE_WRITE_MASK) ^ MM_PTE_DIRTY_MASK};
  29. const MMPTE ValidPdePde = {(MM_PTE_VALID_MASK | MM_PTE_WRITE_MASK) ^ MM_PTE_DIRTY_MASK};
  30. MMPTE ValidKernelPde =
  31. {(MM_PTE_VALID_MASK | MM_PTE_WRITE_MASK | MM_PTE_GLOBAL_MASK) ^ MM_PTE_DIRTY_MASK};
  32. const MMPTE ValidKernelPdeLocal = {(MM_PTE_VALID_MASK | MM_PTE_WRITE_MASK) ^ MM_PTE_DIRTY_MASK};
  33. MMPTE DemandZeroPde = {MM_READWRITE << MM_PROTECT_FIELD_SHIFT};
  34. const MMPTE DemandZeroPte = {MM_READWRITE << MM_PROTECT_FIELD_SHIFT};
  35. const MMPTE TransitionPde =
  36. {MM_PTE_TRANSITION_MASK | (MM_READWRITE << MM_PROTECT_FIELD_SHIFT)};
  37. MMPTE PrototypePte = {(MI_PTE_LOOKUP_NEEDED << 32) | (MM_READWRITE << MM_PROTECT_FIELD_SHIFT) | MM_PTE_PROTOTYPE_MASK};
  38. //
  39. // PTE which generates an access violation when referenced.
  40. //
  41. const MMPTE NoAccessPte = {MM_NOACCESS << MM_PROTECT_FIELD_SHIFT};
  42. //
  43. // Pool start and end.
  44. //
  45. PVOID MmNonPagedPoolStart;
  46. PVOID MmNonPagedPoolEnd = (PVOID)(MM_NONPAGED_POOL_END);
  47. const PVOID MmPagedPoolStart = (PVOID)(MM_PAGED_POOL_START);
  48. PVOID MmPagedPoolEnd;
  49. //
  50. // PTE reserved for mapping physical data for debugger.
  51. //
  52. PMMPTE MmDebugPte = MiGetPteAddress(0xfffdf000);
  53. //
  54. // 16 PTEs reserved for mapping MDLs (128k max).
  55. //
  56. PMMPTE MmCrashDumpPte = (MiGetPteAddress(MM_NONPAGED_POOL_END));
  57. #if MM_MAXIMUM_NUMBER_OF_COLORS > 1
  58. MMPFNLIST MmFreePagesByPrimaryColor[2][MM_MAXIMUM_NUMBER_OF_COLORS];
  59. #endif
  60. PMMCOLOR_TABLES MmFreePagesByColor[2];
  61. MMPFNLIST MmModifiedPageListByColor[MM_MAXIMUM_NUMBER_OF_COLORS] = {
  62. 0, ModifiedPageList, MM_EMPTY_LIST, MM_EMPTY_LIST};
  63. //
  64. // Color tables for modified pages destined for the paging file.
  65. //
  66. PFN_NUMBER MmTotalPagesForPagingFile;