Rev 5078 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1117 | serge | 1 | /* |
3031 | serge | 2 | * Copyright 2006-2007 Advanced Micro Devices, Inc. |
1117 | serge | 3 | * |
4 | * Permission is hereby granted, free of charge, to any person obtaining a |
||
5 | * copy of this software and associated documentation files (the "Software"), |
||
6 | * to deal in the Software without restriction, including without limitation |
||
7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, |
||
8 | * and/or sell copies of the Software, and to permit persons to whom the |
||
9 | * Software is furnished to do so, subject to the following conditions: |
||
10 | * |
||
11 | * The above copyright notice and this permission notice shall be included in |
||
12 | * all copies or substantial portions of the Software. |
||
13 | * |
||
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
||
17 | * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR |
||
18 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, |
||
19 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
||
20 | * OTHER DEALINGS IN THE SOFTWARE. |
||
21 | */ |
||
22 | |||
1430 | serge | 23 | |
3031 | serge | 24 | /****************************************************************************/ |
1117 | serge | 25 | /*Portion I: Definitions shared between VBIOS and Driver */ |
26 | /****************************************************************************/ |
||
27 | |||
1430 | serge | 28 | |
1117 | serge | 29 | #ifndef _ATOMBIOS_H |
30 | #define _ATOMBIOS_H |
||
31 | |||
32 | #define ATOM_VERSION_MAJOR 0x00020000 |
||
33 | #define ATOM_VERSION_MINOR 0x00000002 |
||
34 | |||
35 | #define ATOM_HEADER_VERSION (ATOM_VERSION_MAJOR | ATOM_VERSION_MINOR) |
||
36 | |||
37 | /* Endianness should be specified before inclusion, |
||
38 | * default to little endian |
||
39 | */ |
||
40 | #ifndef ATOM_BIG_ENDIAN |
||
41 | #error Endian not specified |
||
42 | #endif |
||
43 | |||
44 | #ifdef _H2INC |
||
1430 | serge | 45 | #ifndef ULONG |
46 | typedef unsigned long ULONG; |
||
47 | #endif |
||
1117 | serge | 48 | |
1430 | serge | 49 | #ifndef UCHAR |
50 | typedef unsigned char UCHAR; |
||
51 | #endif |
||
1117 | serge | 52 | |
1430 | serge | 53 | #ifndef USHORT |
54 | typedef unsigned short USHORT; |
||
55 | #endif |
||
1117 | serge | 56 | #endif |
6104 | serge | 57 | |
58 | #define ATOM_DAC_A 0 |
||
1117 | serge | 59 | #define ATOM_DAC_B 1 |
60 | #define ATOM_EXT_DAC 2 |
||
61 | |||
62 | #define ATOM_CRTC1 0 |
||
63 | #define ATOM_CRTC2 1 |
||
1430 | serge | 64 | #define ATOM_CRTC3 2 |
65 | #define ATOM_CRTC4 3 |
||
66 | #define ATOM_CRTC5 4 |
||
67 | #define ATOM_CRTC6 5 |
||
68 | #define ATOM_CRTC_INVALID 0xFF |
||
1117 | serge | 69 | |
70 | #define ATOM_DIGA 0 |
||
71 | #define ATOM_DIGB 1 |
||
72 | |||
73 | #define ATOM_PPLL1 0 |
||
74 | #define ATOM_PPLL2 1 |
||
1430 | serge | 75 | #define ATOM_DCPLL 2 |
1963 | serge | 76 | #define ATOM_PPLL0 2 |
5078 | serge | 77 | #define ATOM_PPLL3 3 |
78 | |||
1963 | serge | 79 | #define ATOM_EXT_PLL1 8 |
80 | #define ATOM_EXT_PLL2 9 |
||
81 | #define ATOM_EXT_CLOCK 10 |
||
1430 | serge | 82 | #define ATOM_PPLL_INVALID 0xFF |
1117 | serge | 83 | |
1963 | serge | 84 | #define ENCODER_REFCLK_SRC_P1PLL 0 |
85 | #define ENCODER_REFCLK_SRC_P2PLL 1 |
||
86 | #define ENCODER_REFCLK_SRC_DCPLL 2 |
||
87 | #define ENCODER_REFCLK_SRC_EXTCLK 3 |
||
88 | #define ENCODER_REFCLK_SRC_INVALID 0xFF |
||
89 | |||
1117 | serge | 90 | #define ATOM_SCALER1 0 |
91 | #define ATOM_SCALER2 1 |
||
92 | |||
6104 | serge | 93 | #define ATOM_SCALER_DISABLE 0 |
94 | #define ATOM_SCALER_CENTER 1 |
||
95 | #define ATOM_SCALER_EXPANSION 2 |
||
96 | #define ATOM_SCALER_MULTI_EX 3 |
||
1117 | serge | 97 | |
98 | #define ATOM_DISABLE 0 |
||
99 | #define ATOM_ENABLE 1 |
||
100 | #define ATOM_LCD_BLOFF (ATOM_DISABLE+2) |
||
101 | #define ATOM_LCD_BLON (ATOM_ENABLE+2) |
||
102 | #define ATOM_LCD_BL_BRIGHTNESS_CONTROL (ATOM_ENABLE+3) |
||
103 | #define ATOM_LCD_SELFTEST_START (ATOM_DISABLE+5) |
||
104 | #define ATOM_LCD_SELFTEST_STOP (ATOM_ENABLE+5) |
||
105 | #define ATOM_ENCODER_INIT (ATOM_DISABLE+7) |
||
2997 | Serge | 106 | #define ATOM_INIT (ATOM_DISABLE+7) |
1430 | serge | 107 | #define ATOM_GET_STATUS (ATOM_DISABLE+8) |
1117 | serge | 108 | |
109 | #define ATOM_BLANKING 1 |
||
110 | #define ATOM_BLANKING_OFF 0 |
||
111 | |||
112 | #define ATOM_CURSOR1 0 |
||
113 | #define ATOM_CURSOR2 1 |
||
114 | |||
115 | #define ATOM_ICON1 0 |
||
116 | #define ATOM_ICON2 1 |
||
117 | |||
118 | #define ATOM_CRT1 0 |
||
119 | #define ATOM_CRT2 1 |
||
120 | |||
121 | #define ATOM_TV_NTSC 1 |
||
122 | #define ATOM_TV_NTSCJ 2 |
||
123 | #define ATOM_TV_PAL 3 |
||
124 | #define ATOM_TV_PALM 4 |
||
125 | #define ATOM_TV_PALCN 5 |
||
126 | #define ATOM_TV_PALN 6 |
||
127 | #define ATOM_TV_PAL60 7 |
||
128 | #define ATOM_TV_SECAM 8 |
||
129 | #define ATOM_TV_CV 16 |
||
130 | |||
131 | #define ATOM_DAC1_PS2 1 |
||
132 | #define ATOM_DAC1_CV 2 |
||
133 | #define ATOM_DAC1_NTSC 3 |
||
134 | #define ATOM_DAC1_PAL 4 |
||
135 | |||
136 | #define ATOM_DAC2_PS2 ATOM_DAC1_PS2 |
||
137 | #define ATOM_DAC2_CV ATOM_DAC1_CV |
||
138 | #define ATOM_DAC2_NTSC ATOM_DAC1_NTSC |
||
139 | #define ATOM_DAC2_PAL ATOM_DAC1_PAL |
||
6104 | serge | 140 | |
1117 | serge | 141 | #define ATOM_PM_ON 0 |
142 | #define ATOM_PM_STANDBY 1 |
||
143 | #define ATOM_PM_SUSPEND 2 |
||
144 | #define ATOM_PM_OFF 3 |
||
145 | |||
146 | /* Bit0:{=0:single, =1:dual}, |
||
147 | Bit1 {=0:666RGB, =1:888RGB}, |
||
148 | Bit2:3:{Grey level} |
||
149 | Bit4:{=0:LDI format for RGB888, =1 FPDI format for RGB888}*/ |
||
150 | |||
151 | #define ATOM_PANEL_MISC_DUAL 0x00000001 |
||
152 | #define ATOM_PANEL_MISC_888RGB 0x00000002 |
||
153 | #define ATOM_PANEL_MISC_GREY_LEVEL 0x0000000C |
||
154 | #define ATOM_PANEL_MISC_FPDI 0x00000010 |
||
155 | #define ATOM_PANEL_MISC_GREY_LEVEL_SHIFT 2 |
||
156 | #define ATOM_PANEL_MISC_SPATIAL 0x00000020 |
||
157 | #define ATOM_PANEL_MISC_TEMPORAL 0x00000040 |
||
158 | #define ATOM_PANEL_MISC_API_ENABLED 0x00000080 |
||
159 | |||
1430 | serge | 160 | |
1117 | serge | 161 | #define MEMTYPE_DDR1 "DDR1" |
162 | #define MEMTYPE_DDR2 "DDR2" |
||
163 | #define MEMTYPE_DDR3 "DDR3" |
||
164 | #define MEMTYPE_DDR4 "DDR4" |
||
165 | |||
166 | #define ASIC_BUS_TYPE_PCI "PCI" |
||
167 | #define ASIC_BUS_TYPE_AGP "AGP" |
||
168 | #define ASIC_BUS_TYPE_PCIE "PCI_EXPRESS" |
||
169 | |||
170 | /* Maximum size of that FireGL flag string */ |
||
171 | |||
1430 | serge | 172 | #define ATOM_FIREGL_FLAG_STRING "FGL" //Flag used to enable FireGL Support |
173 | #define ATOM_MAX_SIZE_OF_FIREGL_FLAG_STRING 3 //sizeof( ATOM_FIREGL_FLAG_STRING ) |
||
1117 | serge | 174 | |
1430 | serge | 175 | #define ATOM_FAKE_DESKTOP_STRING "DSK" //Flag used to enable mobile ASIC on Desktop |
6104 | serge | 176 | #define ATOM_MAX_SIZE_OF_FAKE_DESKTOP_STRING ATOM_MAX_SIZE_OF_FIREGL_FLAG_STRING |
1117 | serge | 177 | |
1430 | serge | 178 | #define ATOM_M54T_FLAG_STRING "M54T" //Flag used to enable M54T Support |
179 | #define ATOM_MAX_SIZE_OF_M54T_FLAG_STRING 4 //sizeof( ATOM_M54T_FLAG_STRING ) |
||
1117 | serge | 180 | |
181 | #define HW_ASSISTED_I2C_STATUS_FAILURE 2 |
||
182 | #define HW_ASSISTED_I2C_STATUS_SUCCESS 1 |
||
183 | |||
6104 | serge | 184 | #pragma pack(1) /* BIOS data must use byte aligment */ |
1117 | serge | 185 | |
186 | /* Define offset to location of ROM header. */ |
||
187 | |||
188 | #define OFFSET_TO_POINTER_TO_ATOM_ROM_HEADER 0x00000048L |
||
189 | #define OFFSET_TO_ATOM_ROM_IMAGE_SIZE 0x00000002L |
||
190 | |||
191 | #define OFFSET_TO_ATOMBIOS_ASIC_BUS_MEM_TYPE 0x94 |
||
6104 | serge | 192 | #define MAXSIZE_OF_ATOMBIOS_ASIC_BUS_MEM_TYPE 20 /* including the terminator 0x0! */ |
1117 | serge | 193 | #define OFFSET_TO_GET_ATOMBIOS_STRINGS_NUMBER 0x002f |
194 | #define OFFSET_TO_GET_ATOMBIOS_STRINGS_START 0x006e |
||
195 | |||
196 | /* Common header for all ROM Data tables. |
||
6104 | serge | 197 | Every table pointed _ATOM_MASTER_DATA_TABLE has this common header. |
1117 | serge | 198 | And the pointer actually points to this header. */ |
199 | |||
1430 | serge | 200 | typedef struct _ATOM_COMMON_TABLE_HEADER |
201 | { |
||
6104 | serge | 202 | USHORT usStructureSize; |
203 | UCHAR ucTableFormatRevision; /*Change it when the Parser is not backward compatible */ |
||
204 | UCHAR ucTableContentRevision; /*Change it only when the table needs to change but the firmware */ |
||
205 | /*Image can't be updated, while Driver needs to carry the new table! */ |
||
1430 | serge | 206 | }ATOM_COMMON_TABLE_HEADER; |
1117 | serge | 207 | |
1963 | serge | 208 | /****************************************************************************/ |
209 | // Structure stores the ROM header. |
||
210 | /****************************************************************************/ |
||
1430 | serge | 211 | typedef struct _ATOM_ROM_HEADER |
212 | { |
||
6104 | serge | 213 | ATOM_COMMON_TABLE_HEADER sHeader; |
214 | UCHAR uaFirmWareSignature[4]; /*Signature to distinguish between Atombios and non-atombios, |
||
215 | atombios should init it as "ATOM", don't change the position */ |
||
216 | USHORT usBiosRuntimeSegmentAddress; |
||
217 | USHORT usProtectedModeInfoOffset; |
||
218 | USHORT usConfigFilenameOffset; |