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.

268 lines
4.1 KiB

  1. /*++
  2. Copyright (c) 1993 Weitek Corporation
  3. Module Name:
  4. p9gbl.h
  5. Abstract:
  6. This module contains external definitions of the global data used by the
  7. Weitek P9 miniport device driver.
  8. Environment:
  9. Kernel mode
  10. Revision History may be found at the end of this file.
  11. --*/
  12. //
  13. // Number of adapter types that this driver supports.
  14. //
  15. #define NUM_OEM_ADAPTERS 8
  16. //
  17. // DAC data structures for all DACs supported by this driver.
  18. //
  19. extern DAC Bt485;
  20. extern DAC P91Bt485;
  21. extern DAC P91Bt489;
  22. extern DAC Ibm525;
  23. //
  24. // P9 Coprocessor Info structures for all P9 family coprocessors supported
  25. // by this driver.
  26. //
  27. extern P9_COPROC P9000Info;
  28. extern P9_COPROC P9100Info;
  29. //
  30. // DriverAccessRanges are used to verify access to the P9 coprocessor and
  31. // VGA registers.
  32. //
  33. #define NUM_DRIVER_ACCESS_RANGES 2
  34. #define NUM_DAC_ACCESS_RANGES 16
  35. #define NUM_MISC_ACCESS_RANGES 3
  36. extern VIDEO_ACCESS_RANGE DriverAccessRanges[NUM_DRIVER_ACCESS_RANGES +
  37. NUM_DAC_ACCESS_RANGES +
  38. NUM_MISC_ACCESS_RANGES];
  39. //
  40. // P9 mode information Tables.
  41. //
  42. extern P9INITDATA P9Modes[mP9ModeCount];
  43. //
  44. // The structure containing Access Ranges for the DAC registers.
  45. //
  46. extern VIDEO_ACCESS_RANGE DACRegisterAccessRange[];
  47. //
  48. // List of P9 adapters.
  49. //
  50. extern P9ADAPTER OEMAdapter[NUM_OEM_ADAPTERS];
  51. //
  52. // Global data defined in P9GBL.C.
  53. //
  54. extern ULONG ulStrtScan;
  55. extern ULONG ulCurScan;
  56. //
  57. // Global Function Prototypes.
  58. //
  59. //
  60. // Misc. function prototypes defined in P9GBL.C.
  61. //
  62. long mul32(
  63. short op1,
  64. short op2
  65. );
  66. int div32(
  67. long op1,
  68. short op2
  69. );
  70. //
  71. // P9000 specific function prototypes defined in P9000.C.
  72. //
  73. VOID
  74. Init8720(
  75. PHW_DEVICE_EXTENSION HwDeviceExtension
  76. );
  77. VOID
  78. WriteTiming(
  79. PHW_DEVICE_EXTENSION HwDeviceExtension
  80. );
  81. VOID
  82. SysConf(
  83. PHW_DEVICE_EXTENSION HwDeviceExtension
  84. );
  85. VOID
  86. P9000SizeMem(
  87. PHW_DEVICE_EXTENSION HwDeviceExtension
  88. );
  89. //
  90. // P9100 specific function prototypes defined in P91supp.c
  91. //
  92. VOID
  93. P91SizeVideoMemory(
  94. PHW_DEVICE_EXTENSION HwDeviceExtension
  95. );
  96. //
  97. // VGA specific function prototypes defined in VGA.C.
  98. //
  99. VOID
  100. LockVGARegs(
  101. PHW_DEVICE_EXTENSION HwDeviceExtension
  102. );
  103. VOID
  104. UnlockVGARegs(
  105. PHW_DEVICE_EXTENSION HwDeviceExtension
  106. );
  107. //
  108. // Clock generator function prototype.
  109. //
  110. VOID
  111. DevSetClock(
  112. PHW_DEVICE_EXTENSION HwDeviceExtension,
  113. USHORT usFrequency,
  114. BOOLEAN bSetMemclk,
  115. BOOLEAN bUseClockDoubler
  116. );
  117. //
  118. // PCI function prototypes defined in PCI.C.
  119. //
  120. BOOLEAN
  121. PciGetBaseAddr(
  122. PHW_DEVICE_EXTENSION HwDeviceExtension
  123. );
  124. BOOLEAN
  125. PciP9MemEnable(
  126. PHW_DEVICE_EXTENSION HwDeviceExtension
  127. );
  128. VOID
  129. ViperPciP9Enable(
  130. PHW_DEVICE_EXTENSION HwDeviceExtension
  131. );
  132. BOOLEAN
  133. ViperPciP9Disable(
  134. PHW_DEVICE_EXTENSION HwDeviceExtension
  135. );
  136. //
  137. // Weitek P9000 VL specific function prototypes defined in WTKP90VL.C
  138. //
  139. BOOLEAN
  140. VLGetBaseAddr(
  141. PHW_DEVICE_EXTENSION HwDeviceExtension
  142. );
  143. VOID
  144. VLEnableP9(
  145. PHW_DEVICE_EXTENSION HwDeviceExtension
  146. );
  147. BOOLEAN
  148. VLDisableP9(
  149. PHW_DEVICE_EXTENSION HwDeviceExtension
  150. );
  151. VOID
  152. VLSetMode(
  153. PHW_DEVICE_EXTENSION HwDeviceExtension
  154. );
  155. BOOLEAN
  156. VLP90CoprocDetect(
  157. PHW_DEVICE_EXTENSION HwDeviceExtension,
  158. ULONG ulCoprocPhyAddr
  159. );
  160. //
  161. // Diamond Viper specific function prototypes defined in WTKP90VL.C
  162. //
  163. BOOLEAN
  164. ViperGetBaseAddr(
  165. PHW_DEVICE_EXTENSION HwDeviceExtension
  166. );
  167. VOID
  168. ViperSetMode(
  169. PHW_DEVICE_EXTENSION HwDeviceExtension
  170. );
  171. VOID
  172. ViperEnableP9(
  173. PHW_DEVICE_EXTENSION HwDeviceExtension
  174. );
  175. BOOLEAN
  176. ViperDisableP9(
  177. PHW_DEVICE_EXTENSION HwDeviceExtension
  178. );
  179. BOOLEAN
  180. ViperEnableMem(
  181. PHW_DEVICE_EXTENSION HwDeviceExtension
  182. );
  183. //
  184. // Weitek P9100 VL specific function prototypes defined in WTKP91VL.C
  185. //
  186. VOID
  187. VLSetModeP91(
  188. PHW_DEVICE_EXTENSION HwDeviceExtension
  189. );
  190. VOID VLEnableP91(
  191. PHW_DEVICE_EXTENSION HwDeviceExtension
  192. );
  193. BOOLEAN
  194. VLDisableP91(
  195. PHW_DEVICE_EXTENSION HwDeviceExtension
  196. );
  197. BOOLEAN
  198. VLGetBaseAddrP91(
  199. PHW_DEVICE_EXTENSION HwDeviceExtension
  200. );