8fbf619e349e6ed01088b67a9613162f321eae19
[mesa.git] / src / mesa / drivers / dri / mga / server / mga_bios.h
1 /* $XConsortium: mga_bios.h /main/2 1996/10/28 04:48:23 kaleb $ */
2 #ifndef MGA_BIOS_H
3 #define MGA_BIOS_H
4
5 /* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/mga_bios.h,v 1.3 1998/07/25 16:55:51 dawes Exp $ */
6
7 /*
8 * MGABiosInfo - This struct describes the video BIOS info block.
9 *
10 * DESCRIPTION
11 * Do not mess with this, unless you know what you are doing.
12 * The data lengths and types are critical.
13 *
14 * HISTORY
15 * October 7, 1996 - [aem] Andrew E. Mileski
16 * This struct was shamelessly stolen from the MGA DDK.
17 * It has been reformatted, and the data types changed.
18 */
19 typedef struct {
20 /* Length of this structure in bytes */
21 __u16 StructLen;
22
23 /*
24 * Unique number identifying the product type
25 * 0 : MGA-S1P20 (2MB base with 175MHz Ramdac)
26 * 1 : MGA-S1P21 (2MB base with 220MHz Ramdac)
27 * 2 : Reserved
28 * 3 : Reserved
29 * 4 : MGA-S1P40 (4MB base with 175MHz Ramdac)
30 * 5 : MGA-S1P41 (4MB base with 220MHz Ramdac)
31 */
32 __u16 ProductID;
33
34 /* Serial number of the board */
35 __u8 SerNo[ 10 ];
36
37 /*
38 * Manufacturing date of the board (at product test)
39 * Format: yyyy yyym mmmd dddd
40 */
41 __u16 ManufDate;
42
43 /* Identification of manufacturing site */
44 __u16 ManufId;
45
46 /*
47 * Number and revision level of the PCB
48 * Format: nnnn nnnn nnnr rrrr
49 * n = PCB number ex:576 (from 0->2047)
50 * r = PCB revision (from 0->31)
51 */
52 __u16 PCBInfo;
53
54 /* Identification of any PMBs */
55 __u16 PMBInfo;
56
57 /*
58 * Bit 0-7 : Ramdac speed (0=175MHz, 1=220MHz)
59 * Bit 8-15 : Ramdac type (0=TVP3026, 1=TVP3027)
60 */
61 __u16 RamdacType;
62
63 /* Maximum PCLK of the ramdac */
64 __u16 PclkMax;
65
66 /* Maximum LDCLK supported by the WRAM memory */
67 __u16 LclkMax;
68
69 /* Maximum MCLK of base board */
70 __u16 ClkBase;
71
72 /* Maximum MCLK of 4Mb board */
73 __u16 Clk4MB;
74
75 /* Maximum MCLK of 8Mb board */
76 __u16 Clk8MB;
77
78 /* Maximum MCLK of board with multimedia module */
79 __u16 ClkMod;
80
81 /* Diagnostic test pass frequency */
82 __u16 TestClk;
83
84 /* Default VGA mode1 pixel frequency */
85 __u16 VGAFreq1;
86
87 /* Default VGA mode2 pixel frequency */
88 __u16 VGAFreq2;
89
90 /* Date of last BIOS programming/update */
91 __u16 ProgramDate;
92
93 /* Number of times BIOS has been programmed */
94 __u16 ProgramCnt;
95
96 /* Support for up to 32 hardware/software options */
97 __u32 Options;
98
99 /* Support for up to 32 hardware/software features */
100 __u32 FeatFlag;
101
102 /* Definition of VGA mode MCLK */
103 __u16 VGAClk;
104
105 /* Indicate the revision level of this header struct */
106 __u16 StructRev;
107
108 __u16 Reserved[ 3 ];
109 } MGABiosInfo;
110
111 /* from the PINS structure, refer pins info from MGA */
112 typedef struct tagParamMGA {
113 __u16 PinID; /* 0 */
114 __u8 StructLen; /* 2 */
115 __u8 Rsvd1; /* 3 */
116 __u16 StructRev; /* 4 */
117 __u16 ProgramDate; /* 6 */
118 __u16 ProgramCnt; /* 8 */
119 __u16 ProductID; /* 10 */
120 __u8 SerNo[16]; /* 12 */
121 __u8 PLInfo[6]; /* 28 */
122 __u16 PCBInfo; /* 34 */
123 __u32 FeatFlag; /* 36 */
124 __u8 RamdacType; /* 40 */
125 __u8 RamdacSpeed; /* 41 */
126 __u8 PclkMax; /* 42 */
127 __u8 ClkGE; /* 43 */
128 __u8 ClkMem; /* 44 */
129 __u8 Clk4MB; /* 45 */
130 __u8 Clk8MB; /* 46 */
131 __u8 ClkMod; /* 47 */
132 __u8 TestClk; /* 48 */
133 __u8 VGAFreq1; /* 49 */
134 __u8 VGAFreq2; /* 50 */
135 __u8 MCTLWTST; /* 51 */
136 __u8 VidCtrl; /* 52 */
137 __u8 Clk12MB; /* 53 */
138 __u8 Clk16MB; /* 54 */
139 __u8 Reserved[8]; /* 55-62 */
140 __u8 PinCheck; /* 63 */
141 } MGABios2Info;
142
143 #endif