Root/
Source at commit 1445 created 12 years 11 months ago. By jrcs, Revert "Print the multiboot_magic" Only used for debugging purpose | |
---|---|
1 | /****************************************************************************/␉␊ |
2 | /*Portion I: Definitions shared between VBIOS and Driver */␊ |
3 | /****************************************************************************/␊ |
4 | ␊ |
5 | ␊ |
6 | #ifndef _SHORT_ATOMBIOS_H␊ |
7 | #define _SHORT_ATOMBIOS_H␊ |
8 | ␊ |
9 | #define ATOM_VERSION_MAJOR 0x00020000␊ |
10 | #define ATOM_VERSION_MINOR 0x00000002␊ |
11 | ␊ |
12 | #define ATOM_HEADER_VERSION (ATOM_VERSION_MAJOR | ATOM_VERSION_MINOR)␊ |
13 | ␊ |
14 | typedef unsigned char␉␉BOOLEAN;␊ |
15 | typedef signed char␉␉␉INT8;␊ |
16 | typedef unsigned char␉␉UINT8;␊ |
17 | typedef signed short␉␉INT16;␊ |
18 | typedef unsigned short␉␉UINT16;␊ |
19 | typedef signed long␉␉␉INT32;␊ |
20 | typedef unsigned long␉␉UINT32;␊ |
21 | typedef unsigned char␉␉CHAR8;␊ |
22 | typedef unsigned short␉␉CHAR16;␊ |
23 | typedef unsigned short␉␉USHORT;␊ |
24 | typedef unsigned char␉␉UCHAR;␊ |
25 | typedef␉unsigned long␉␉ULONG;␊ |
26 | ␊ |
27 | #pragma pack(1) /* BIOS data must use byte aligment */␊ |
28 | ␊ |
29 | /* Define offset to location of ROM header. */␊ |
30 | ␊ |
31 | #define OFFSET_TO_POINTER_TO_ATOM_ROM_HEADER␉␉0x00000048L␊ |
32 | #define OFFSET_TO_ATOM_ROM_IMAGE_SIZE␉␉␉␉ 0x00000002L␊ |
33 | ␊ |
34 | typedef struct _ATOM_COMMON_TABLE_HEADER␊ |
35 | {␊ |
36 | ␉USHORT usStructureSize;␊ |
37 | ␉UCHAR ucTableFormatRevision; /*Change it when the Parser is not backward compatible */␊ |
38 | ␉UCHAR ucTableContentRevision; /*Change it only when the table needs to change but the firmware */␊ |
39 | /*Image can't be updated, while Driver needs to carry the new table! */␊ |
40 | } ATOM_COMMON_TABLE_HEADER;␊ |
41 | ␊ |
42 | typedef struct _ATOM_ROM_HEADER␊ |
43 | {␊ |
44 | ␉ATOM_COMMON_TABLE_HEADER␉␉sHeader;␊ |
45 | ␉UCHAR␉ uaFirmWareSignature[4]; /*Signature to distinguish between Atombios and non-atombios, ␊ |
46 | ␉␉␉␉␉␉␉␉␉␉␉ + atombios should init it as "ATOM", don't change the position */␊ |
47 | ␉USHORT usBiosRuntimeSegmentAddress;␊ |
48 | ␉USHORT usProtectedModeInfoOffset;␊ |
49 | ␉USHORT usConfigFilenameOffset;␊ |
50 | ␉USHORT usCRC_BlockOffset;␊ |
51 | ␉USHORT usBIOS_BootupMessageOffset;␊ |
52 | ␉USHORT usInt10Offset;␊ |
53 | ␉USHORT usPciBusDevInitCode;␊ |
54 | ␉USHORT usIoBaseAddress;␊ |
55 | ␉USHORT usSubsystemVendorID;␊ |
56 | ␉USHORT usSubsystemID;␊ |
57 | ␉USHORT usPCI_InfoOffset; ␊ |
58 | ␉USHORT usMasterCommandTableOffset; /*Offset for SW to get all command table offsets, Don't change the position */␊ |
59 | ␉USHORT usMasterDataTableOffset; /*Offset for SW to get all data table offsets, Don't change the position */␊ |
60 | ␉UCHAR ucExtendedFunctionCode;␊ |
61 | ␉UCHAR ucReserved;␊ |
62 | } ATOM_ROM_HEADER;␊ |
63 | ␊ |
64 | /****************************************************************************/␉␊ |
65 | // Structure used in Data.mtb␊ |
66 | /****************************************************************************/␉␊ |
67 | typedef struct _ATOM_MASTER_LIST_OF_DATA_TABLES␊ |
68 | {␊ |
69 | ␉USHORT UtilityPipeLine;␉ // Offest for the utility to get parser info,Don't change this position!␊ |
70 | ␉USHORT MultimediaCapabilityInfo; // Only used by MM Lib,latest version 1.1, not configuable from Bios, need to include the table to build Bios ␊ |
71 | ␉USHORT MultimediaConfigInfo; // Only used by MM Lib,latest version 2.1, not configuable from Bios, need to include the table to build Bios␊ |
72 | ␉USHORT StandardVESA_Timing; // Only used by Bios␊ |
73 | ␉USHORT FirmwareInfo; // Shared by various SW components,latest version 1.4␊ |
74 | ␉USHORT DAC_Info; // Will be obsolete from R600␊ |
75 | ␉USHORT LVDS_Info; // Shared by various SW components,latest version 1.1 ␊ |
76 | ␉USHORT TMDS_Info; // Will be obsolete from R600␊ |
77 | ␉USHORT AnalogTV_Info; // Shared by various SW components,latest version 1.1 ␊ |
78 | ␉USHORT SupportedDevicesInfo; // Will be obsolete from R600␊ |
79 | ␉USHORT GPIO_I2C_Info; // Shared by various SW components,latest version 1.2 will be used from R600 ␊ |
80 | ␉USHORT VRAM_UsageByFirmware; // Shared by various SW components,latest version 1.3 will be used from R600␊ |
81 | ␉USHORT GPIO_Pin_LUT; // Shared by various SW components,latest version 1.1␊ |
82 | ␉USHORT VESA_ToInternalModeLUT; // Only used by Bios␊ |
83 | ␉USHORT ComponentVideoInfo; // Shared by various SW components,latest version 2.1 will be used from R600␊ |
84 | ␉USHORT PowerPlayInfo; // Shared by various SW components,latest version 2.1,new design from R600␊ |
85 | ␉USHORT CompassionateData; // Will be obsolete from R600␊ |
86 | ␉USHORT SaveRestoreInfo; // Only used by Bios␊ |
87 | ␉USHORT PPLL_SS_Info; // Shared by various SW components,latest version 1.2, used to call SS_Info, change to new name because of int ASIC SS info␊ |
88 | ␉USHORT OemInfo; // Defined and used by external SW, should be obsolete soon␊ |
89 | ␉USHORT XTMDS_Info; // Will be obsolete from R600␊ |
90 | ␉USHORT MclkSS_Info; // Shared by various SW components,latest version 1.1, only enabled when ext SS chip is used␊ |
91 | ␉USHORT Object_Header; // Shared by various SW components,latest version 1.1␊ |
92 | ␉USHORT IndirectIOAccess; // Only used by Bios,this table position can't change at all!!␊ |
93 | ␉USHORT MC_InitParameter; // Only used by command table␊ |
94 | ␉USHORT ASIC_VDDC_Info;␉␉␉␉␉␉// Will be obsolete from R600␊ |
95 | ␉USHORT ASIC_InternalSS_Info;␉␉␉// New tabel name from R600, used to be called "ASIC_MVDDC_Info"␊ |
96 | ␉USHORT TV_VideoMode;␉␉␉␉␉␉␉// Only used by command table␊ |
97 | ␉USHORT VRAM_Info;␉␉␉␉␉␉␉␉// Only used by command table, latest version 1.3␊ |
98 | ␉USHORT MemoryTrainingInfo;␉␉␉␉// Used for VBIOS and Diag utility for memory training purpose since R600. the new table rev start from 2.1␊ |
99 | ␉USHORT IntegratedSystemInfo;␉␉␉// Shared by various SW components␊ |
100 | ␉USHORT ASIC_ProfilingInfo;␉␉␉␉// New table name from R600, used to be called "ASIC_VDDCI_Info" for pre-R600␊ |
101 | ␉USHORT VoltageObjectInfo;␉␉␉␉// Shared by various SW components, latest version 1.1␊ |
102 | ␉USHORT␉␉␉␉PowerSourceInfo;␉␉␉␉␉// Shared by various SW components, latest versoin 1.1␊ |
103 | } ATOM_MASTER_LIST_OF_DATA_TABLES;␊ |
104 | ␊ |
105 | typedef struct _ATOM_MASTER_DATA_TABLE␊ |
106 | { ␊ |
107 | ␉ATOM_COMMON_TABLE_HEADER sHeader; ␊ |
108 | ␉ATOM_MASTER_LIST_OF_DATA_TABLES ListOfDataTables;␊ |
109 | } ATOM_MASTER_DATA_TABLE;␊ |
110 | ␊ |
111 | typedef union _ATOM_MODE_MISC_INFO_ACCESS␊ |
112 | { ␊ |
113 | ␉USHORT usAccess;␊ |
114 | } ATOM_MODE_MISC_INFO_ACCESS;␊ |
115 | ␊ |
116 | /****************************************************************************/␉␊ |
117 | // Structure used in StandardVESA_TimingTable␊ |
118 | // AnalogTV_InfoTable ␊ |
119 | // ComponentVideoInfoTable␊ |
120 | /****************************************************************************/␉␊ |
121 | typedef struct _ATOM_MODE_TIMING␊ |
122 | {␊ |
123 | ␉USHORT usCRTC_H_Total;␊ |
124 | ␉USHORT usCRTC_H_Disp;␊ |
125 | ␉USHORT usCRTC_H_SyncStart;␊ |
126 | ␉USHORT usCRTC_H_SyncWidth;␊ |
127 | ␉USHORT usCRTC_V_Total;␊ |
128 | ␉USHORT usCRTC_V_Disp;␊ |
129 | ␉USHORT usCRTC_V_SyncStart;␊ |
130 | ␉USHORT usCRTC_V_SyncWidth;␊ |
131 | ␉USHORT usPixelClock;␉␉␉␉␉ //in 10Khz unit␊ |
132 | ␉ATOM_MODE_MISC_INFO_ACCESS susModeMiscInfo;␊ |
133 | ␉USHORT usCRTC_OverscanRight;␊ |
134 | ␉USHORT usCRTC_OverscanLeft;␊ |
135 | ␉USHORT usCRTC_OverscanBottom;␊ |
136 | ␉USHORT usCRTC_OverscanTop;␊ |
137 | ␉USHORT usReserve;␊ |
138 | ␉UCHAR ucInternalModeNumber;␊ |
139 | ␉UCHAR ucRefreshRate;␊ |
140 | } ATOM_MODE_TIMING;␊ |
141 | ␊ |
142 | typedef struct _ATOM_DTD_FORMAT␊ |
143 | {␊ |
144 | ␉USHORT usPixClk;␊ |
145 | ␉USHORT usHActive;␊ |
146 | ␉USHORT usHBlanking_Time;␊ |
147 | ␉USHORT usVActive;␊ |
148 | ␉USHORT usVBlanking_Time;␉␉␉␊ |
149 | ␉USHORT usHSyncOffset;␊ |
150 | ␉USHORT usHSyncWidth;␊ |
151 | ␉USHORT usVSyncOffset;␊ |
152 | ␉USHORT usVSyncWidth;␊ |
153 | ␉USHORT usImageHSize;␊ |
154 | ␉USHORT usImageVSize;␊ |
155 | ␉UCHAR ucHBorder;␊ |
156 | ␉UCHAR ucVBorder;␊ |
157 | ␉ATOM_MODE_MISC_INFO_ACCESS susModeMiscInfo;␊ |
158 | ␉UCHAR ucInternalModeNumber;␊ |
159 | ␉UCHAR ucRefreshRate;␊ |
160 | } ATOM_DTD_FORMAT;␊ |
161 | ␊ |
162 | typedef struct _ATOM_LVDS_INFO_V12␊ |
163 | {␊ |
164 | ␉ATOM_COMMON_TABLE_HEADER sHeader; ␊ |
165 | ␉ATOM_DTD_FORMAT sLCDTiming;␊ |
166 | ␉USHORT usExtInfoTableOffset;␊ |
167 | ␉USHORT usSupportedRefreshRate; //Refer to panel info table in ATOMBIOS extension Spec.␊ |
168 | ␉USHORT usOffDelayInMs;␊ |
169 | ␉UCHAR ucPowerSequenceDigOntoDEin10Ms;␊ |
170 | ␉UCHAR ucPowerSequenceDEtoBLOnin10Ms;␊ |
171 | ␉UCHAR ucLVDS_Misc; // Bit0:{=0:single, =1:dual},Bit1 {=0:666RGB, =1:888RGB},Bit2:3:{Grey level}␊ |
172 | ␉␉␉␉␉␉␉␉␉␉␉␉// Bit4:{=0:LDI format for RGB888, =1 FPDI format for RGB888}␊ |
173 | ␉ // Bit5:{=0:Spatial Dithering disabled;1 Spatial Dithering enabled}␊ |
174 | ␉ // Bit6:{=0:Temporal Dithering disabled;1 Temporal Dithering enabled}␊ |
175 | ␉UCHAR ucPanelDefaultRefreshRate;␊ |
176 | ␉UCHAR ucPanelIdentification;␊ |
177 | ␉UCHAR ucSS_Id;␊ |
178 | ␉USHORT usLCDVenderID;␊ |
179 | ␉USHORT usLCDProductID;␊ |
180 | ␉UCHAR ucLCDPanel_SpecialHandlingCap; ␊ |
181 | ␉UCHAR␉␉␉␉␉␉␉␉ucPanelInfoSize;␉␉␉␉␉// start from ATOM_DTD_FORMAT to end of panel info, include ExtInfoTable␊ |
182 | ␉UCHAR ucReserved[2];␊ |
183 | } ATOM_LVDS_INFO_V12;␊ |
184 | ␉␊ |
185 | ␉␊ |
186 | typedef struct _ATOM_STANDARD_VESA_TIMING␊ |
187 | {␊ |
188 | ␉ATOM_COMMON_TABLE_HEADER sHeader; ␊ |
189 | ␉char * ␉␉␉␉ aModeTimings; // 16 is not the real array number, just for initial allocation␊ |
190 | } ATOM_STANDARD_VESA_TIMING;␊ |
191 | ␊ |
192 | #endif |