calculationOfWaterPressureVariance.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. #ifndef _MCF_PGTABLE_H
  2. #define _MCF_PGTABLE_H
  3. #include <asm/mcfmmu.h>
  4. #include <asm/page.h>
  5. /*
  6. * MMUDR bits, in proper place. We write these directly into the MMUDR
  7. * after masking from the pte.
  8. */
  9. #define CF_PAGE_LOCKED MMUDR_LK /* 0x00000002 */
  10. #define CF_PAGE_EXEC MMUDR_X /* 0x00000004 */
  11. #define CF_PAGE_WRITABLE MMUDR_W /* 0x00000008 */
  12. #define CF_PAGE_READABLE MMUDR_R /* 0x00000010 */
  13. #define CF_PAGE_SYSTEM MMUDR_SP /* 0x00000020 */
  14. #define CF_PAGE_COPYBACK MMUDR_CM_CCB /* 0x00000040 */
  15. #define CF_PAGE_NOCACHE MMUDR_CM_NCP /* 0x00000080 */
  16. #define CF_CACHEMASK (~MMUDR_CM_CCB)
  17. #define CF_PAGE_MMUDR_MASK 0x000000fe
  18. #define _PAGE_NOCACHE030 CF_PAGE_NOCACHE
  19. /*
  20. * MMUTR bits, need shifting down.
  21. */
  22. #define CF_PAGE_MMUTR_MASK 0x00000c00
  23. #define CF_PAGE_MMUTR_SHIFT 10
  24. #define CF_PAGE_VALID (MMUTR_V << CF_PAGE_MMUTR_SHIFT)
  25. #define CF_PAGE_SHARED (MMUTR_SG << CF_PAGE_MMUTR_SHIFT)
  26. /*
  27. * Fake bits, not implemented in CF, will get masked out before
  28. * hitting hardware.
  29. */
  30. #define CF_PAGE_DIRTY 0x00000001
  31. #define CF_PAGE_FILE 0x00000200
  32. #define CF_PAGE_ACCESSED 0x00001000
  33. #define _PAGE_CACHE040 0x020 /* 68040 cache mode, cachable, copyback */
  34. #define _PAGE_NOCACHE_S 0x040 /* 68040 no-cache mode, serialized */
  35. #define _PAGE_NOCACHE 0x060 /* 68040 cache mode, non-serialized */
  36. #define _PAGE_CACHE040W 0x000 /* 68040 cache mode, cachable, write-through */
  37. #define _DESCTYPE_MASK 0x003
  38. #define _CACHEMASK040 (~0x060)
  39. #define _PAGE_GLOBAL040 0x400 /* 68040 global bit, used for kva descs */
  40. /*
  41. * Externally used page protection values.
  42. */
  43. #define _PAGE_PRESENT (CF_PAGE_VALID)
  44. #define _PAGE_ACCESSED (CF_PAGE_ACCESSED)
  45. #define _PAGE_DIRTY (CF_PAGE_DIRTY)
  46. #define _PAGE_READWRITE (CF_PAGE_READABLE \
  47. | CF_PAGE_WRITABLE \
  48. | CF_PAGE_SYSTEM \
  49. | CF_PAGE_SHARED)
  50. /*
  51. * Compound page protection values.
  52. */
  53. #define PAGE_NONE __pgprot(CF_PAGE_VALID \
  54. | CF_PAGE_ACCESSED)
  55. #define PAGE_SHARED __pgprot(CF_PAGE_VALID \
  56. | CF_PAGE_ACCESSED \
  57. | CF_PAGE_SHARED)
  58. #define PAGE_INIT __pgprot(CF_PAGE_VALID \
  59. | CF_PAGE_READABLE \
  60. | CF_PAGE_WRITABLE \
  61. | CF_PAGE_EXEC \
  62. | CF_PAGE_SYSTEM)
  63. #define PAGE_KERNEL __pgprot(CF_PAGE_VALID \
  64. | CF_PAGE_ACCESSED \
  65. | CF_PAGE_READABLE \
  66. | CF_PAGE_WRITABLE \
  67. | CF_PAGE_EXEC \
  68. | CF_PAGE_SYSTEM \
  69. | CF_PAGE_SHARED)
  70. #define PAGE_COPY __pgprot(CF_PAGE_VALID \
  71. | CF_PAGE_ACCESSED \
  72. | CF_PAGE_READABLE \
  73. | CF_PAGE_DIRTY)
  74. /*
  75. * Page protections for initialising protection_map. See mm/mmap.c
  76. * for use. In general, the bit positions are xwr, and P-items are
  77. * private, the S-items are shared.
  78. */
  79. #define __P000 PAGE_NONE
  80. #define __P001 __pgprot(CF_PAGE_VALID \
  81. | CF_PAGE_ACCESSED \
  82. | CF_PAGE_READABLE)
  83. #define __P010 __pgprot(CF_PAGE_VALID \
  84. | CF_PAGE_ACCESSED \
  85. | CF_PAGE_WRITABLE)
  86. #define __P011 __pgprot(CF_PAGE_VALID \
  87. | CF_PAGE_ACCESSED \
  88. | CF_PAGE_READABLE \
  89. | CF_PAGE_WRITABLE)
  90. #define __P100 __pgprot(CF_PAGE_VALID \
  91. | CF_PAGE_ACCESSED \
  92. | CF_PAGE_EXEC)
  93. #define __P101 __pgprot(CF_PAGE_VALID \
  94. | CF_PAGE_ACCESSED \
  95. | CF_PAGE_READABLE \
  96. | CF_PAGE_EXEC)
  97. #define __P110 __pgprot(CF_PAGE_VALID \
  98. | CF_PAGE_ACCESSED \
  99. | CF_PAGE_WRITABLE \
  100. | CF_PAGE_EXEC)
  101. #define __P111 __pgprot(CF_PAGE_VALID \
  102. | CF_PAGE_ACCESSED \
  103. | CF_PAGE_READABLE \
  104. | CF_PAGE_WRITABLE \