Chameleon

Chameleon Svn Source Tree

Root/branches/Chimera/i386/modules/Resolution/shortatombios.h

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
14typedef unsigned charBOOLEAN;
15typedef signed charINT8;
16typedef unsigned charUINT8;
17typedef signed shortINT16;
18typedef unsigned shortUINT16;
19typedef signed longINT32;
20typedef unsigned longUINT32;
21typedef unsigned charCHAR8;
22typedef unsigned shortCHAR16;
23typedef unsigned shortUSHORT;
24typedef unsigned charUCHAR;
25typedefunsigned longULONG;
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_HEADER0x00000048L
32#define OFFSET_TO_ATOM_ROM_IMAGE_SIZE 0x00000002L
33
34typedef struct _ATOM_COMMON_TABLE_HEADER
35{
36USHORT usStructureSize;
37UCHAR ucTableFormatRevision; /*Change it when the Parser is not backward compatible */
38UCHAR 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
42typedef struct _ATOM_ROM_HEADER
43{
44ATOM_COMMON_TABLE_HEADERsHeader;
45UCHAR uaFirmWareSignature[4]; /*Signature to distinguish between Atombios and non-atombios,
46 + atombios should init it as "ATOM", don't change the position */
47USHORT usBiosRuntimeSegmentAddress;
48USHORT usProtectedModeInfoOffset;
49USHORT usConfigFilenameOffset;
50USHORT usCRC_BlockOffset;
51USHORT usBIOS_BootupMessageOffset;
52USHORT usInt10Offset;
53USHORT usPciBusDevInitCode;
54USHORT usIoBaseAddress;
55USHORT usSubsystemVendorID;
56USHORT usSubsystemID;
57USHORT usPCI_InfoOffset;
58USHORT usMasterCommandTableOffset; /*Offset for SW to get all command table offsets, Don't change the position */
59USHORT usMasterDataTableOffset; /*Offset for SW to get all data table offsets, Don't change the position */
60UCHAR ucExtendedFunctionCode;
61UCHAR ucReserved;
62} ATOM_ROM_HEADER;
63
64/****************************************************************************/
65// Structure used in Data.mtb
66/****************************************************************************/
67typedef struct _ATOM_MASTER_LIST_OF_DATA_TABLES
68{
69USHORT UtilityPipeLine; // Offest for the utility to get parser info,Don't change this position!
70USHORT MultimediaCapabilityInfo; // Only used by MM Lib,latest version 1.1, not configuable from Bios, need to include the table to build Bios
71USHORT MultimediaConfigInfo; // Only used by MM Lib,latest version 2.1, not configuable from Bios, need to include the table to build Bios
72USHORT StandardVESA_Timing; // Only used by Bios
73USHORT FirmwareInfo; // Shared by various SW components,latest version 1.4
74USHORT DAC_Info; // Will be obsolete from R600
75USHORT LVDS_Info; // Shared by various SW components,latest version 1.1
76USHORT TMDS_Info; // Will be obsolete from R600
77USHORT AnalogTV_Info; // Shared by various SW components,latest version 1.1
78USHORT SupportedDevicesInfo; // Will be obsolete from R600
79USHORT GPIO_I2C_Info; // Shared by various SW components,latest version 1.2 will be used from R600
80USHORT VRAM_UsageByFirmware; // Shared by various SW components,latest version 1.3 will be used from R600
81USHORT GPIO_Pin_LUT; // Shared by various SW components,latest version 1.1
82USHORT VESA_ToInternalModeLUT; // Only used by Bios
83USHORT ComponentVideoInfo; // Shared by various SW components,latest version 2.1 will be used from R600
84USHORT PowerPlayInfo; // Shared by various SW components,latest version 2.1,new design from R600
85USHORT CompassionateData; // Will be obsolete from R600
86USHORT SaveRestoreInfo; // Only used by Bios
87USHORT 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
88USHORT OemInfo; // Defined and used by external SW, should be obsolete soon
89USHORT XTMDS_Info; // Will be obsolete from R600
90USHORT MclkSS_Info; // Shared by various SW components,latest version 1.1, only enabled when ext SS chip is used
91USHORT Object_Header; // Shared by various SW components,latest version 1.1
92USHORT IndirectIOAccess; // Only used by Bios,this table position can't change at all!!
93USHORT MC_InitParameter; // Only used by command table
94USHORT ASIC_VDDC_Info;// Will be obsolete from R600
95USHORT ASIC_InternalSS_Info;// New tabel name from R600, used to be called "ASIC_MVDDC_Info"
96USHORT TV_VideoMode;// Only used by command table
97USHORT VRAM_Info;// Only used by command table, latest version 1.3
98USHORT MemoryTrainingInfo;// Used for VBIOS and Diag utility for memory training purpose since R600. the new table rev start from 2.1
99USHORT IntegratedSystemInfo;// Shared by various SW components
100USHORT ASIC_ProfilingInfo;// New table name from R600, used to be called "ASIC_VDDCI_Info" for pre-R600
101USHORT VoltageObjectInfo;// Shared by various SW components, latest version 1.1
102USHORTPowerSourceInfo;// Shared by various SW components, latest versoin 1.1
103} ATOM_MASTER_LIST_OF_DATA_TABLES;
104
105typedef struct _ATOM_MASTER_DATA_TABLE
106{
107ATOM_COMMON_TABLE_HEADER sHeader;
108ATOM_MASTER_LIST_OF_DATA_TABLES ListOfDataTables;
109} ATOM_MASTER_DATA_TABLE;
110
111typedef union _ATOM_MODE_MISC_INFO_ACCESS
112{
113USHORT usAccess;
114} ATOM_MODE_MISC_INFO_ACCESS;
115
116/****************************************************************************/
117// Structure used in StandardVESA_TimingTable
118// AnalogTV_InfoTable
119// ComponentVideoInfoTable
120/****************************************************************************/
121typedef struct _ATOM_MODE_TIMING
122{
123USHORT usCRTC_H_Total;
124USHORT usCRTC_H_Disp;
125USHORT usCRTC_H_SyncStart;
126USHORT usCRTC_H_SyncWidth;
127USHORT usCRTC_V_Total;
128USHORT usCRTC_V_Disp;
129USHORT usCRTC_V_SyncStart;
130USHORT usCRTC_V_SyncWidth;
131USHORT usPixelClock; //in 10Khz unit
132ATOM_MODE_MISC_INFO_ACCESS susModeMiscInfo;
133USHORT usCRTC_OverscanRight;
134USHORT usCRTC_OverscanLeft;
135USHORT usCRTC_OverscanBottom;
136USHORT usCRTC_OverscanTop;
137USHORT usReserve;
138UCHAR ucInternalModeNumber;
139UCHAR ucRefreshRate;
140} ATOM_MODE_TIMING;
141
142typedef struct _ATOM_DTD_FORMAT
143{
144USHORT usPixClk;
145USHORT usHActive;
146USHORT usHBlanking_Time;
147USHORT usVActive;
148USHORT usVBlanking_Time;
149USHORT usHSyncOffset;
150USHORT usHSyncWidth;
151USHORT usVSyncOffset;
152USHORT usVSyncWidth;
153USHORT usImageHSize;
154USHORT usImageVSize;
155UCHAR ucHBorder;
156UCHAR ucVBorder;
157ATOM_MODE_MISC_INFO_ACCESS susModeMiscInfo;
158UCHAR ucInternalModeNumber;
159UCHAR ucRefreshRate;
160} ATOM_DTD_FORMAT;
161
162typedef struct _ATOM_LVDS_INFO_V12
163{
164ATOM_COMMON_TABLE_HEADER sHeader;
165ATOM_DTD_FORMAT sLCDTiming;
166USHORT usExtInfoTableOffset;
167USHORT usSupportedRefreshRate; //Refer to panel info table in ATOMBIOS extension Spec.
168USHORT usOffDelayInMs;
169UCHAR ucPowerSequenceDigOntoDEin10Ms;
170UCHAR ucPowerSequenceDEtoBLOnin10Ms;
171UCHAR 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}
175UCHAR ucPanelDefaultRefreshRate;
176UCHAR ucPanelIdentification;
177UCHAR ucSS_Id;
178USHORT usLCDVenderID;
179USHORT usLCDProductID;
180UCHAR ucLCDPanel_SpecialHandlingCap;
181UCHARucPanelInfoSize;// start from ATOM_DTD_FORMAT to end of panel info, include ExtInfoTable
182UCHAR ucReserved[2];
183} ATOM_LVDS_INFO_V12;
184
185
186typedef struct _ATOM_STANDARD_VESA_TIMING
187{
188ATOM_COMMON_TABLE_HEADER sHeader;
189char * aModeTimings; // 16 is not the real array number, just for initial allocation
190} ATOM_STANDARD_VESA_TIMING;
191
192#endif

Archive Download this file

Revision: 2225