Leaked source code of windows server 2003
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.

337 lines
7.8 KiB

  1. ;/*
  2. COMMENT !
  3. USE_ASM
  4. -------
  5. 0 use "C" code
  6. 1 use "ASM" code for i386 CPU's
  7. ;*/
  8. #define USE_ASM 1 /* C switch !
  9. USE_ASM = 1 ; Assembly switch */
  10. ;/*
  11. COMMENT !
  12. USB_FIX --------
  13. 0 Disable USB fix
  14. 1 Enable USB fix
  15. ;*/
  16. #define USB_FIX_ENABLED 0 /* C switch !
  17. USB_FIX_ENABLED = 0 ; Assembly switch */
  18. ;/*
  19. COMMENT !
  20. WINBENCH96
  21. --------
  22. 0 Allocate all device bitmap sizes.
  23. 1 Allocate only device bitmaps in the WinBench 96 size range.
  24. ;*/
  25. #define WINBENCH96 0 /* C switch !
  26. WINBENCH96 = 0 ; Assembly switch */
  27. ;/*
  28. COMMENT !
  29. INLINE_ASM
  30. ----------
  31. 0 Don't use i386 inline assembly.
  32. 1 Use i386 inline assembly.
  33. ;*/
  34. #define INLINE_ASM 1 /* C switch !
  35. INLINE_ASM = 1 ; Assembly switch */
  36. ;/*
  37. COMMENT !
  38. SOLID_CACHE
  39. -----------
  40. 0 Don't use solid brush cache in special cases.
  41. 1 Use solid brush cache in special places.
  42. ;*/
  43. #define SOLID_CACHE 1 /* C switch !
  44. SOLID_CACHE = 1 ; Assembly switch */
  45. ;/*
  46. COMMENT !
  47. BUS_MASTER
  48. -----------
  49. 0 Don't use bus mastering to transfer host data.
  50. 1 Use bus mastering to transfer host data.
  51. ;*/
  52. #define BUS_MASTER 0 /* C switch !
  53. BUS_MASTER = 0 ; Assembly switch */
  54. ;/*
  55. COMMENT !
  56. LOG_CALLS
  57. -----------
  58. 0 Normal operation.
  59. 1 Log GDI calls into the driver.
  60. This will disable USE_ASM.
  61. ;*/
  62. #define LOG_CALLS 0 /* C switch !
  63. LOG_CALLS = 0 ; Assembly switch */
  64. ;/*
  65. COMMENT !
  66. HW_CLIPPING
  67. -----------
  68. 0 Don't use hardware clipping.
  69. 1 Use hardware clipping (5465 only).
  70. ;*/
  71. #define HW_CLIPPING 0 /* C switch !
  72. HW_CLIPPING = 0 ; Assembly switch */
  73. ;/* ========================== LOG_WRITES =================================
  74. COMMENT !
  75. LOG_WRITES
  76. -----------
  77. 0 Normal operation.
  78. 1 Log writes to the chip.
  79. This will disable USE_ASM.
  80. ;*/
  81. #define LOG_WRITES 0 /* C switch !
  82. LOG_WRITES = 0 ; Assembly switch */
  83. ;/* ========================== LOG_QFREE =================================
  84. COMMENT !
  85. LOG_QFREE
  86. -----------
  87. 0 Normal operation.
  88. 1 Log QFREE register at selected places.
  89. ;*/
  90. #define LOG_QFREE 0 /* C switch !
  91. LOG_QFREE = 0 ; Assembly switch */
  92. ;/* ========================== ENABLE_LOG_SWITCH =============================
  93. COMMENT !
  94. ENABLE_LOG_SWITCH
  95. ------------------
  96. 0 Continuous logging (when loggin is enabled above)
  97. 1 Turn loggin on and off with pointer.
  98. ;*/
  99. #define ENABLE_LOG_SWITCH 0 /* C switch !
  100. ENABLE_LOG_SWITCH = 0 ; Assembly switch */
  101. ;/* ================== ENABLE_LOG_FILE =================================
  102. COMMENT !
  103. This enables the log file.
  104. ;*/
  105. // C switches
  106. #define ENABLE_LOG_FILE (LOG_CALLS | LOG_WRITES | LOG_QFREE)
  107. /* End of C switches !
  108. ; Assembly switches
  109. ENABLE_LOG_FILE = (LOG_CALLS OR LOG_WRITES OR LOG_QFREE)
  110. ; End of assembly switches */
  111. ;/* =========== INFINITE_OFFSCREEN_MEMORY =================================
  112. COMMENT !
  113. //
  114. // This option causes DrvCreateDeviceBitmap to always succeed.
  115. // It maps all device bitmaps to screen 0,0. Thus we have an "infinite"
  116. // supply of offscreen memory.
  117. //
  118. // It is not necessary to set USE_ASM = 0 for this flag.
  119. //
  120. ;*/
  121. #define INFINITE_OFFSCREEN_MEM 0 /* C switch !
  122. INFINITE_OFFSCREEN_MEM = 0 ; Assembly switch */
  123. ;/* ================== NULL driver flags ================================
  124. COMMENT !
  125. Once NULL driver capabilities are enabled, they are turned on and off
  126. by moving the pointer to (0,0) which toggles do_flag on and off.
  127. See DrvMovePointer().
  128. These allow us to selectively 'short circuit' certain parts of the driver.
  129. 0 Normal operation.
  130. 1 Immediately return TRUE.
  131. It is not necessary to set USE_ASM = 0 for the null driver flags.
  132. ;*/
  133. // C switches
  134. #define NULL_BITBLT 0
  135. #define NULL_COPYBITS 0
  136. #define NULL_LINETO 0
  137. #define NULL_PAINT 0
  138. #define NULL_PATH 0
  139. #define NULL_POINTER 0
  140. #define NULL_STRETCH 0
  141. #define NULL_STROKE 0
  142. #define NULL_STROKEFILL 0
  143. #define NULL_TEXTOUT 0
  144. #define NULL_HW 0
  145. /* End of C switches !
  146. ; Assembly switches
  147. NULL_BITBLT = 0
  148. NULL_COPYBITS = 0
  149. NULL_LINETO = 0
  150. NULL_PAINT = 0
  151. NULL_PATH = 0
  152. NULL_POINTER = 0
  153. NULL_STRETCH = 0
  154. NULL_STROKE = 0
  155. NULL_STROKEFILL = 0
  156. NULL_TEXTOUT = 0
  157. NULL_HW = 0
  158. ; End of assembly switches */
  159. ;/* ================== POINTER_SWITCH ================================
  160. COMMENT !
  161. This enables a global flag, or switch, that we can turn on and off by
  162. moving the HW pointer to screen(0,0)
  163. ;*/
  164. // C switches
  165. #define POINTER_SWITCH_ENABLED \
  166. (NULL_BITBLT | NULL_PAINT | NULL_COPYBITS | NULL_LINETO | \
  167. NULL_TEXTOUT | NULL_PATH | NULL_HW | NULL_STROKE | \
  168. NULL_STROKEFILL | NULL_STRETCH | NULL_POINTER | NULL_HW |\
  169. ENABLE_LOG_SWITCH | INFINITE_OFFSCREEN_MEM)
  170. /* End of C switches !
  171. ; Assembly switches
  172. POINTER_SWITCH_ENABLED = \
  173. (NULL_BITBLT OR NULL_PAINT OR NULL_COPYBITS OR NULL_LINETO OR \
  174. NULL_TEXTOUT OR NULL_PATH OR NULL_HW OR NULL_STROKE OR \
  175. NULL_STROKEFILL OR NULL_STRETCH OR NULL_POINTER OR NULL_HW OR\
  176. ENABLE_LOG_SWITCH OR INFINITE_OFFSCREEN_MEM)
  177. ; End of assembly switches */
  178. ;/* ===================== DISABLE USE_ASM ====================================
  179. COMMENT !
  180. Some of the switches above are incompatible with the assembly language
  181. part of the driver.
  182. ;*/
  183. // C switches
  184. #if (LOG_CALLS || LOG_WRITES)
  185. #define USE_ASM 0
  186. #endif
  187. /* End of C switches !
  188. ; Assembly switches
  189. IF (LOG_CALLS OR LOG_WRITES)
  190. USE_ASM = 0
  191. ENDIF
  192. ; End of assembly switches */
  193. ;/* ===================== CHECK_QFREE ====================================
  194. COMMENT !
  195. Log the value of the QFREE register.
  196. ;*/
  197. // C macro
  198. #if LOG_QFREE
  199. extern unsigned long QfreeData[32];
  200. #define CHECK_QFREE() \
  201. do{ \
  202. register unsigned long temp; /* Because grQFREE is a volatile */ \
  203. temp = LLDR_SZ(grQFREE); /* we must store it in a temp */ \
  204. ++QfreeData[temp]; /* before using it as an index. */ \
  205. } while(0)
  206. #else
  207. #define CHECK_QFREE()
  208. #endif
  209. /* End of C macro !
  210. ; Assembly macro
  211. IF LOG_QFREE
  212. EXTERN QfreeData: DWORD
  213. CHECK_QFREE MACRO base:=<ebp>
  214. push eax ; Save eax and edx
  215. push edx ;
  216. xor eax, eax ; Eax = 0
  217. mov al, BYTE PTR [base + grQFREE] ; Eax = QFREE
  218. mov edx, DWORD PTR QfreeData[eax*4] ; Get histogram entry for QFREE
  219. inc edx ; increment it,
  220. mov DWORD PTR QfreeData[eax*4], edx ; and store it.
  221. pop edx ; Restore edx and eax
  222. pop eax ;
  223. ENDM
  224. ELSE
  225. CHECK_QFREE MACRO base:=<ebp>
  226. ENDM
  227. ENDIF
  228. ; End of assembly macro */