forked from sling00/atitool
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstructures.go
More file actions
280 lines (262 loc) · 7.46 KB
/
structures.go
File metadata and controls
280 lines (262 loc) · 7.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
package main
const (
AtomROMChecksumOffset = 0x21
AtomROMHeaderPtr = 0x48
AtomMaxVRAMEntries = 24
MemoryTypeGDDR1 = 0x10
MemoryTypeDDR2 = 0x20
MemoryTypeGDDR3 = 0x30
MemoryTypeGDDR4 = 0x40
MemoryTypeGDDR5 = 0x50
MemoryTypeHBM = 0x60
MemoryTypeDDR3 = 0xB0
)
type Bios struct {
AtomRomHeader AtomRomHeader
AtomDataTables AtomDataTables
AtomPowerplayTable AtomPowerplayTable
AtomPowertuneTable AtomPowertuneTable
AtomFanTable AtomFanTable
AtomMClkTable AtomMClkTable
AtomSClkTable AtomSClkTable
AtomVoltageTable AtomVoltageTable
AtomVRAMInfo AtomVRAMInfo
AtomVRAMTimingEntry []AtomVRAMTimingEntry
AtomVRAMEntry []AtomVRAMEntry
}
type AtomCommonTableHeader struct {
StructureSize int16
TableFormatRevision byte
TableContentRevision byte
}
type AtomRomHeader struct {
Header AtomCommonTableHeader
FirmWareSignature uint32
BiosRuntimeSegmentAddress uint16
ProtectedModeInfoOffset uint16
ConfigFilenameOffset uint16
CRCBlockOffset uint16
BIOSBootupMessageOffset uint16
Int10Offset uint16
PciBusDevInitCode uint16
IoBaseAddress uint16
SubsystemVendorID uint16
SubsystemID uint16
PCIInfoOffset uint16
MasterCommandTableOffset uint16
MasterDataTableOffset uint16
ExtendedFunctionCode byte
_ byte
PSPDirTableOffset uint32
VendorID uint16
DeviceID uint16
}
type AtomDataTables struct {
Header AtomCommonTableHeader
UtilityPipeLine uint16
MultimediaCapabilityInfo uint16
MultimediaConfigInfo uint16
StandardVESATiming uint16
FirmwareInfo uint16
PaletteData uint16
LCDInfo uint16
DIGTransmitterInfo uint16
SMUInfo uint16
SupportedDevicesInfo uint16
GPIOI2CInfo uint16
VRAMUsageByFirmware uint16
GPIOPinLUT uint16
VESAToInternalModeLUT uint16
GFXInfo uint16
PowerPlayInfo uint16
GPUVirtualizationInfo uint16
SaveRestoreInfo uint16
PPLLSSInfo uint16
OemInfo uint16
XTMDSInfo uint16
MclkSSInfo uint16
ObjectHeader uint16
IndirectIOAccess uint16
MCInitParameter uint16
ASICVDDCInfo uint16
ASICInternalSSInfo uint16
TVVideoMode uint16
VRAMInfo uint16
MemoryTrainingInfo uint16
IntegratedSystemInfo uint16
ASICProfilingInfo uint16
VoltageObjectInfo uint16
PowerSourceInfo uint16
ServiceInfo uint16
}
type AtomPowerplayTable struct {
Header AtomCommonTableHeader
TableRevision byte
TableSize uint16
GoldenPPID uint32
GoldenRevision uint32
FormatID uint16
VoltageTime uint16
PlatformCaps uint32
MaxODEngineClock uint32
MaxODMemoryClock uint32
PowerControlLimit uint16
UlvVoltageOffset uint16
StateArrayOffset uint16
FanTableOffset uint16
ThermalControllerOffset uint16
_ uint16
MclkDependencyTableOffset uint16
SclkDependencyTableOffset uint16
VddcLookupTableOffset uint16
VddgfxLookupTableOffset uint16
MMDependencyTableOffset uint16
VCEStateTableOffset uint16
PPMTableOffset uint16
PowerTuneTableOffset uint16
HardLimitTableOffset uint16
PCIETableOffset uint16
GPIOTableOffset uint16
_ [6]uint16
}
type AtomMClkEntry struct {
VddcInd byte
Vddci uint16
VddgfxOffset uint16
Mvdd uint16
Mclk uint32
_ uint16
}
type AtomMClkTable struct {
RevID byte
NumEntries byte
Entries []AtomMClkEntry
}
type AtomSClkEntry struct {
VddInd byte
VddcOffset uint16
Sclk uint32
EdcCurrent uint16
ReliabilityTemperature byte
CKSVOffsetandDisable byte
SclkOffset uint32
// Polaris Only, remove for compatibility with Fiji
}
type AtomSClkTable struct {
RevID byte
NumEntries byte `struct:"sizeof=Entries"`
Entries []AtomSClkEntry
}
type AtomVoltageEntry struct {
Vdd uint16
CACLow uint16
CACMid uint16
CACHigh uint16
}
type AtomVoltageTable struct {
RevID byte
NumEntries byte `struct:"sizeof=Entries"`
Entries []AtomVoltageEntry
}
type AtomFanTable struct {
RevID byte
THyst byte
TMin uint16
TMed uint16
THigh uint16
PWMMin uint16
PWMMed uint16
PWMHigh uint16
TMax uint16
FanControlMode byte
FanPWMMax uint16
FanOutputSensitivity uint16
FanRPMMax uint16
MinFanSCLKAcousticLimit uint32
TargetTemperature byte
MinimumPWMLimit byte
FanGainEdge uint16
FanGainHotspot uint16
FanGainLiquid uint16
FanGainVrVddc uint16
FanGainVrMvdd uint16
FanGainPlx uint16
FanGainHbm uint16
_ uint16
}
type AtomPowertuneTable struct {
RevID byte
TDP uint16
ConfigurableTDP uint16
TDC uint16
BatteryPowerLimit uint16
SmallPowerLimit uint16
LowCACLeakage uint16
HighCACLeakage uint16
MaximumPowerDeliveryLimit uint16
TjMax uint16
PowerTuneDataSetID uint16
EDCLimit uint16
SoftwareShutdownTemp uint16
ClockStretchAmount uint16
TemperatureLimitHotspot uint16
TemperatureLimitLiquid1 uint16
TemperatureLimitLiquid2 uint16
TemperatureLimitVrVddc uint16
TemperatureLimitVrMvdd uint16
TemperatureLimitPlx uint16
Liquid1I2CAddress byte
Liquid2I2CAddress byte
LiquidI2CLine byte
VrI2CAddress byte
VrI2CLine byte
PlxI2CAddress byte
PlxI2CLine byte
_ uint16
}
type AtomVRAMTimingEntry struct {
ClkRange uint32
Latency [0x30]byte
}
type AtomVRAMEntry struct {
ChannelMapCfg uint32
ModuleSize uint16
McRAMCfg uint16
EnableChannels uint16
ExtMemoryID byte
MemoryType byte
ChannelNum byte
ChannelWidth byte
Density byte
BankCol byte
Misc byte
VREFI byte
_ uint16
MemorySize uint16
McTunningSetID byte
RowNum byte
EMRS2Value uint16
EMRS3Value uint16
MemoryVenderID byte
RefreshRateFactor byte
FIFODepth byte
CDRBandwidth byte
ChannelMapCfg1 uint32
BankMapCfg uint32
_ uint32
MemPNString string `struct:"[20]byte"`
}
type AtomVRAMInfo struct {
Header AtomCommonTableHeader
MemAdjustTblOffset uint16
MemClkPatchTblOffset uint16
McAdjustPerTileTblOffset uint16
McPhyInitTableOffset uint16
DramDataRemapTblOffset uint16
_ uint16
NumOfVRAMModule byte //`struct:"sizeof=VramInfo"`
MemoryClkPatchTblVer byte
VramModuleVer byte
McPhyTileNum byte
//VramInfo []AtomVRAMEntry
}