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.

691 lines
21 KiB

  1. /****************************************************************************
  2. *****************************************************************************
  3. *
  4. * ******************************************
  5. * * Copyright (c) 1995, Cirrus Logic, Inc. *
  6. * * All Rights Reserved *
  7. * ******************************************
  8. *
  9. * PROJECT: Laguna I - Emulator
  10. *
  11. * FILE: lgregs.h
  12. *
  13. * AUTHOR: Austin Watson / Martin Barber.
  14. *
  15. * DESCRIPTION: Register layout for Laguna Access.
  16. *
  17. * MODULES:
  18. *
  19. * REVISION HISTORY:
  20. * 5/10/95 agw - added all V1.5 memory mapped regs.
  21. *
  22. * $Log: X:/log/laguna/nt35/displays/cl546x/LGREGS.H $
  23. *
  24. * Rev 1.16 Dec 10 1997 13:25:02 frido
  25. * Merged from 1.62 branch.
  26. *
  27. * Rev 1.15.1.0 Nov 18 1997 15:17:54 frido
  28. * Always have the 3D registers available for the 5465 chip.
  29. * Added mailbox registers for hardware debugging.
  30. *
  31. * Rev 1.15 Nov 04 1997 11:44:24 frido
  32. * Fixed a typo in grCONTROL2 register.
  33. *
  34. * Rev 1.14 29 Aug 1997 17:08:52 RUSSL
  35. * Added overlay support
  36. *
  37. * Rev 1.13 29 Apr 1997 16:26:32 noelv
  38. * Added SWAT code.
  39. * SWAT:
  40. * SWAT: Rev 1.2 24 Apr 1997 10:10:12 frido
  41. * SWAT: NT140b09 merge.
  42. *
  43. * Rev 1.12 06 Feb 1997 10:34:22 noelv
  44. *
  45. * Added 5465 registers.
  46. *
  47. * Rev 1.11 28 Jan 1997 14:32:38 SueS
  48. * Added CHROMA_CNTL, BLTEXT, and MBLTEXT for the 65.
  49. *
  50. * Rev 1.10 24 Jan 1997 08:29:48 SueS
  51. * Added some more clipping registers for the 5465.
  52. *
  53. * Rev 1.9 23 Jan 1997 17:15:18 bennyn
  54. *
  55. * Modified to support 5465 DD
  56. *
  57. * Rev 1.8 16 Jan 1997 11:40:18 bennyn
  58. *
  59. * Added VS_CLK_CONTROL register
  60. *
  61. * Rev 1.7 01 Nov 1996 09:25:18 BENNYN
  62. *
  63. *
  64. * Rev 1.6 25 Oct 1996 11:54:08 noelv
  65. *
  66. * Added ifdef around new '64 registers
  67. *
  68. * Rev 1.5 24 Oct 1996 14:27:14 noelv
  69. *
  70. * Added some 3d registers.
  71. *
  72. * Rev 1.4 20 Aug 1996 11:05:06 noelv
  73. * Bugfix release from Frido 8-19-96
  74. *
  75. * Rev 1.0 14 Aug 1996 17:16:38 frido
  76. * Initial revision.
  77. *
  78. * Rev 1.3 05 Mar 1996 11:59:54 noelv
  79. * Frido version 19
  80. *
  81. * Rev 1.0 17 Jan 1996 12:53:24 frido
  82. * Checked in from initial workfile by PVCS Version Manager Project Assistant.
  83. *
  84. * Rev 1.1 11 Oct 1995 14:49:20 NOELV
  85. *
  86. * Added BOGUS register at address 5FC.
  87. *
  88. * Rev 1.0 28 Jul 1995 14:03:20 NOELV
  89. * Initial revision.
  90. *
  91. * Rev 1.1 29 Jun 1995 13:23:18 NOELV
  92. *
  93. *
  94. ****************************************************************************
  95. ****************************************************************************/
  96. #ifndef _LGREGS_
  97. #define _LGREGS_
  98. #include "lgtypes.h"
  99. #include "optimize.h"
  100. #if DRIVER_5465 && defined(OVERLAY)
  101. /* 5465 Video Window registers data type */
  102. #define MAX_VIDEO_WINDOWS 8 // space for eight video windows in MMIO regs
  103. typedef struct tagVIDEOWINDOWSTRUCT
  104. {
  105. WORD grVW_HSTRT; // Base of VW + 0x0000
  106. BYTE grPAD1_VW[0x0004-0x0002];
  107. WORD grVW_HEND; // Base of VW + 0x0004
  108. WORD grVW_HSDSZ; // Base of VW + 0x0006
  109. DWORD grVW_HACCUM_STP; // Base of VW + 0x0008
  110. DWORD grVW_HACCUM_SD; // Base of VW + 0x000C
  111. WORD grVW_VSTRT; // Base of VW + 0x0010
  112. WORD grVW_VEND; // Base of VW + 0x0012
  113. DWORD grVW_VACCUM_STP; // Base of VW + 0x0014
  114. DWORD grVW_VACCUM_SDA; // Base of VW + 0x0018
  115. DWORD grVW_VACCUM_SDB; // Base of VW + 0x001C
  116. DWORD grVW_PSD_STRT_ADDR; // Base of VW + 0x0020
  117. DWORD grVW_SSD_STRT_ADDR; // Base of VW + 0x0024
  118. DWORD grVW_PSD_UVSTRT_ADDR; // Base of VW + 0x0028
  119. DWORD grVW_SSD_UVSTRT_ADDR; // Base of VW + 0x002C
  120. BYTE grPAD2_VW[0x0040-0x0030];
  121. WORD grVW_SD_PITCH; // Base of VW + 0x0040
  122. BYTE grPAD3_VW[0x0044-0x0042];
  123. DWORD grVW_CLRKEY_MIN; // Base of VW + 0x0044
  124. DWORD grVW_CLRKEY_MAX; // Base of VW + 0x0048
  125. DWORD grVW_CHRMKEY_MIN; // Base of VW + 0x004C
  126. DWORD grVW_CHRMKEY_MAX; // Base of VW + 0x0050
  127. WORD grVW_BRIGHT_ADJ; // Base of VW + 0x0054
  128. BYTE grPAD4_VW[0x00D4-0x0056];
  129. BYTE grVW_Z_ORDER; // Base of VW + 0x00D4
  130. BYTE grPAD5_VW[0x00D8-0x00D5];
  131. WORD grVW_FIFO_THRSH; // Base of VW + 0x00D8
  132. BYTE grPAD6_VW[0x00E0-0x00DA];
  133. DWORD grVW_CONTROL1; // Base of VW + 0x00E0
  134. DWORD grVW_CONTROL0; // Base of VW + 0x00E4
  135. DWORD grVW_CAP1; // Base of VW + 0x00E8
  136. DWORD grVW_CAP0; // Base of VW + 0x00EC
  137. DWORD grVW_TEST0; // Base of VW + 0x00F0
  138. BYTE grPAD7_VW[0x0100-0x00F4];
  139. } VIDEOWINDOWSTRUCT;
  140. #endif // DRIVER_5465 && OVERLAY
  141. /* Registers to be added. */
  142. /* 5.3 PCI Configuration Registers */
  143. /* 5.4 IO Registers */
  144. /* 5.4.1 General VGA Registers */
  145. /* 5.4.2 VGA Sequencer Registers */
  146. /* 5.4.3 CRT Controller Registers */
  147. /* 5.4.4 VGA Graphics Controller Registers */
  148. /* 5.4.5 Attribute Controller Registers */
  149. /* 5.4.6 Host Control Registers */
  150. /* Laguna Graphics Accelerator Registers data type. */
  151. typedef struct GAR {
  152. /* 5.5 Memory Mapped Registers */
  153. /* 5.5.1 Memory Mapped VGA Regsiters */
  154. BYTE grCR0; /* 0h */
  155. BYTE grPADCR0[3];
  156. BYTE grCR1; /* 04h */
  157. BYTE grPADCR1[3];
  158. BYTE grCR2; /* 08h */
  159. BYTE grPADCR2[3];
  160. BYTE grCR3; /* 0Ch */
  161. BYTE grPADCR3[3];
  162. BYTE grCR4; /* 010h */
  163. BYTE grPADCR4[3];
  164. BYTE grCR5; /* 014h */
  165. BYTE grPADCR5[3];
  166. BYTE grCR6; /* 018h */
  167. BYTE grPADCR[3];
  168. BYTE grCR7; /* 01Ch */
  169. BYTE grPADCR7[3];
  170. BYTE grCR8; /* 020h */
  171. BYTE grPADCR8[3];
  172. BYTE grCR9; /* 024h */
  173. BYTE grPADCR9[3];
  174. BYTE grCRA; /* 028h */
  175. BYTE grPADCRA[3];
  176. BYTE grCRB; /* 02Ch */
  177. BYTE grPADCRB[3];
  178. BYTE grCRC; /* 030h */
  179. BYTE grPADCRC[3];
  180. BYTE grCRD; /* 034h */
  181. BYTE grPADCRD[3];
  182. BYTE grCRE; /* 038h */
  183. BYTE grPADCRE[3];
  184. BYTE grCRF; /* 03Ch */
  185. BYTE grPADCRF[3];
  186. BYTE grCR10; /* 040h */
  187. BYTE grPADCR10[3];
  188. BYTE grCR11; /* 044h */
  189. BYTE grPADCR11[3];
  190. BYTE grCR12; /* 048h */
  191. BYTE grPADCR12[3];
  192. BYTE grCR13; /* 04Ch */
  193. BYTE grPADCR13[3];
  194. BYTE grCR14; /* 050h */
  195. BYTE grPADCR14[3];
  196. BYTE grCR15; /* 054h */
  197. BYTE grPADCR15[3];
  198. BYTE grCR16; /* 058h */
  199. BYTE grPADCR16[3];
  200. BYTE grCR17; /* 05Ch */
  201. BYTE grPADCR17[3];
  202. BYTE grCR18; /* 060h */
  203. BYTE grPADCR18[3];
  204. BYTE grCR19; /* 064h */
  205. BYTE grPADCR19[3];
  206. BYTE grCR1A; /* 068h */
  207. BYTE grPADCR1A[3];
  208. BYTE grCR1B; /* 06Ch */
  209. BYTE grPADCR1B[0x74-0x6D];
  210. BYTE grCR1D; /* 074h */
  211. BYTE grPADCR1D[3];
  212. BYTE grCR1E; /* 078h */
  213. BYTE grPADCR1E[0x80-0x79];
  214. BYTE grMISC; /* 080h */
  215. BYTE grPADMISC[3];
  216. BYTE grSRE; /* 084h */
  217. BYTE grPADSRE[3];
  218. BYTE grSR1E; /* 088h */
  219. BYTE grPADSR1E[3];
  220. BYTE grBCLK_Numerator; /* 08Ch */
  221. BYTE grPADBCLK_Numerator[3];
  222. BYTE grSR18; /* 090h */
  223. BYTE grPADSR18[3];
  224. BYTE grSR19; /* 094h */
  225. BYTE grPADSR19[3];
  226. BYTE grSR1A; /* 098h */
  227. BYTE grPADSR1A[0xA0-0x99];
  228. BYTE grPalette_Mask; /* 0A0h */
  229. BYTE grPADPalette_Mask[3];
  230. BYTE grPalette_Read_Address; /* 0A4h */
  231. BYTE grPADPalette_Read_Address[3];
  232. #define grPalette_State_Read_Only grPalette_Read_Address
  233. BYTE grPalette_Write_Address; /* 0A8h */
  234. BYTE grPADPalette_Write_Address[3];
  235. BYTE grPalette_Data; /* 0ACh */
  236. BYTE grPADPalette_Data[0xB0-0xAD];
  237. /* 5.5.2 Video Pipeline Registers */
  238. BYTE grPalette_State; /* 0B0h */
  239. BYTE grPADPalette_State[0xB4 - 0xB1];
  240. BYTE grExternal_Overlay;/* 0B4h */
  241. BYTE grPADExternal_Overlay[0xB8- 0xB5];
  242. BYTE grColor_Key; /* 0B8h */
  243. BYTE grPADColor_Key[0xBC- 0xB9];
  244. BYTE grColor_Key_Mask; /* 0BCh */
  245. BYTE grPADColor_Key_Mask[0xC0- 0xBD];
  246. WORD grFormat; /* 0C0h */
  247. BYTE grPADFormat[0xCA- 0xC2];
  248. BYTE grStart_BLT_3; /* 0CAh */
  249. BYTE grStop_BLT_3; /* 0CBh */
  250. WORD grX_Start_2; /* 0CCh */
  251. WORD grY_Start_2; /* 0CEh */
  252. WORD grX_End_2; /* 0D0h */
  253. WORD grY_End_2; /* 0D2h */
  254. BYTE grStart_BLT_2; /* 0D4h */
  255. BYTE grStop_BLT_2; /* 0D5h */
  256. BYTE grPADStop_BLT_2[0xDE- 0xD6];
  257. BYTE grStart_BLT_1; /* 0DEh */
  258. BYTE grStop_BLT_1; /* 0DFh */
  259. WORD grCursor_X; /* 0E0h */
  260. WORD grCursor_Y; /* 0E2h */
  261. WORD grCursor_Preset; /* 0E4h */
  262. WORD grCursor_Control; /* 0E6h */
  263. WORD grCursor_Location; /* 0E8h */
  264. WORD grDisplay_Threshold_and_Tiling; /* 0EAh */
  265. BYTE grPADDisplay_Thr[0xF0- 0xEC];
  266. WORD grTest; /* 0F0h */
  267. WORD grTest_HT; /* 0F2h */
  268. WORD grTest_VT; /* 0F4h */
  269. BYTE grPADTest_VT[0x100 - 0x00F6];
  270. /* 5.5.3 VPort Registers */
  271. WORD grX_Start_Odd; /* 100h */
  272. WORD grX_Start_Even; /* 102h */
  273. WORD grY_Start_Odd; /* 104h */
  274. WORD grY_Start_Even; /* 106h */
  275. WORD grVport_Width; /* 108h */
  276. BYTE grVport_Height; /* 10Ah */
  277. BYTE grPADVport_Height;
  278. WORD grVport_Mode; /* 10Ch */
  279. BYTE grVportpad[0x180 - 0x10E];
  280. /* 5.5.4 LPB Registers */
  281. BYTE grLPB_Data[0x1F8-0x180]; /* 180h */
  282. BYTE grPADLPB[0x1FC - 0x1F8];
  283. WORD grLPB_Config; /* 1FCh */
  284. WORD grLPB_Status; /* 1FEh */
  285. #define grLPB_Data_0 grLPB_Data[0]
  286. #define grLPB_Data_1 grLPB_Data[1]
  287. #define grLPB_Data_2 grLPB_Data[2]
  288. #define grLPB_Data_3 grLPB_Data[3]
  289. #define grLPB_Data_4 grLPB_Data[4]
  290. #define grLPB_Data_5 grLPB_Data[5]
  291. #define grLPB_Data_6 grLPB_Data[6]
  292. #define grLPB_Data_7 grLPB_Data[7]
  293. #define grLPB_Data_8 grLPB_Data[8]
  294. #define grLPB_Data_9 grLPB_Data[9]
  295. #define grLPB_Data_10 grLPB_Data[10]
  296. #define grLPB_Data_11 grLPB_Data[11]
  297. #define grLPB_Data_12 grLPB_Data[12]
  298. #define grLPB_Data_13 grLPB_Data[13]
  299. #define grLPB_Data_14 grLPB_Data[14]
  300. #define grLPB_Data_15 grLPB_Data[15]
  301. #define grLPB_Data_16 grLPB_Data[16]
  302. #define grLPB_Data_17 grLPB_Data[17]
  303. #define grLPB_Data_18 grLPB_Data[18]
  304. #define grLPB_Data_19 grLPB_Data[19]
  305. #define grLPB_Data_20 grLPB_Data[20]
  306. #define grLPB_Data_21 grLPB_Data[21]
  307. #define grLPB_Data_22 grLPB_Data[22]
  308. #define grLPB_Data_23 grLPB_Data[23]
  309. #define grLPB_Data_24 grLPB_Data[24]
  310. #define grLPB_Data_25 grLPB_Data[25]
  311. #define grLPB_Data_26 grLPB_Data[26]
  312. #define grLPB_Data_27 grLPB_Data[27]
  313. #define grLPB_Data_28 grLPB_Data[28]
  314. #define grLPB_Data_29 grLPB_Data[29]
  315. #define grLPB_Data_30 grLPB_Data[30]
  316. #define grLPB_Data_31 grLPB_Data[31]
  317. /* 5.5.5 RAMBUS Registers */
  318. /* RAMBUS Registers for BIOS Simulation */
  319. WORD grRIF_CONTROL; /* 200 */
  320. WORD grRAC_CONTROL; /* 202 */
  321. WORD grRAMBUS_TRANS; /* 204 */
  322. BYTE grPADRAMBUS_TRANS[0x240 - 0x206];
  323. REG32 grRAMBUS_DATA; /* 240 */
  324. BYTE grPADRAMBUS_DATA[0x280 - 0x244];
  325. /* 5.5.6 Miscellaneous Registers */
  326. WORD grSerial_BusA; /* 0280h */
  327. WORD grSerial_BusB; /* 0282h */
  328. BYTE grPADMiscellaneous_1[0x2C0 - 0x284];
  329. BYTE grBCLK_Multiplier; /* 0x2C0 */
  330. BYTE grBCLK_Denominator; /* 0x2C1 */
  331. BYTE grPADMiscellaneous_2[0x2C4 - 0x2C2];
  332. WORD grTiling_Control; /* 0x2C4 */
  333. BYTE grPADMiscellaneous_3[0x2C8 - 0x2C6];
  334. WORD grFrame_Buffer_Cache_Control; /* 0x2C8 */
  335. BYTE grPADMiscellaneous_4[0x300 - 0x2CA];
  336. /* 5.5.7 PCI Configuration Registers */
  337. WORD grVendor_ID; /* 0300h */
  338. WORD grDevice_ID; /* 0302h */
  339. WORD grCommand; /* 0304h */
  340. WORD grStatus; /* 0306h */
  341. BYTE grRevision_ID; /* 0308h */
  342. BYTE grClass_Code; /* 0309h */
  343. BYTE grPADClass_Code[0x30E - 0x30A];
  344. BYTE grHeader_Type; /* 030Eh */
  345. BYTE grPADHeader_Type[0x310 - 0x30F];
  346. REG32 grBase_Address_0; /* 0310h */
  347. REG32 grBase_Address_1; /* 0314h */
  348. BYTE grPADBase_Address_1[0x32C - 0x318];
  349. WORD grSubsystem_Vendor_ID; /* 032Ch */
  350. WORD grSubsystem_ID; /* 032Eh */
  351. REG32 grExpansion_ROM_Base; /* 0330h */
  352. BYTE grPADExpansion_ROM_Base[0x33C - 0x334];
  353. BYTE grInterrupt_Line; /* 033Ch */
  354. BYTE grInterrupt_Pin; /* 033Dh */
  355. //#if DRIVER_5465
  356. BYTE grPADInterrupt_Pin[0x3F4 - 0x33E];
  357. DWORD grVS_Clk_Control; /* 03F4h */
  358. //#else
  359. // BYTE grPADInterrupt_Pin[0x3F8 - 0x33E];
  360. //#endif
  361. REG32 grVGA_Shadow; /* 03F8h */
  362. DWORD grVS_Control; /* 03FCh */
  363. /* 5.5.8 Graphics Accelerator Registers */
  364. /* The 2D Engine control registers */
  365. WORD grSTATUS; /* 400 */
  366. WORD grCONTROL; /* 402 */
  367. BYTE grQFREE; /* 404 */
  368. BYTE grOFFSET_2D; /* 405 */
  369. BYTE grTIMEOUT; /* 406 */
  370. BYTE grTILE_CTRL; /* 407 */
  371. REG32 grRESIZE_A_opRDRAM; /* 408 */
  372. REG32 grRESIZE_B_opRDRAM; /* 40C */
  373. REG32 grRESIZE_C_opRDRAM; /* 410 */
  374. WORD grSWIZ_CNTL; /* 414 */
  375. WORD pad99;
  376. WORD grCONTROL2; /* 418 */
  377. BYTE pad2[0x480 - 0x41A];
  378. REG32 grCOMMAND; /* 480 */
  379. BYTE pad3[0x500 - 0x484];
  380. WORD grMIN_Y; /* 500 */
  381. WORD grMAJ_Y; /* 502 */
  382. WORD grACCUM_Y; /* 504 */
  383. BYTE pad3A[0x508 - 0x506];
  384. WORD grMIN_X; /* 508 */
  385. WORD grMAJ_X; /* 50A */
  386. WORD grACCUM_X; /* 50C */
  387. REG16 grLNCNTL; /* 50E */
  388. REG16 grSTRETCH_CNTL; /* 510 */
  389. REG16 grCHROMA_CNTL; /* 512 */
  390. BYTE pad3B[0x518 - 0x514];
  391. REG32 grBLTEXT; /* 518 */
  392. REG32 grMBLTEXT; /* 51C */
  393. REG32 grOP0_opRDRAM; /* 520 */
  394. REG32 grOP0_opMRDRAM; /* 524 */
  395. WORD grOP0_opSRAM; /* 528 */
  396. REG16 grPATOFF; /* 52A */
  397. BYTE pad4[0x540 - 0x52C];
  398. REG32 grOP1_opRDRAM; /* 540 */
  399. REG32 grOP1_opMRDRAM; /* 544 */
  400. WORD grOP1_opSRAM; /* 548 */
  401. WORD grOP1_opMSRAM; /* 54A */
  402. BYTE pad5[0x560 - 0x54C];
  403. REG32 grOP2_opRDRAM; /* 560 */
  404. REG32 grOP2_opMRDRAM; /* 564 */
  405. WORD grOP2_opSRAM; /* 568 */
  406. WORD grOP2_opMSRAM; /* 56A */
  407. BYTE pad6[0x580 - 0x56C];
  408. WORD grSRCX; /* 580 */
  409. REG16 grSHRINKINC; /* 582 */
  410. REG32 grDRAWBLTDEF; /* 584 */
  411. #define grDRAWDEF grDRAWBLTDEF.LH.LO /* 584 */
  412. #define grBLTDEF grDRAWBLTDEF.LH.HI /* 586 */
  413. REG16 grMONOQW; /* 588 */
  414. WORD pad6a; /* 58A */
  415. WORD grPERFORMANCE; /* 58C */
  416. WORD pad7; /* 58E */
  417. REG32 grCLIPULE; /* 590 */
  418. REG32 grCLIPLOR; /* 594 */
  419. REG32 grMCLIPULE; /* 598 */
  420. REG32 grMCLIPLOR; /* 59C */
  421. BYTE pad7a[0x5e0 - 0x5A0];
  422. REG32 grOP_opFGCOLOR; /* 5E0 */
  423. REG32 grOP_opBGCOLOR; /* 5E4 */
  424. REG32 grBITMASK; /* 5E8 */
  425. WORD grPTAG; /* 5EC */
  426. BYTE pad8[0x5FC - 0x5ee];
  427. WORD grBOGUS; /* 5FC */
  428. REG32 grBLTEXT_XEX; /* 600 */
  429. REG32 grBLTEXTFF_XEX; /* 604 */
  430. REG32 grBLTEXTR_XEX; /* 608 */
  431. WORD grBLTEXT_LN_EX; /* 60C */
  432. BYTE pad9[0x620 - 0x60E];
  433. REG32 grMBLTEXT_XEX; /* 620 */
  434. BYTE pad9a[0x628 - 0x624];
  435. REG32 grMBLTEXTR_XEX; /* 628 */
  436. BYTE pad9b[0x700 - 0x62C];
  437. REG32 grBLTEXT_EX; /* 700 */
  438. REG32 grBLTEXTFF_EX; /* 704 */
  439. REG32 grBLTEXTR_EX; /* 708 */
  440. BYTE pad10[0x720 - 0x70c];
  441. REG32 grMBLTEXT_EX; /* 720 */
  442. BYTE pad10a[0x728 - 0x724];
  443. REG32 grMBLTEXTR_EX; /* 728 */
  444. BYTE pad10b[0x760 - 0x72C];
  445. REG32 grCLIPULE_EX; /* 760 */
  446. BYTE pad10c[0x770 - 0x764];
  447. REG32 grCLIPLOR_EX; /* 770 */
  448. BYTE pad10d[0x780 - 0x774];
  449. REG32 grMCLIPULE_EX; /* 780 */
  450. BYTE pad10e[0x790 - 0x784];
  451. REG32 grMCLIPLOR_EX; /* 790 */
  452. BYTE pad10f[0x7fc - 0x794];
  453. WORD RECORD; /* 7fc dummy for emulator */
  454. WORD BREAKPOINT; /* 7fe dummy for harware sim */
  455. DWORD grHOSTDATA[0x800]; /* 800 thru 27ff */
  456. #if DRIVER_5465
  457. BYTE pad23[0x413C - 0x2800];
  458. DWORD grSTATUS0_3D; /* 413C*/
  459. BYTE pad24[0x4200 - 0x4140];
  460. DWORD grHXY_BASE0_ADDRESS_PTR_3D; /* 4200 */
  461. REG32 grHXY_BASE0_START_3D; /* 4204 */
  462. REG32 grHXY_BASE0_EXTENT_3D; /* 4208 */
  463. DWORD pad25; /* 420C */
  464. DWORD grHXY_BASE1_ADDRESS_PTR_3D; /* 4210 */
  465. DWORD grHXY_BASE1_OFFSET0_3D; /* 4214 */
  466. DWORD grHXY_BASE1_OFFSET1_3D; /* 4218 */
  467. DWORD grHXY_BASE1_LENGTH_3D; /* 421C */
  468. DWORD pad27[8]; /* 4220 thru 423C */
  469. DWORD grHXY_HOST_CRTL_3D; /* 4240 */
  470. BYTE pad3x[0x4260 - 0x4244];
  471. DWORD grMAILBOX0_3D; /* 4260 */
  472. DWORD grMAILBOX1_3D; /* 4264 */
  473. DWORD grMAILBOX2_3D; /* 4268 */
  474. DWORD grMAILBOX3_3D; /* 426C */
  475. BYTE pad30[0x4424 - 0x4270];
  476. DWORD grPF_STATUS_3D; /* 4424 */
  477. BYTE pad50[0x8000 - 0x4428];
  478. #if defined(OVERLAY)
  479. /* Video Window Registers (CL_GD5465) */
  480. struct tagVIDEOWINDOWSTRUCT VideoWindow[MAX_VIDEO_WINDOWS];
  481. #endif
  482. #endif
  483. } Graphics_Accelerator_Registers_Type, * pGraphics_Accelerator_Registers_Type, GAR;
  484. /* Status Register values */
  485. #define STATUS_FIFO_NOT_EMPTY 0x0001
  486. #define STATUS_PIPE_BUSY 0x0002
  487. #define STATUS_DATA_AVAIL 0x8000
  488. #define STATUS_IDLE ( STATUS_PIPE_BUSY | STATUS_FIFO_NOT_EMPTY )
  489. /* Control register values */
  490. #define WFIFO_SIZE_32 0x0100
  491. #define HOST_DATA_AUTO 0x0200
  492. #define SWIZ_CNTL 0x0400
  493. /* bits 12:11 define tile size */
  494. #define TILE_SIZE_128 0x0000
  495. #define TILE_SIZE_256 0x0800
  496. #define TILE_SIZE_2048 0x1800
  497. /* bits 14:13 define bits per pixel for graphics modes */
  498. #define CNTL_8_BPP 0x0000
  499. #define CNTL_16_BPP 0x2000
  500. #define CNTL_24_BPP 0x4000
  501. #define CNTL_32_BPP 0x6000
  502. /* Tile_ctrl register */
  503. /* bits 7:6 interleave memory */
  504. #define ILM_1_WAY 0x00
  505. #define ILM_2_WAY 0x40
  506. #define ILM_4_WAY 0x80
  507. /* bits 5:0 define BYTE pitch of display memory in conjunction with TILE_SIZE */
  508. /* from Control register */
  509. /*
  510. * DRAWDEF contents
  511. */
  512. #define DD_ROP 0x0000
  513. #define DD_TRANS 0x0100 /* transparent */
  514. #define DD_TRANSOP 0x0200
  515. #define DD_PTAG 0x0400
  516. #define DD_CLIPEN 0x0800
  517. /* These bits moved to LNCNTL */
  518. /* #define DD_INTERP 0x0800 */
  519. /* #define DD_XSHRINK 0x1000 */
  520. /* #define DD_YSHRINK 0x2000 */
  521. #define DD_SAT_2 0x4000
  522. #define DD_SAT_1 0x8000
  523. /* LN_CNTL fields */
  524. #define LN_XINTP_EN 0x0001
  525. #define LN_YINTP_EN 0x0002
  526. #define LN_XSHRINK 0x0004
  527. #define LN_YSHRINK 0x0008
  528. /* These are the autoblt control bits */
  529. #define LN_RESIZE 0x0100
  530. #define LN_CHAIN_EN 0x0200
  531. /* These are the yuv411 output average control bits */
  532. #define LN_LOWPASS 0x1000
  533. #define LN_UVHOLD 0x2000
  534. /* This extracts the data format field from LNCNTL */
  535. #define LN_FORMAT 0x00F0
  536. #define LN_YUV_SHIFT 4
  537. #define LN_8BIT 0x0000
  538. #define LN_RGB555 0x0001
  539. #define LN_RGB565 0x0002
  540. #define LN_YUV422 0x0003
  541. #define LN_24ARGB 0x0004
  542. #define LN_24PACK 0x0005
  543. #define LN_YUV411 0x0006
  544. /* 7 - 15 are reserved */
  545. /*
  546. * pmBLTDEF contents
  547. */
  548. #define BD_OP2 0x0001 /* start of OP2 field 3:0 */
  549. #define BD_OP1 0x0010 /* start of OP1 field 7:4 */
  550. #define BD_OP0 0x0100 /* start of OP0 field 8:8 */
  551. #define BD_TRACK_X 0x0200 /* Track OP ptrs in X 9:9 (when implemented) */
  552. #define BD_TRACK_Y 0x0400 /* Track OP ptrs in Y 10:10 (when implemented) */
  553. #define BD_SAME 0x0800 /* common operand field 11:11 */
  554. #define BD_RES 0x1000 /* start of RES field 14:12 */
  555. #define BD_YDIR 0x8000 /* y direction bit 15: */
  556. /*
  557. * Field values for BD_OP? and BD_res.
  558. * LL( grBLTDEF, (BD_OP1 * IS_HOST_MONO) +
  559. * (BD_OP2 * (IS_VRAM + IS_PATTERN )) +
  560. * (BD_RES * IS_VRAM) );
  561. */
  562. #define IS_SRAM 0x0000
  563. #define IS_VRAM 0x0001
  564. #define IS_HOST 0x0002
  565. #define IS_SOLID 0x0007
  566. #define IS_SRAM_MONO 0x0004
  567. #define IS_VRAM_MONO 0x0005
  568. #define IS_HOST_MONO 0x0006
  569. #define IS_PATTERN 0x0008
  570. #define IS_MONO 0x0004
  571. /* these are for BD_RES only */
  572. #define IS_SRAM0 0x0004
  573. #define IS_SRAM1 0x0005
  574. #define IS_SRAM2 0x0006
  575. #define IS_SRAM12 0x0007
  576. /* these are for BD_SAME */
  577. #define NONE 0x0000
  578. // Be sure to synchronize this structure with the one in i386\Laguna.inc!
  579. typedef struct _autoblt_regs {
  580. REG16 LNCNTL;
  581. REG16 SHRINKINC;
  582. REG32 DRAWBLTDEF;
  583. REG32 FGCOLOR;
  584. REG32 BGCOLOR;
  585. REG32 OP0_opRDRAM;
  586. WORD MAJ_Y;
  587. WORD MIN_Y;
  588. REG32 OP1_opRDRAM;
  589. WORD ACCUM_Y;
  590. REG16 PATOFF;
  591. REG32 OP2_opRDRAM;
  592. WORD MAJ_X;
  593. WORD MIN_X;
  594. REG32 BLTEXT;
  595. WORD ACCUM_X;
  596. WORD OP0_opSRAM;
  597. WORD SRCX;
  598. WORD OP2_opSRAM;
  599. REG32 BLTEXTR_EX;
  600. REG32 MBLTEXTR_EX;
  601. REG32 OP0_opMRDRAM;
  602. REG32 OP1_opMRDRAM;
  603. REG16 STRETCH_CNTL;
  604. REG16 RESERVED; // Needs this to make it into DWORD boundary
  605. REG32 CLIPULE;
  606. REG32 CLIPLOR;
  607. REG32 NEXT_HEAD; /* XY address of next in chain if LNCTL chain set */
  608. } autoblt_regs, *autoblt_ptr;
  609. #endif /* _LGREGS_ */
  610.