pptable.h revision 1.1.1.1.6.2 1 1.1.1.1.6.2 tls /*
2 1.1.1.1.6.2 tls * Copyright 2013 Advanced Micro Devices, Inc.
3 1.1.1.1.6.2 tls *
4 1.1.1.1.6.2 tls * Permission is hereby granted, free of charge, to any person obtaining a
5 1.1.1.1.6.2 tls * copy of this software and associated documentation files (the "Software"),
6 1.1.1.1.6.2 tls * to deal in the Software without restriction, including without limitation
7 1.1.1.1.6.2 tls * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 1.1.1.1.6.2 tls * and/or sell copies of the Software, and to permit persons to whom the
9 1.1.1.1.6.2 tls * Software is furnished to do so, subject to the following conditions:
10 1.1.1.1.6.2 tls *
11 1.1.1.1.6.2 tls * The above copyright notice and this permission notice shall be included in
12 1.1.1.1.6.2 tls * all copies or substantial portions of the Software.
13 1.1.1.1.6.2 tls *
14 1.1.1.1.6.2 tls * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 1.1.1.1.6.2 tls * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 1.1.1.1.6.2 tls * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 1.1.1.1.6.2 tls * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18 1.1.1.1.6.2 tls * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19 1.1.1.1.6.2 tls * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20 1.1.1.1.6.2 tls * OTHER DEALINGS IN THE SOFTWARE.
21 1.1.1.1.6.2 tls */
22 1.1.1.1.6.2 tls
23 1.1.1.1.6.2 tls #ifndef _PPTABLE_H
24 1.1.1.1.6.2 tls #define _PPTABLE_H
25 1.1.1.1.6.2 tls
26 1.1.1.1.6.2 tls #pragma pack(1)
27 1.1.1.1.6.2 tls
28 1.1.1.1.6.2 tls typedef struct _ATOM_PPLIB_THERMALCONTROLLER
29 1.1.1.1.6.2 tls
30 1.1.1.1.6.2 tls {
31 1.1.1.1.6.2 tls UCHAR ucType; // one of ATOM_PP_THERMALCONTROLLER_*
32 1.1.1.1.6.2 tls UCHAR ucI2cLine; // as interpreted by DAL I2C
33 1.1.1.1.6.2 tls UCHAR ucI2cAddress;
34 1.1.1.1.6.2 tls UCHAR ucFanParameters; // Fan Control Parameters.
35 1.1.1.1.6.2 tls UCHAR ucFanMinRPM; // Fan Minimum RPM (hundreds) -- for display purposes only.
36 1.1.1.1.6.2 tls UCHAR ucFanMaxRPM; // Fan Maximum RPM (hundreds) -- for display purposes only.
37 1.1.1.1.6.2 tls UCHAR ucReserved; // ----
38 1.1.1.1.6.2 tls UCHAR ucFlags; // to be defined
39 1.1.1.1.6.2 tls } ATOM_PPLIB_THERMALCONTROLLER;
40 1.1.1.1.6.2 tls
41 1.1.1.1.6.2 tls #define ATOM_PP_FANPARAMETERS_TACHOMETER_PULSES_PER_REVOLUTION_MASK 0x0f
42 1.1.1.1.6.2 tls #define ATOM_PP_FANPARAMETERS_NOFAN 0x80 // No fan is connected to this controller.
43 1.1.1.1.6.2 tls
44 1.1.1.1.6.2 tls #define ATOM_PP_THERMALCONTROLLER_NONE 0
45 1.1.1.1.6.2 tls #define ATOM_PP_THERMALCONTROLLER_LM63 1 // Not used by PPLib
46 1.1.1.1.6.2 tls #define ATOM_PP_THERMALCONTROLLER_ADM1032 2 // Not used by PPLib
47 1.1.1.1.6.2 tls #define ATOM_PP_THERMALCONTROLLER_ADM1030 3 // Not used by PPLib
48 1.1.1.1.6.2 tls #define ATOM_PP_THERMALCONTROLLER_MUA6649 4 // Not used by PPLib
49 1.1.1.1.6.2 tls #define ATOM_PP_THERMALCONTROLLER_LM64 5
50 1.1.1.1.6.2 tls #define ATOM_PP_THERMALCONTROLLER_F75375 6 // Not used by PPLib
51 1.1.1.1.6.2 tls #define ATOM_PP_THERMALCONTROLLER_RV6xx 7
52 1.1.1.1.6.2 tls #define ATOM_PP_THERMALCONTROLLER_RV770 8
53 1.1.1.1.6.2 tls #define ATOM_PP_THERMALCONTROLLER_ADT7473 9
54 1.1.1.1.6.2 tls #define ATOM_PP_THERMALCONTROLLER_KONG 10
55 1.1.1.1.6.2 tls #define ATOM_PP_THERMALCONTROLLER_EXTERNAL_GPIO 11
56 1.1.1.1.6.2 tls #define ATOM_PP_THERMALCONTROLLER_EVERGREEN 12
57 1.1.1.1.6.2 tls #define ATOM_PP_THERMALCONTROLLER_EMC2103 13 /* 0x0D */ // Only fan control will be implemented, do NOT show this in PPGen.
58 1.1.1.1.6.2 tls #define ATOM_PP_THERMALCONTROLLER_SUMO 14 /* 0x0E */ // Sumo type, used internally
59 1.1.1.1.6.2 tls #define ATOM_PP_THERMALCONTROLLER_NISLANDS 15
60 1.1.1.1.6.2 tls #define ATOM_PP_THERMALCONTROLLER_SISLANDS 16
61 1.1.1.1.6.2 tls #define ATOM_PP_THERMALCONTROLLER_LM96163 17
62 1.1.1.1.6.2 tls #define ATOM_PP_THERMALCONTROLLER_CISLANDS 18
63 1.1.1.1.6.2 tls #define ATOM_PP_THERMALCONTROLLER_KAVERI 19
64 1.1.1.1.6.2 tls
65 1.1.1.1.6.2 tls
66 1.1.1.1.6.2 tls // Thermal controller 'combo type' to use an external controller for Fan control and an internal controller for thermal.
67 1.1.1.1.6.2 tls // We probably should reserve the bit 0x80 for this use.
68 1.1.1.1.6.2 tls // To keep the number of these types low we should also use the same code for all ASICs (i.e. do not distinguish RV6xx and RV7xx Internal here).
69 1.1.1.1.6.2 tls // The driver can pick the correct internal controller based on the ASIC.
70 1.1.1.1.6.2 tls
71 1.1.1.1.6.2 tls #define ATOM_PP_THERMALCONTROLLER_ADT7473_WITH_INTERNAL 0x89 // ADT7473 Fan Control + Internal Thermal Controller
72 1.1.1.1.6.2 tls #define ATOM_PP_THERMALCONTROLLER_EMC2103_WITH_INTERNAL 0x8D // EMC2103 Fan Control + Internal Thermal Controller
73 1.1.1.1.6.2 tls
74 1.1.1.1.6.2 tls typedef struct _ATOM_PPLIB_STATE
75 1.1.1.1.6.2 tls {
76 1.1.1.1.6.2 tls UCHAR ucNonClockStateIndex;
77 1.1.1.1.6.2 tls UCHAR ucClockStateIndices[1]; // variable-sized
78 1.1.1.1.6.2 tls } ATOM_PPLIB_STATE;
79 1.1.1.1.6.2 tls
80 1.1.1.1.6.2 tls
81 1.1.1.1.6.2 tls typedef struct _ATOM_PPLIB_FANTABLE
82 1.1.1.1.6.2 tls {
83 1.1.1.1.6.2 tls UCHAR ucFanTableFormat; // Change this if the table format changes or version changes so that the other fields are not the same.
84 1.1.1.1.6.2 tls UCHAR ucTHyst; // Temperature hysteresis. Integer.
85 1.1.1.1.6.2 tls USHORT usTMin; // The temperature, in 0.01 centigrades, below which we just run at a minimal PWM.
86 1.1.1.1.6.2 tls USHORT usTMed; // The middle temperature where we change slopes.
87 1.1.1.1.6.2 tls USHORT usTHigh; // The high point above TMed for adjusting the second slope.
88 1.1.1.1.6.2 tls USHORT usPWMMin; // The minimum PWM value in percent (0.01% increments).
89 1.1.1.1.6.2 tls USHORT usPWMMed; // The PWM value (in percent) at TMed.
90 1.1.1.1.6.2 tls USHORT usPWMHigh; // The PWM value at THigh.
91 1.1.1.1.6.2 tls } ATOM_PPLIB_FANTABLE;
92 1.1.1.1.6.2 tls
93 1.1.1.1.6.2 tls typedef struct _ATOM_PPLIB_FANTABLE2
94 1.1.1.1.6.2 tls {
95 1.1.1.1.6.2 tls ATOM_PPLIB_FANTABLE basicTable;
96 1.1.1.1.6.2 tls USHORT usTMax; // The max temperature
97 1.1.1.1.6.2 tls } ATOM_PPLIB_FANTABLE2;
98 1.1.1.1.6.2 tls
99 1.1.1.1.6.2 tls typedef struct _ATOM_PPLIB_EXTENDEDHEADER
100 1.1.1.1.6.2 tls {
101 1.1.1.1.6.2 tls USHORT usSize;
102 1.1.1.1.6.2 tls ULONG ulMaxEngineClock; // For Overdrive.
103 1.1.1.1.6.2 tls ULONG ulMaxMemoryClock; // For Overdrive.
104 1.1.1.1.6.2 tls // Add extra system parameters here, always adjust size to include all fields.
105 1.1.1.1.6.2 tls USHORT usVCETableOffset; //points to ATOM_PPLIB_VCE_Table
106 1.1.1.1.6.2 tls USHORT usUVDTableOffset; //points to ATOM_PPLIB_UVD_Table
107 1.1.1.1.6.2 tls USHORT usSAMUTableOffset; //points to ATOM_PPLIB_SAMU_Table
108 1.1.1.1.6.2 tls USHORT usPPMTableOffset; //points to ATOM_PPLIB_PPM_Table
109 1.1.1.1.6.2 tls USHORT usACPTableOffset; //points to ATOM_PPLIB_ACP_Table
110 1.1.1.1.6.2 tls USHORT usPowerTuneTableOffset; //points to ATOM_PPLIB_POWERTUNE_Table
111 1.1.1.1.6.2 tls } ATOM_PPLIB_EXTENDEDHEADER;
112 1.1.1.1.6.2 tls
113 1.1.1.1.6.2 tls //// ATOM_PPLIB_POWERPLAYTABLE::ulPlatformCaps
114 1.1.1.1.6.2 tls #define ATOM_PP_PLATFORM_CAP_BACKBIAS 1
115 1.1.1.1.6.2 tls #define ATOM_PP_PLATFORM_CAP_POWERPLAY 2
116 1.1.1.1.6.2 tls #define ATOM_PP_PLATFORM_CAP_SBIOSPOWERSOURCE 4
117 1.1.1.1.6.2 tls #define ATOM_PP_PLATFORM_CAP_ASPM_L0s 8
118 1.1.1.1.6.2 tls #define ATOM_PP_PLATFORM_CAP_ASPM_L1 16
119 1.1.1.1.6.2 tls #define ATOM_PP_PLATFORM_CAP_HARDWAREDC 32
120 1.1.1.1.6.2 tls #define ATOM_PP_PLATFORM_CAP_GEMINIPRIMARY 64
121 1.1.1.1.6.2 tls #define ATOM_PP_PLATFORM_CAP_STEPVDDC 128
122 1.1.1.1.6.2 tls #define ATOM_PP_PLATFORM_CAP_VOLTAGECONTROL 256
123 1.1.1.1.6.2 tls #define ATOM_PP_PLATFORM_CAP_SIDEPORTCONTROL 512
124 1.1.1.1.6.2 tls #define ATOM_PP_PLATFORM_CAP_TURNOFFPLL_ASPML1 1024
125 1.1.1.1.6.2 tls #define ATOM_PP_PLATFORM_CAP_HTLINKCONTROL 2048
126 1.1.1.1.6.2 tls #define ATOM_PP_PLATFORM_CAP_MVDDCONTROL 4096
127 1.1.1.1.6.2 tls #define ATOM_PP_PLATFORM_CAP_GOTO_BOOT_ON_ALERT 0x2000 // Go to boot state on alerts, e.g. on an AC->DC transition.
128 1.1.1.1.6.2 tls #define ATOM_PP_PLATFORM_CAP_DONT_WAIT_FOR_VBLANK_ON_ALERT 0x4000 // Do NOT wait for VBLANK during an alert (e.g. AC->DC transition).
129 1.1.1.1.6.2 tls #define ATOM_PP_PLATFORM_CAP_VDDCI_CONTROL 0x8000 // Does the driver control VDDCI independently from VDDC.
130 1.1.1.1.6.2 tls #define ATOM_PP_PLATFORM_CAP_REGULATOR_HOT 0x00010000 // Enable the 'regulator hot' feature.
131 1.1.1.1.6.2 tls #define ATOM_PP_PLATFORM_CAP_BACO 0x00020000 // Does the driver supports BACO state.
132 1.1.1.1.6.2 tls #define ATOM_PP_PLATFORM_CAP_NEW_CAC_VOLTAGE 0x00040000 // Does the driver supports new CAC voltage table.
133 1.1.1.1.6.2 tls #define ATOM_PP_PLATFORM_CAP_REVERT_GPIO5_POLARITY 0x00080000 // Does the driver supports revert GPIO5 polarity.
134 1.1.1.1.6.2 tls #define ATOM_PP_PLATFORM_CAP_OUTPUT_THERMAL2GPIO17 0x00100000 // Does the driver supports thermal2GPIO17.
135 1.1.1.1.6.2 tls #define ATOM_PP_PLATFORM_CAP_VRHOT_GPIO_CONFIGURABLE 0x00200000 // Does the driver supports VR HOT GPIO Configurable.
136 1.1.1.1.6.2 tls #define ATOM_PP_PLATFORM_CAP_TEMP_INVERSION 0x00400000 // Does the driver supports Temp Inversion feature.
137 1.1.1.1.6.2 tls #define ATOM_PP_PLATFORM_CAP_EVV 0x00800000
138 1.1.1.1.6.2 tls
139 1.1.1.1.6.2 tls typedef struct _ATOM_PPLIB_POWERPLAYTABLE
140 1.1.1.1.6.2 tls {
141 1.1.1.1.6.2 tls ATOM_COMMON_TABLE_HEADER sHeader;
142 1.1.1.1.6.2 tls
143 1.1.1.1.6.2 tls UCHAR ucDataRevision;
144 1.1.1.1.6.2 tls
145 1.1.1.1.6.2 tls UCHAR ucNumStates;
146 1.1.1.1.6.2 tls UCHAR ucStateEntrySize;
147 1.1.1.1.6.2 tls UCHAR ucClockInfoSize;
148 1.1.1.1.6.2 tls UCHAR ucNonClockSize;
149 1.1.1.1.6.2 tls
150 1.1.1.1.6.2 tls // offset from start of this table to array of ucNumStates ATOM_PPLIB_STATE structures
151 1.1.1.1.6.2 tls USHORT usStateArrayOffset;
152 1.1.1.1.6.2 tls
153 1.1.1.1.6.2 tls // offset from start of this table to array of ASIC-specific structures,
154 1.1.1.1.6.2 tls // currently ATOM_PPLIB_CLOCK_INFO.
155 1.1.1.1.6.2 tls USHORT usClockInfoArrayOffset;
156 1.1.1.1.6.2 tls
157 1.1.1.1.6.2 tls // offset from start of this table to array of ATOM_PPLIB_NONCLOCK_INFO
158 1.1.1.1.6.2 tls USHORT usNonClockInfoArrayOffset;
159 1.1.1.1.6.2 tls
160 1.1.1.1.6.2 tls USHORT usBackbiasTime; // in microseconds
161 1.1.1.1.6.2 tls USHORT usVoltageTime; // in microseconds
162 1.1.1.1.6.2 tls USHORT usTableSize; //the size of this structure, or the extended structure
163 1.1.1.1.6.2 tls
164 1.1.1.1.6.2 tls ULONG ulPlatformCaps; // See ATOM_PPLIB_CAPS_*
165 1.1.1.1.6.2 tls
166 1.1.1.1.6.2 tls ATOM_PPLIB_THERMALCONTROLLER sThermalController;
167 1.1.1.1.6.2 tls
168 1.1.1.1.6.2 tls USHORT usBootClockInfoOffset;
169 1.1.1.1.6.2 tls USHORT usBootNonClockInfoOffset;
170 1.1.1.1.6.2 tls
171 1.1.1.1.6.2 tls } ATOM_PPLIB_POWERPLAYTABLE;
172 1.1.1.1.6.2 tls
173 1.1.1.1.6.2 tls typedef struct _ATOM_PPLIB_POWERPLAYTABLE2
174 1.1.1.1.6.2 tls {
175 1.1.1.1.6.2 tls ATOM_PPLIB_POWERPLAYTABLE basicTable;
176 1.1.1.1.6.2 tls UCHAR ucNumCustomThermalPolicy;
177 1.1.1.1.6.2 tls USHORT usCustomThermalPolicyArrayOffset;
178 1.1.1.1.6.2 tls }ATOM_PPLIB_POWERPLAYTABLE2, *LPATOM_PPLIB_POWERPLAYTABLE2;
179 1.1.1.1.6.2 tls
180 1.1.1.1.6.2 tls typedef struct _ATOM_PPLIB_POWERPLAYTABLE3
181 1.1.1.1.6.2 tls {
182 1.1.1.1.6.2 tls ATOM_PPLIB_POWERPLAYTABLE2 basicTable2;
183 1.1.1.1.6.2 tls USHORT usFormatID; // To be used ONLY by PPGen.
184 1.1.1.1.6.2 tls USHORT usFanTableOffset;
185 1.1.1.1.6.2 tls USHORT usExtendendedHeaderOffset;
186 1.1.1.1.6.2 tls } ATOM_PPLIB_POWERPLAYTABLE3, *LPATOM_PPLIB_POWERPLAYTABLE3;
187 1.1.1.1.6.2 tls
188 1.1.1.1.6.2 tls typedef struct _ATOM_PPLIB_POWERPLAYTABLE4
189 1.1.1.1.6.2 tls {
190 1.1.1.1.6.2 tls ATOM_PPLIB_POWERPLAYTABLE3 basicTable3;
191 1.1.1.1.6.2 tls ULONG ulGoldenPPID; // PPGen use only
192 1.1.1.1.6.2 tls ULONG ulGoldenRevision; // PPGen use only
193 1.1.1.1.6.2 tls USHORT usVddcDependencyOnSCLKOffset;
194 1.1.1.1.6.2 tls USHORT usVddciDependencyOnMCLKOffset;
195 1.1.1.1.6.2 tls USHORT usVddcDependencyOnMCLKOffset;
196 1.1.1.1.6.2 tls USHORT usMaxClockVoltageOnDCOffset;
197 1.1.1.1.6.2 tls USHORT usVddcPhaseShedLimitsTableOffset; // Points to ATOM_PPLIB_PhaseSheddingLimits_Table
198 1.1.1.1.6.2 tls USHORT usMvddDependencyOnMCLKOffset;
199 1.1.1.1.6.2 tls } ATOM_PPLIB_POWERPLAYTABLE4, *LPATOM_PPLIB_POWERPLAYTABLE4;
200 1.1.1.1.6.2 tls
201 1.1.1.1.6.2 tls typedef struct _ATOM_PPLIB_POWERPLAYTABLE5
202 1.1.1.1.6.2 tls {
203 1.1.1.1.6.2 tls ATOM_PPLIB_POWERPLAYTABLE4 basicTable4;
204 1.1.1.1.6.2 tls ULONG ulTDPLimit;
205 1.1.1.1.6.2 tls ULONG ulNearTDPLimit;
206 1.1.1.1.6.2 tls ULONG ulSQRampingThreshold;
207 1.1.1.1.6.2 tls USHORT usCACLeakageTableOffset; // Points to ATOM_PPLIB_CAC_Leakage_Table
208 1.1.1.1.6.2 tls ULONG ulCACLeakage; // The iLeakage for driver calculated CAC leakage table
209 1.1.1.1.6.2 tls USHORT usTDPODLimit;
210 1.1.1.1.6.2 tls USHORT usLoadLineSlope; // in milliOhms * 100
211 1.1.1.1.6.2 tls } ATOM_PPLIB_POWERPLAYTABLE5, *LPATOM_PPLIB_POWERPLAYTABLE5;
212 1.1.1.1.6.2 tls
213 1.1.1.1.6.2 tls //// ATOM_PPLIB_NONCLOCK_INFO::usClassification
214 1.1.1.1.6.2 tls #define ATOM_PPLIB_CLASSIFICATION_UI_MASK 0x0007
215 1.1.1.1.6.2 tls #define ATOM_PPLIB_CLASSIFICATION_UI_SHIFT 0
216 1.1.1.1.6.2 tls #define ATOM_PPLIB_CLASSIFICATION_UI_NONE 0
217 1.1.1.1.6.2 tls #define ATOM_PPLIB_CLASSIFICATION_UI_BATTERY 1
218 1.1.1.1.6.2 tls #define ATOM_PPLIB_CLASSIFICATION_UI_BALANCED 3
219 1.1.1.1.6.2 tls #define ATOM_PPLIB_CLASSIFICATION_UI_PERFORMANCE 5
220 1.1.1.1.6.2 tls // 2, 4, 6, 7 are reserved
221 1.1.1.1.6.2 tls
222 1.1.1.1.6.2 tls #define ATOM_PPLIB_CLASSIFICATION_BOOT 0x0008
223 1.1.1.1.6.2 tls #define ATOM_PPLIB_CLASSIFICATION_THERMAL 0x0010
224 1.1.1.1.6.2 tls #define ATOM_PPLIB_CLASSIFICATION_LIMITEDPOWERSOURCE 0x0020
225 1.1.1.1.6.2 tls #define ATOM_PPLIB_CLASSIFICATION_REST 0x0040
226 1.1.1.1.6.2 tls #define ATOM_PPLIB_CLASSIFICATION_FORCED 0x0080
227 1.1.1.1.6.2 tls #define ATOM_PPLIB_CLASSIFICATION_3DPERFORMANCE 0x0100
228 1.1.1.1.6.2 tls #define ATOM_PPLIB_CLASSIFICATION_OVERDRIVETEMPLATE 0x0200
229 1.1.1.1.6.2 tls #define ATOM_PPLIB_CLASSIFICATION_UVDSTATE 0x0400
230 1.1.1.1.6.2 tls #define ATOM_PPLIB_CLASSIFICATION_3DLOW 0x0800
231 1.1.1.1.6.2 tls #define ATOM_PPLIB_CLASSIFICATION_ACPI 0x1000
232 1.1.1.1.6.2 tls #define ATOM_PPLIB_CLASSIFICATION_HD2STATE 0x2000
233 1.1.1.1.6.2 tls #define ATOM_PPLIB_CLASSIFICATION_HDSTATE 0x4000
234 1.1.1.1.6.2 tls #define ATOM_PPLIB_CLASSIFICATION_SDSTATE 0x8000
235 1.1.1.1.6.2 tls
236 1.1.1.1.6.2 tls //// ATOM_PPLIB_NONCLOCK_INFO::usClassification2
237 1.1.1.1.6.2 tls #define ATOM_PPLIB_CLASSIFICATION2_LIMITEDPOWERSOURCE_2 0x0001
238 1.1.1.1.6.2 tls #define ATOM_PPLIB_CLASSIFICATION2_ULV 0x0002
239 1.1.1.1.6.2 tls #define ATOM_PPLIB_CLASSIFICATION2_MVC 0x0004 //Multi-View Codec (BD-3D)
240 1.1.1.1.6.2 tls
241 1.1.1.1.6.2 tls //// ATOM_PPLIB_NONCLOCK_INFO::ulCapsAndSettings
242 1.1.1.1.6.2 tls #define ATOM_PPLIB_SINGLE_DISPLAY_ONLY 0x00000001
243 1.1.1.1.6.2 tls #define ATOM_PPLIB_SUPPORTS_VIDEO_PLAYBACK 0x00000002
244 1.1.1.1.6.2 tls
245 1.1.1.1.6.2 tls // 0 is 2.5Gb/s, 1 is 5Gb/s
246 1.1.1.1.6.2 tls #define ATOM_PPLIB_PCIE_LINK_SPEED_MASK 0x00000004
247 1.1.1.1.6.2 tls #define ATOM_PPLIB_PCIE_LINK_SPEED_SHIFT 2
248 1.1.1.1.6.2 tls
249 1.1.1.1.6.2 tls // lanes - 1: 1, 2, 4, 8, 12, 16 permitted by PCIE spec
250 1.1.1.1.6.2 tls #define ATOM_PPLIB_PCIE_LINK_WIDTH_MASK 0x000000F8
251 1.1.1.1.6.2 tls #define ATOM_PPLIB_PCIE_LINK_WIDTH_SHIFT 3
252 1.1.1.1.6.2 tls
253 1.1.1.1.6.2 tls // lookup into reduced refresh-rate table
254 1.1.1.1.6.2 tls #define ATOM_PPLIB_LIMITED_REFRESHRATE_VALUE_MASK 0x00000F00
255 1.1.1.1.6.2 tls #define ATOM_PPLIB_LIMITED_REFRESHRATE_VALUE_SHIFT 8
256 1.1.1.1.6.2 tls
257 1.1.1.1.6.2 tls #define ATOM_PPLIB_LIMITED_REFRESHRATE_UNLIMITED 0
258 1.1.1.1.6.2 tls #define ATOM_PPLIB_LIMITED_REFRESHRATE_50HZ 1
259 1.1.1.1.6.2 tls // 2-15 TBD as needed.
260 1.1.1.1.6.2 tls
261 1.1.1.1.6.2 tls #define ATOM_PPLIB_SOFTWARE_DISABLE_LOADBALANCING 0x00001000
262 1.1.1.1.6.2 tls #define ATOM_PPLIB_SOFTWARE_ENABLE_SLEEP_FOR_TIMESTAMPS 0x00002000
263 1.1.1.1.6.2 tls
264 1.1.1.1.6.2 tls #define ATOM_PPLIB_DISALLOW_ON_DC 0x00004000
265 1.1.1.1.6.2 tls
266 1.1.1.1.6.2 tls #define ATOM_PPLIB_ENABLE_VARIBRIGHT 0x00008000
267 1.1.1.1.6.2 tls
268 1.1.1.1.6.2 tls //memory related flags
269 1.1.1.1.6.2 tls #define ATOM_PPLIB_SWSTATE_MEMORY_DLL_OFF 0x000010000
270 1.1.1.1.6.2 tls
271 1.1.1.1.6.2 tls //M3 Arb //2bits, current 3 sets of parameters in total
272 1.1.1.1.6.2 tls #define ATOM_PPLIB_M3ARB_MASK 0x00060000
273 1.1.1.1.6.2 tls #define ATOM_PPLIB_M3ARB_SHIFT 17
274 1.1.1.1.6.2 tls
275 1.1.1.1.6.2 tls #define ATOM_PPLIB_ENABLE_DRR 0x00080000
276 1.1.1.1.6.2 tls
277 1.1.1.1.6.2 tls // remaining 16 bits are reserved
278 1.1.1.1.6.2 tls typedef struct _ATOM_PPLIB_THERMAL_STATE
279 1.1.1.1.6.2 tls {
280 1.1.1.1.6.2 tls UCHAR ucMinTemperature;
281 1.1.1.1.6.2 tls UCHAR ucMaxTemperature;
282 1.1.1.1.6.2 tls UCHAR ucThermalAction;
283 1.1.1.1.6.2 tls }ATOM_PPLIB_THERMAL_STATE, *LPATOM_PPLIB_THERMAL_STATE;
284 1.1.1.1.6.2 tls
285 1.1.1.1.6.2 tls // Contained in an array starting at the offset
286 1.1.1.1.6.2 tls // in ATOM_PPLIB_POWERPLAYTABLE::usNonClockInfoArrayOffset.
287 1.1.1.1.6.2 tls // referenced from ATOM_PPLIB_STATE_INFO::ucNonClockStateIndex
288 1.1.1.1.6.2 tls #define ATOM_PPLIB_NONCLOCKINFO_VER1 12
289 1.1.1.1.6.2 tls #define ATOM_PPLIB_NONCLOCKINFO_VER2 24
290 1.1.1.1.6.2 tls typedef struct _ATOM_PPLIB_NONCLOCK_INFO
291 1.1.1.1.6.2 tls {
292 1.1.1.1.6.2 tls USHORT usClassification;
293 1.1.1.1.6.2 tls UCHAR ucMinTemperature;
294 1.1.1.1.6.2 tls UCHAR ucMaxTemperature;
295 1.1.1.1.6.2 tls ULONG ulCapsAndSettings;
296 1.1.1.1.6.2 tls UCHAR ucRequiredPower;
297 1.1.1.1.6.2 tls USHORT usClassification2;
298 1.1.1.1.6.2 tls ULONG ulVCLK;
299 1.1.1.1.6.2 tls ULONG ulDCLK;
300 1.1.1.1.6.2 tls UCHAR ucUnused[5];
301 1.1.1.1.6.2 tls } ATOM_PPLIB_NONCLOCK_INFO;
302 1.1.1.1.6.2 tls
303 1.1.1.1.6.2 tls // Contained in an array starting at the offset
304 1.1.1.1.6.2 tls // in ATOM_PPLIB_POWERPLAYTABLE::usClockInfoArrayOffset.
305 1.1.1.1.6.2 tls // referenced from ATOM_PPLIB_STATE::ucClockStateIndices
306 1.1.1.1.6.2 tls typedef struct _ATOM_PPLIB_R600_CLOCK_INFO
307 1.1.1.1.6.2 tls {
308 1.1.1.1.6.2 tls USHORT usEngineClockLow;
309 1.1.1.1.6.2 tls UCHAR ucEngineClockHigh;
310 1.1.1.1.6.2 tls
311 1.1.1.1.6.2 tls USHORT usMemoryClockLow;
312 1.1.1.1.6.2 tls UCHAR ucMemoryClockHigh;
313 1.1.1.1.6.2 tls
314 1.1.1.1.6.2 tls USHORT usVDDC;
315 1.1.1.1.6.2 tls USHORT usUnused1;
316 1.1.1.1.6.2 tls USHORT usUnused2;
317 1.1.1.1.6.2 tls
318 1.1.1.1.6.2 tls ULONG ulFlags; // ATOM_PPLIB_R600_FLAGS_*
319 1.1.1.1.6.2 tls
320 1.1.1.1.6.2 tls } ATOM_PPLIB_R600_CLOCK_INFO;
321 1.1.1.1.6.2 tls
322 1.1.1.1.6.2 tls // ulFlags in ATOM_PPLIB_R600_CLOCK_INFO
323 1.1.1.1.6.2 tls #define ATOM_PPLIB_R600_FLAGS_PCIEGEN2 1
324 1.1.1.1.6.2 tls #define ATOM_PPLIB_R600_FLAGS_UVDSAFE 2
325 1.1.1.1.6.2 tls #define ATOM_PPLIB_R600_FLAGS_BACKBIASENABLE 4
326 1.1.1.1.6.2 tls #define ATOM_PPLIB_R600_FLAGS_MEMORY_ODT_OFF 8
327 1.1.1.1.6.2 tls #define ATOM_PPLIB_R600_FLAGS_MEMORY_DLL_OFF 16
328 1.1.1.1.6.2 tls #define ATOM_PPLIB_R600_FLAGS_LOWPOWER 32 // On the RV770 use 'low power' setting (sequencer S0).
329 1.1.1.1.6.2 tls
330 1.1.1.1.6.2 tls typedef struct _ATOM_PPLIB_RS780_CLOCK_INFO
331 1.1.1.1.6.2 tls
332 1.1.1.1.6.2 tls {
333 1.1.1.1.6.2 tls USHORT usLowEngineClockLow; // Low Engine clock in MHz (the same way as on the R600).
334 1.1.1.1.6.2 tls UCHAR ucLowEngineClockHigh;
335 1.1.1.1.6.2 tls USHORT usHighEngineClockLow; // High Engine clock in MHz.
336 1.1.1.1.6.2 tls UCHAR ucHighEngineClockHigh;
337 1.1.1.1.6.2 tls USHORT usMemoryClockLow; // For now one of the ATOM_PPLIB_RS780_SPMCLK_XXXX constants.
338 1.1.1.1.6.2 tls UCHAR ucMemoryClockHigh; // Currentyl unused.
339 1.1.1.1.6.2 tls UCHAR ucPadding; // For proper alignment and size.
340 1.1.1.1.6.2 tls USHORT usVDDC; // For the 780, use: None, Low, High, Variable
341 1.1.1.1.6.2 tls UCHAR ucMaxHTLinkWidth; // From SBIOS - {2, 4, 8, 16}
342 1.1.1.1.6.2 tls UCHAR ucMinHTLinkWidth; // From SBIOS - {2, 4, 8, 16}. Effective only if CDLW enabled. Minimum down stream width could
343 1.1.1.1.6.2 tls USHORT usHTLinkFreq; // See definition ATOM_PPLIB_RS780_HTLINKFREQ_xxx or in MHz(>=200).
344 1.1.1.1.6.2 tls ULONG ulFlags;
345 1.1.1.1.6.2 tls } ATOM_PPLIB_RS780_CLOCK_INFO;
346 1.1.1.1.6.2 tls
347 1.1.1.1.6.2 tls #define ATOM_PPLIB_RS780_VOLTAGE_NONE 0
348 1.1.1.1.6.2 tls #define ATOM_PPLIB_RS780_VOLTAGE_LOW 1
349 1.1.1.1.6.2 tls #define ATOM_PPLIB_RS780_VOLTAGE_HIGH 2
350 1.1.1.1.6.2 tls #define ATOM_PPLIB_RS780_VOLTAGE_VARIABLE 3
351 1.1.1.1.6.2 tls
352 1.1.1.1.6.2 tls #define ATOM_PPLIB_RS780_SPMCLK_NONE 0 // We cannot change the side port memory clock, leave it as it is.
353 1.1.1.1.6.2 tls #define ATOM_PPLIB_RS780_SPMCLK_LOW 1
354 1.1.1.1.6.2 tls #define ATOM_PPLIB_RS780_SPMCLK_HIGH 2
355 1.1.1.1.6.2 tls
356 1.1.1.1.6.2 tls #define ATOM_PPLIB_RS780_HTLINKFREQ_NONE 0
357 1.1.1.1.6.2 tls #define ATOM_PPLIB_RS780_HTLINKFREQ_LOW 1
358 1.1.1.1.6.2 tls #define ATOM_PPLIB_RS780_HTLINKFREQ_HIGH 2
359 1.1.1.1.6.2 tls
360 1.1.1.1.6.2 tls typedef struct _ATOM_PPLIB_EVERGREEN_CLOCK_INFO
361 1.1.1.1.6.2 tls {
362 1.1.1.1.6.2 tls USHORT usEngineClockLow;
363 1.1.1.1.6.2 tls UCHAR ucEngineClockHigh;
364 1.1.1.1.6.2 tls
365 1.1.1.1.6.2 tls USHORT usMemoryClockLow;
366 1.1.1.1.6.2 tls UCHAR ucMemoryClockHigh;
367 1.1.1.1.6.2 tls
368 1.1.1.1.6.2 tls USHORT usVDDC;
369 1.1.1.1.6.2 tls USHORT usVDDCI;
370 1.1.1.1.6.2 tls USHORT usUnused;
371 1.1.1.1.6.2 tls
372 1.1.1.1.6.2 tls ULONG ulFlags; // ATOM_PPLIB_R600_FLAGS_*
373 1.1.1.1.6.2 tls
374 1.1.1.1.6.2 tls } ATOM_PPLIB_EVERGREEN_CLOCK_INFO;
375 1.1.1.1.6.2 tls
376 1.1.1.1.6.2 tls typedef struct _ATOM_PPLIB_SI_CLOCK_INFO
377 1.1.1.1.6.2 tls {
378 1.1.1.1.6.2 tls USHORT usEngineClockLow;
379 1.1.1.1.6.2 tls UCHAR ucEngineClockHigh;
380 1.1.1.1.6.2 tls
381 1.1.1.1.6.2 tls USHORT usMemoryClockLow;
382 1.1.1.1.6.2 tls UCHAR ucMemoryClockHigh;
383 1.1.1.1.6.2 tls
384 1.1.1.1.6.2 tls USHORT usVDDC;
385 1.1.1.1.6.2 tls USHORT usVDDCI;
386 1.1.1.1.6.2 tls UCHAR ucPCIEGen;
387 1.1.1.1.6.2 tls UCHAR ucUnused1;
388 1.1.1.1.6.2 tls
389 1.1.1.1.6.2 tls ULONG ulFlags; // ATOM_PPLIB_SI_FLAGS_*, no flag is necessary for now
390 1.1.1.1.6.2 tls
391 1.1.1.1.6.2 tls } ATOM_PPLIB_SI_CLOCK_INFO;
392 1.1.1.1.6.2 tls
393 1.1.1.1.6.2 tls typedef struct _ATOM_PPLIB_CI_CLOCK_INFO
394 1.1.1.1.6.2 tls {
395 1.1.1.1.6.2 tls USHORT usEngineClockLow;
396 1.1.1.1.6.2 tls UCHAR ucEngineClockHigh;
397 1.1.1.1.6.2 tls
398 1.1.1.1.6.2 tls USHORT usMemoryClockLow;
399 1.1.1.1.6.2 tls UCHAR ucMemoryClockHigh;
400 1.1.1.1.6.2 tls
401 1.1.1.1.6.2 tls UCHAR ucPCIEGen;
402 1.1.1.1.6.2 tls USHORT usPCIELane;
403 1.1.1.1.6.2 tls } ATOM_PPLIB_CI_CLOCK_INFO;
404 1.1.1.1.6.2 tls
405 1.1.1.1.6.2 tls typedef struct _ATOM_PPLIB_SUMO_CLOCK_INFO{
406 1.1.1.1.6.2 tls USHORT usEngineClockLow; //clockfrequency & 0xFFFF. The unit is in 10khz
407 1.1.1.1.6.2 tls UCHAR ucEngineClockHigh; //clockfrequency >> 16.
408 1.1.1.1.6.2 tls UCHAR vddcIndex; //2-bit vddc index;
409 1.1.1.1.6.2 tls USHORT tdpLimit;
410 1.1.1.1.6.2 tls //please initalize to 0
411 1.1.1.1.6.2 tls USHORT rsv1;
412 1.1.1.1.6.2 tls //please initialize to 0s
413 1.1.1.1.6.2 tls ULONG rsv2[2];
414 1.1.1.1.6.2 tls }ATOM_PPLIB_SUMO_CLOCK_INFO;
415 1.1.1.1.6.2 tls
416 1.1.1.1.6.2 tls typedef struct _ATOM_PPLIB_STATE_V2
417 1.1.1.1.6.2 tls {
418 1.1.1.1.6.2 tls //number of valid dpm levels in this state; Driver uses it to calculate the whole
419 1.1.1.1.6.2 tls //size of the state: sizeof(ATOM_PPLIB_STATE_V2) + (ucNumDPMLevels - 1) * sizeof(UCHAR)
420 1.1.1.1.6.2 tls UCHAR ucNumDPMLevels;
421 1.1.1.1.6.2 tls
422 1.1.1.1.6.2 tls //a index to the array of nonClockInfos
423 1.1.1.1.6.2 tls UCHAR nonClockInfoIndex;
424 1.1.1.1.6.2 tls /**
425 1.1.1.1.6.2 tls * Driver will read the first ucNumDPMLevels in this array
426 1.1.1.1.6.2 tls */
427 1.1.1.1.6.2 tls UCHAR clockInfoIndex[1];
428 1.1.1.1.6.2 tls } ATOM_PPLIB_STATE_V2;
429 1.1.1.1.6.2 tls
430 1.1.1.1.6.2 tls typedef struct _StateArray{
431 1.1.1.1.6.2 tls //how many states we have
432 1.1.1.1.6.2 tls UCHAR ucNumEntries;
433 1.1.1.1.6.2 tls
434 1.1.1.1.6.2 tls ATOM_PPLIB_STATE_V2 states[1];
435 1.1.1.1.6.2 tls }StateArray;
436 1.1.1.1.6.2 tls
437 1.1.1.1.6.2 tls
438 1.1.1.1.6.2 tls typedef struct _ClockInfoArray{
439 1.1.1.1.6.2 tls //how many clock levels we have
440 1.1.1.1.6.2 tls UCHAR ucNumEntries;
441 1.1.1.1.6.2 tls
442 1.1.1.1.6.2 tls //sizeof(ATOM_PPLIB_CLOCK_INFO)
443 1.1.1.1.6.2 tls UCHAR ucEntrySize;
444 1.1.1.1.6.2 tls
445 1.1.1.1.6.2 tls UCHAR clockInfo[1];
446 1.1.1.1.6.2 tls }ClockInfoArray;
447 1.1.1.1.6.2 tls
448 1.1.1.1.6.2 tls typedef struct _NonClockInfoArray{
449 1.1.1.1.6.2 tls
450 1.1.1.1.6.2 tls //how many non-clock levels we have. normally should be same as number of states
451 1.1.1.1.6.2 tls UCHAR ucNumEntries;
452 1.1.1.1.6.2 tls //sizeof(ATOM_PPLIB_NONCLOCK_INFO)
453 1.1.1.1.6.2 tls UCHAR ucEntrySize;
454 1.1.1.1.6.2 tls
455 1.1.1.1.6.2 tls ATOM_PPLIB_NONCLOCK_INFO nonClockInfo[1];
456 1.1.1.1.6.2 tls }NonClockInfoArray;
457 1.1.1.1.6.2 tls
458 1.1.1.1.6.2 tls typedef struct _ATOM_PPLIB_Clock_Voltage_Dependency_Record
459 1.1.1.1.6.2 tls {
460 1.1.1.1.6.2 tls USHORT usClockLow;
461 1.1.1.1.6.2 tls UCHAR ucClockHigh;
462 1.1.1.1.6.2 tls USHORT usVoltage;
463 1.1.1.1.6.2 tls }ATOM_PPLIB_Clock_Voltage_Dependency_Record;
464 1.1.1.1.6.2 tls
465 1.1.1.1.6.2 tls typedef struct _ATOM_PPLIB_Clock_Voltage_Dependency_Table
466 1.1.1.1.6.2 tls {
467 1.1.1.1.6.2 tls UCHAR ucNumEntries; // Number of entries.
468 1.1.1.1.6.2 tls ATOM_PPLIB_Clock_Voltage_Dependency_Record entries[1]; // Dynamically allocate entries.
469 1.1.1.1.6.2 tls }ATOM_PPLIB_Clock_Voltage_Dependency_Table;
470 1.1.1.1.6.2 tls
471 1.1.1.1.6.2 tls typedef struct _ATOM_PPLIB_Clock_Voltage_Limit_Record
472 1.1.1.1.6.2 tls {
473 1.1.1.1.6.2 tls USHORT usSclkLow;
474 1.1.1.1.6.2 tls UCHAR ucSclkHigh;
475 1.1.1.1.6.2 tls USHORT usMclkLow;
476 1.1.1.1.6.2 tls UCHAR ucMclkHigh;
477 1.1.1.1.6.2 tls USHORT usVddc;
478 1.1.1.1.6.2 tls USHORT usVddci;
479 1.1.1.1.6.2 tls }ATOM_PPLIB_Clock_Voltage_Limit_Record;
480 1.1.1.1.6.2 tls
481 1.1.1.1.6.2 tls typedef struct _ATOM_PPLIB_Clock_Voltage_Limit_Table
482 1.1.1.1.6.2 tls {
483 1.1.1.1.6.2 tls UCHAR ucNumEntries; // Number of entries.
484 1.1.1.1.6.2 tls ATOM_PPLIB_Clock_Voltage_Limit_Record entries[1]; // Dynamically allocate entries.
485 1.1.1.1.6.2 tls }ATOM_PPLIB_Clock_Voltage_Limit_Table;
486 1.1.1.1.6.2 tls
487 1.1.1.1.6.2 tls union _ATOM_PPLIB_CAC_Leakage_Record
488 1.1.1.1.6.2 tls {
489 1.1.1.1.6.2 tls struct
490 1.1.1.1.6.2 tls {
491 1.1.1.1.6.2 tls USHORT usVddc; // We use this field for the "fake" standardized VDDC for power calculations; For CI and newer, we use this as the real VDDC value. in CI we read it as StdVoltageHiSidd
492 1.1.1.1.6.2 tls ULONG ulLeakageValue; // For CI and newer we use this as the "fake" standar VDDC value. in CI we read it as StdVoltageLoSidd
493 1.1.1.1.6.2 tls
494 1.1.1.1.6.2 tls };
495 1.1.1.1.6.2 tls struct
496 1.1.1.1.6.2 tls {
497 1.1.1.1.6.2 tls USHORT usVddc1;
498 1.1.1.1.6.2 tls USHORT usVddc2;
499 1.1.1.1.6.2 tls USHORT usVddc3;
500 1.1.1.1.6.2 tls };
501 1.1.1.1.6.2 tls };
502 1.1.1.1.6.2 tls
503 1.1.1.1.6.2 tls typedef union _ATOM_PPLIB_CAC_Leakage_Record ATOM_PPLIB_CAC_Leakage_Record;
504 1.1.1.1.6.2 tls
505 1.1.1.1.6.2 tls typedef struct _ATOM_PPLIB_CAC_Leakage_Table
506 1.1.1.1.6.2 tls {
507 1.1.1.1.6.2 tls UCHAR ucNumEntries; // Number of entries.
508 1.1.1.1.6.2 tls ATOM_PPLIB_CAC_Leakage_Record entries[1]; // Dynamically allocate entries.
509 1.1.1.1.6.2 tls }ATOM_PPLIB_CAC_Leakage_Table;
510 1.1.1.1.6.2 tls
511 1.1.1.1.6.2 tls typedef struct _ATOM_PPLIB_PhaseSheddingLimits_Record
512 1.1.1.1.6.2 tls {
513 1.1.1.1.6.2 tls USHORT usVoltage;
514 1.1.1.1.6.2 tls USHORT usSclkLow;
515 1.1.1.1.6.2 tls UCHAR ucSclkHigh;
516 1.1.1.1.6.2 tls USHORT usMclkLow;
517 1.1.1.1.6.2 tls UCHAR ucMclkHigh;
518 1.1.1.1.6.2 tls }ATOM_PPLIB_PhaseSheddingLimits_Record;
519 1.1.1.1.6.2 tls
520 1.1.1.1.6.2 tls typedef struct _ATOM_PPLIB_PhaseSheddingLimits_Table
521 1.1.1.1.6.2 tls {
522 1.1.1.1.6.2 tls UCHAR ucNumEntries; // Number of entries.
523 1.1.1.1.6.2 tls ATOM_PPLIB_PhaseSheddingLimits_Record entries[1]; // Dynamically allocate entries.
524 1.1.1.1.6.2 tls }ATOM_PPLIB_PhaseSheddingLimits_Table;
525 1.1.1.1.6.2 tls
526 1.1.1.1.6.2 tls typedef struct _VCEClockInfo{
527 1.1.1.1.6.2 tls USHORT usEVClkLow;
528 1.1.1.1.6.2 tls UCHAR ucEVClkHigh;
529 1.1.1.1.6.2 tls USHORT usECClkLow;
530 1.1.1.1.6.2 tls UCHAR ucECClkHigh;
531 1.1.1.1.6.2 tls }VCEClockInfo;
532 1.1.1.1.6.2 tls
533 1.1.1.1.6.2 tls typedef struct _VCEClockInfoArray{
534 1.1.1.1.6.2 tls UCHAR ucNumEntries;
535 1.1.1.1.6.2 tls VCEClockInfo entries[1];
536 1.1.1.1.6.2 tls }VCEClockInfoArray;
537 1.1.1.1.6.2 tls
538 1.1.1.1.6.2 tls typedef struct _ATOM_PPLIB_VCE_Clock_Voltage_Limit_Record
539 1.1.1.1.6.2 tls {
540 1.1.1.1.6.2 tls USHORT usVoltage;
541 1.1.1.1.6.2 tls UCHAR ucVCEClockInfoIndex;
542 1.1.1.1.6.2 tls }ATOM_PPLIB_VCE_Clock_Voltage_Limit_Record;
543 1.1.1.1.6.2 tls
544 1.1.1.1.6.2 tls typedef struct _ATOM_PPLIB_VCE_Clock_Voltage_Limit_Table
545 1.1.1.1.6.2 tls {
546 1.1.1.1.6.2 tls UCHAR numEntries;
547 1.1.1.1.6.2 tls ATOM_PPLIB_VCE_Clock_Voltage_Limit_Record entries[1];
548 1.1.1.1.6.2 tls }ATOM_PPLIB_VCE_Clock_Voltage_Limit_Table;
549 1.1.1.1.6.2 tls
550 1.1.1.1.6.2 tls typedef struct _ATOM_PPLIB_VCE_State_Record
551 1.1.1.1.6.2 tls {
552 1.1.1.1.6.2 tls UCHAR ucVCEClockInfoIndex;
553 1.1.1.1.6.2 tls UCHAR ucClockInfoIndex; //highest 2 bits indicates memory p-states, lower 6bits indicates index to ClockInfoArrary
554 1.1.1.1.6.2 tls }ATOM_PPLIB_VCE_State_Record;
555 1.1.1.1.6.2 tls
556 1.1.1.1.6.2 tls typedef struct _ATOM_PPLIB_VCE_State_Table
557 1.1.1.1.6.2 tls {
558 1.1.1.1.6.2 tls UCHAR numEntries;
559 1.1.1.1.6.2 tls ATOM_PPLIB_VCE_State_Record entries[1];
560 1.1.1.1.6.2 tls }ATOM_PPLIB_VCE_State_Table;
561 1.1.1.1.6.2 tls
562 1.1.1.1.6.2 tls
563 1.1.1.1.6.2 tls typedef struct _ATOM_PPLIB_VCE_Table
564 1.1.1.1.6.2 tls {
565 1.1.1.1.6.2 tls UCHAR revid;
566 1.1.1.1.6.2 tls // VCEClockInfoArray array;
567 1.1.1.1.6.2 tls // ATOM_PPLIB_VCE_Clock_Voltage_Limit_Table limits;
568 1.1.1.1.6.2 tls // ATOM_PPLIB_VCE_State_Table states;
569 1.1.1.1.6.2 tls }ATOM_PPLIB_VCE_Table;
570 1.1.1.1.6.2 tls
571 1.1.1.1.6.2 tls
572 1.1.1.1.6.2 tls typedef struct _UVDClockInfo{
573 1.1.1.1.6.2 tls USHORT usVClkLow;
574 1.1.1.1.6.2 tls UCHAR ucVClkHigh;
575 1.1.1.1.6.2 tls USHORT usDClkLow;
576 1.1.1.1.6.2 tls UCHAR ucDClkHigh;
577 1.1.1.1.6.2 tls }UVDClockInfo;
578 1.1.1.1.6.2 tls
579 1.1.1.1.6.2 tls typedef struct _UVDClockInfoArray{
580 1.1.1.1.6.2 tls UCHAR ucNumEntries;
581 1.1.1.1.6.2 tls UVDClockInfo entries[1];
582 1.1.1.1.6.2 tls }UVDClockInfoArray;
583 1.1.1.1.6.2 tls
584 1.1.1.1.6.2 tls typedef struct _ATOM_PPLIB_UVD_Clock_Voltage_Limit_Record
585 1.1.1.1.6.2 tls {
586 1.1.1.1.6.2 tls USHORT usVoltage;
587 1.1.1.1.6.2 tls UCHAR ucUVDClockInfoIndex;
588 1.1.1.1.6.2 tls }ATOM_PPLIB_UVD_Clock_Voltage_Limit_Record;
589 1.1.1.1.6.2 tls
590 1.1.1.1.6.2 tls typedef struct _ATOM_PPLIB_UVD_Clock_Voltage_Limit_Table
591 1.1.1.1.6.2 tls {
592 1.1.1.1.6.2 tls UCHAR numEntries;
593 1.1.1.1.6.2 tls ATOM_PPLIB_UVD_Clock_Voltage_Limit_Record entries[1];
594 1.1.1.1.6.2 tls }ATOM_PPLIB_UVD_Clock_Voltage_Limit_Table;
595 1.1.1.1.6.2 tls
596 1.1.1.1.6.2 tls typedef struct _ATOM_PPLIB_UVD_Table
597 1.1.1.1.6.2 tls {
598 1.1.1.1.6.2 tls UCHAR revid;
599 1.1.1.1.6.2 tls // UVDClockInfoArray array;
600 1.1.1.1.6.2 tls // ATOM_PPLIB_UVD_Clock_Voltage_Limit_Table limits;
601 1.1.1.1.6.2 tls }ATOM_PPLIB_UVD_Table;
602 1.1.1.1.6.2 tls
603 1.1.1.1.6.2 tls typedef struct _ATOM_PPLIB_SAMClk_Voltage_Limit_Record
604 1.1.1.1.6.2 tls {
605 1.1.1.1.6.2 tls USHORT usVoltage;
606 1.1.1.1.6.2 tls USHORT usSAMClockLow;
607 1.1.1.1.6.2 tls UCHAR ucSAMClockHigh;
608 1.1.1.1.6.2 tls }ATOM_PPLIB_SAMClk_Voltage_Limit_Record;
609 1.1.1.1.6.2 tls
610 1.1.1.1.6.2 tls typedef struct _ATOM_PPLIB_SAMClk_Voltage_Limit_Table{
611 1.1.1.1.6.2 tls UCHAR numEntries;
612 1.1.1.1.6.2 tls ATOM_PPLIB_SAMClk_Voltage_Limit_Record entries[1];
613 1.1.1.1.6.2 tls }ATOM_PPLIB_SAMClk_Voltage_Limit_Table;
614 1.1.1.1.6.2 tls
615 1.1.1.1.6.2 tls typedef struct _ATOM_PPLIB_SAMU_Table
616 1.1.1.1.6.2 tls {
617 1.1.1.1.6.2 tls UCHAR revid;
618 1.1.1.1.6.2 tls ATOM_PPLIB_SAMClk_Voltage_Limit_Table limits;
619 1.1.1.1.6.2 tls }ATOM_PPLIB_SAMU_Table;
620 1.1.1.1.6.2 tls
621 1.1.1.1.6.2 tls typedef struct _ATOM_PPLIB_ACPClk_Voltage_Limit_Record
622 1.1.1.1.6.2 tls {
623 1.1.1.1.6.2 tls USHORT usVoltage;
624 1.1.1.1.6.2 tls USHORT usACPClockLow;
625 1.1.1.1.6.2 tls UCHAR ucACPClockHigh;
626 1.1.1.1.6.2 tls }ATOM_PPLIB_ACPClk_Voltage_Limit_Record;
627 1.1.1.1.6.2 tls
628 1.1.1.1.6.2 tls typedef struct _ATOM_PPLIB_ACPClk_Voltage_Limit_Table{
629 1.1.1.1.6.2 tls UCHAR numEntries;
630 1.1.1.1.6.2 tls ATOM_PPLIB_ACPClk_Voltage_Limit_Record entries[1];
631 1.1.1.1.6.2 tls }ATOM_PPLIB_ACPClk_Voltage_Limit_Table;
632 1.1.1.1.6.2 tls
633 1.1.1.1.6.2 tls typedef struct _ATOM_PPLIB_ACP_Table
634 1.1.1.1.6.2 tls {
635 1.1.1.1.6.2 tls UCHAR revid;
636 1.1.1.1.6.2 tls ATOM_PPLIB_ACPClk_Voltage_Limit_Table limits;
637 1.1.1.1.6.2 tls }ATOM_PPLIB_ACP_Table;
638 1.1.1.1.6.2 tls
639 1.1.1.1.6.2 tls typedef struct _ATOM_PowerTune_Table{
640 1.1.1.1.6.2 tls USHORT usTDP;
641 1.1.1.1.6.2 tls USHORT usConfigurableTDP;
642 1.1.1.1.6.2 tls USHORT usTDC;
643 1.1.1.1.6.2 tls USHORT usBatteryPowerLimit;
644 1.1.1.1.6.2 tls USHORT usSmallPowerLimit;
645 1.1.1.1.6.2 tls USHORT usLowCACLeakage;
646 1.1.1.1.6.2 tls USHORT usHighCACLeakage;
647 1.1.1.1.6.2 tls }ATOM_PowerTune_Table;
648 1.1.1.1.6.2 tls
649 1.1.1.1.6.2 tls typedef struct _ATOM_PPLIB_POWERTUNE_Table
650 1.1.1.1.6.2 tls {
651 1.1.1.1.6.2 tls UCHAR revid;
652 1.1.1.1.6.2 tls ATOM_PowerTune_Table power_tune_table;
653 1.1.1.1.6.2 tls }ATOM_PPLIB_POWERTUNE_Table;
654 1.1.1.1.6.2 tls
655 1.1.1.1.6.2 tls typedef struct _ATOM_PPLIB_POWERTUNE_Table_V1
656 1.1.1.1.6.2 tls {
657 1.1.1.1.6.2 tls UCHAR revid;
658 1.1.1.1.6.2 tls ATOM_PowerTune_Table power_tune_table;
659 1.1.1.1.6.2 tls USHORT usMaximumPowerDeliveryLimit;
660 1.1.1.1.6.2 tls USHORT usReserve[7];
661 1.1.1.1.6.2 tls } ATOM_PPLIB_POWERTUNE_Table_V1;
662 1.1.1.1.6.2 tls
663 1.1.1.1.6.2 tls #define ATOM_PPM_A_A 1
664 1.1.1.1.6.2 tls #define ATOM_PPM_A_I 2
665 1.1.1.1.6.2 tls typedef struct _ATOM_PPLIB_PPM_Table
666 1.1.1.1.6.2 tls {
667 1.1.1.1.6.2 tls UCHAR ucRevId;
668 1.1.1.1.6.2 tls UCHAR ucPpmDesign; //A+I or A+A
669 1.1.1.1.6.2 tls USHORT usCpuCoreNumber;
670 1.1.1.1.6.2 tls ULONG ulPlatformTDP;
671 1.1.1.1.6.2 tls ULONG ulSmallACPlatformTDP;
672 1.1.1.1.6.2 tls ULONG ulPlatformTDC;
673 1.1.1.1.6.2 tls ULONG ulSmallACPlatformTDC;
674 1.1.1.1.6.2 tls ULONG ulApuTDP;
675 1.1.1.1.6.2 tls ULONG ulDGpuTDP;
676 1.1.1.1.6.2 tls ULONG ulDGpuUlvPower;
677 1.1.1.1.6.2 tls ULONG ulTjmax;
678 1.1.1.1.6.2 tls } ATOM_PPLIB_PPM_Table;
679 1.1.1.1.6.2 tls
680 1.1.1.1.6.2 tls #pragma pack()
681 1.1.1.1.6.2 tls
682 1.1.1.1.6.2 tls #endif
683