Fixed Issue 73.
3 Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 The contents of this file are subject to the Mozilla Public License Version
6 1.1 (the "License"); you may not use this file except in compliance with
7 the License. You may obtain a copy of the License at
9 http://www.mozilla.org/MPL/
11 Software distributed under the License is distributed on an "AS IS" basis,
12 WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13 for the specific language governing rights and limitations under the License.
15 The Original Code is the Open Hardware Monitor code.
17 The Initial Developer of the Original Code is
18 Michael Möller <m.moeller@gmx.ch>.
19 Portions created by the Initial Developer are Copyright (C) 2009-2010
20 the Initial Developer. All Rights Reserved.
24 Alternatively, the contents of this file may be used under the terms of
25 either the GNU General Public License Version 2 or later (the "GPL"), or
26 the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27 in which case the provisions of the GPL or the LGPL are applicable instead
28 of those above. If you wish to allow use of your version of this file only
29 under the terms of either the GPL or the LGPL, and not to allow others to
30 use your version of this file under the terms of the MPL, indicate your
31 decision by deleting the provisions above and replace them with the notice
32 and other provisions required by the GPL or the LGPL. If you do not delete
33 the provisions above, a recipient may use your version of this file under
34 the terms of any one of the MPL, the GPL or the LGPL.
39 using System.Collections.Generic;
41 using OpenHardwareMonitor.Hardware.LPC;
43 namespace OpenHardwareMonitor.Hardware.Mainboard {
44 public class SuperIOHardware : Hardware {
46 private ISuperIO superIO;
48 protected readonly string name;
50 private List<Sensor> voltages = new List<Sensor>();
51 private List<Sensor> temperatures = new List<Sensor>();
52 private List<Sensor> fans = new List<Sensor>();
54 public SuperIOHardware(ISuperIO superIO, Manufacturer manufacturer,
57 this.superIO = superIO;
58 this.icon = Utilities.EmbeddedResources.GetImage("chip.png");
60 switch (superIO.Chip) {
61 case Chip.F71858: name = "Fintek F71858"; break;
62 case Chip.F71862: name = "Fintek F71862"; break;
63 case Chip.F71869: name = "Fintek F71869"; break;
64 case Chip.F71882: name = "Fintek F71882"; break;
65 case Chip.F71889ED: name = "Fintek F71889ED"; break;
66 case Chip.F71889F: name = "Fintek F71889F"; break;
67 case Chip.IT8712F: this.name = "ITE IT8712F"; break;
68 case Chip.IT8716F: this.name = "ITE IT8716F"; break;
69 case Chip.IT8718F: this.name = "ITE IT8718F"; break;
70 case Chip.IT8720F: this.name = "ITE IT8720F"; break;
71 case Chip.IT8726F: this.name = "ITE IT8726F"; break;
72 case Chip.W83627DHG: this.name = "Winbond W83627DHG"; break;
73 case Chip.W83627DHGP: this.name = "Winbond W83627DHG-P"; break;
74 case Chip.W83627EHF: this.name = "Winbond W83627EHF"; break;
75 case Chip.W83627HF: this.name = "Winbond W83627HF"; break;
76 case Chip.W83627THF: this.name = "Winbond W83627THF"; break;
77 case Chip.W83667HG: this.name = "Winbond W83667HG"; break;
78 case Chip.W83667HGB: this.name = "Winbond W83667HG-B"; break;
79 case Chip.W83687THF: this.name = "Winbond W83687THF"; break;
80 case Chip.Unknown: this.name = "Unkown"; break;
83 List<Voltage> v = new List<Voltage>();
84 List<Temperature> t = new List<Temperature>();
85 List<Fan> f = new List<Fan>();
87 switch (superIO.Chip) {
93 switch (manufacturer) {
94 case Manufacturer.ASUS:
96 case Model.Crosshair_III_Formula:
97 v.Add(new Voltage("VBat", 8));
98 t.Add(new Temperature("CPU", 0));
99 for (int i = 0; i < superIO.Fans.Length; i++)
100 f.Add(new Fan("Fan #" + (i + 1), i));
102 case Model.M2N_SLI_DELUXE:
103 v.Add(new Voltage("CPU VCore", 0));
104 v.Add(new Voltage("+3.3V", 1));
105 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0));
106 v.Add(new Voltage("+12V", 4, 30, 10, 0));
107 v.Add(new Voltage("+5VSB", 7, 6.8f, 10, 0));
108 v.Add(new Voltage("VBat", 8));
109 t.Add(new Temperature("CPU", 0));
110 t.Add(new Temperature("Motherboard", 1));
111 f.Add(new Fan("CPU Fan", 0));
112 f.Add(new Fan("Chassis Fan #1", 1));
113 f.Add(new Fan("Power Fan", 2));
116 v.Add(new Voltage("CPU VCore", 0));
117 v.Add(new Voltage("Voltage #2", 1, true));
118 v.Add(new Voltage("Voltage #3", 2, true));
119 v.Add(new Voltage("Voltage #4", 3, true));
120 v.Add(new Voltage("Voltage #5", 4, true));
121 v.Add(new Voltage("Voltage #6", 5, true));
122 v.Add(new Voltage("Voltage #7", 6, true));
123 v.Add(new Voltage("Voltage #8", 7, true));
124 v.Add(new Voltage("VBat", 8));
125 for (int i = 0; i < superIO.Temperatures.Length; i++)
126 t.Add(new Temperature("Temperature #" + (i + 1), i));
127 for (int i = 0; i < superIO.Fans.Length; i++)
128 f.Add(new Fan("Fan #" + (i + 1), i));
132 case Manufacturer.DFI:
134 case Model.LP_BI_P45_T2RS_Elite:
135 v.Add(new Voltage("CPU VCore", 0));
136 v.Add(new Voltage("FSB VTT", 1));
137 v.Add(new Voltage("+3.3V", 2));
138 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0));
139 v.Add(new Voltage("+12V", 4, 30, 10, 0));
140 v.Add(new Voltage("NB Core", 5));
141 v.Add(new Voltage("VDIMM", 6));
142 v.Add(new Voltage("+5VSB", 7, 6.8f, 10, 0));
143 v.Add(new Voltage("VBat", 8));
144 t.Add(new Temperature("CPU", 0));
145 t.Add(new Temperature("System", 1));
146 t.Add(new Temperature("Chipset", 2));
147 f.Add(new Fan("Fan #1", 0));
148 f.Add(new Fan("Fan #2", 1));
149 f.Add(new Fan("Fan #3", 2));
151 case Model.LP_DK_P55_T3eH9:
152 v.Add(new Voltage("CPU VCore", 0));
153 v.Add(new Voltage("VTT", 1));
154 v.Add(new Voltage("+3.3V", 2));
155 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0));
156 v.Add(new Voltage("+12V", 4, 30, 10, 0));
157 v.Add(new Voltage("CPU PLL", 5));
158 v.Add(new Voltage("DRAM", 6));
159 v.Add(new Voltage("+5VSB", 7, 6.8f, 10, 0));
160 v.Add(new Voltage("VBat", 8));
161 t.Add(new Temperature("Chipset", 0));
162 t.Add(new Temperature("CPU PWM", 1));
163 t.Add(new Temperature("CPU", 2));
164 f.Add(new Fan("Fan #1", 0));
165 f.Add(new Fan("Fan #2", 1));
166 f.Add(new Fan("Fan #3", 2));
169 v.Add(new Voltage("CPU VCore", 0));
170 v.Add(new Voltage("VTT", 1, true));
171 v.Add(new Voltage("+3.3V", 2, true));
172 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0, true));
173 v.Add(new Voltage("+12V", 4, 30, 10, 0, true));
174 v.Add(new Voltage("Voltage #6", 5, true));
175 v.Add(new Voltage("DRAM", 6, true));
176 v.Add(new Voltage("+5VSB", 7, 6.8f, 10, 0, true));
177 v.Add(new Voltage("VBat", 8));
178 for (int i = 0; i < superIO.Temperatures.Length; i++)
179 t.Add(new Temperature("Temperature #" + (i + 1), i));
180 for (int i = 0; i < superIO.Fans.Length; i++)
181 f.Add(new Fan("Fan #" + (i + 1), i));
186 case Manufacturer.Gigabyte:
189 v.Add(new Voltage("CPU VCore", 0));
190 v.Add(new Voltage("DRAM", 1));
191 v.Add(new Voltage("+3.3V", 2));
192 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0));
193 v.Add(new Voltage("+12V", 7, 27, 9.1f, 0));
194 v.Add(new Voltage("VBat", 8));
195 t.Add(new Temperature("System", 0));
196 t.Add(new Temperature("CPU", 1));
197 f.Add(new Fan("CPU Fan", 0));
198 f.Add(new Fan("System Fan", 1));
200 case Model.EP45_DS3R:
201 case Model.EP45_UD3R:
203 v.Add(new Voltage("CPU VCore", 0));
204 v.Add(new Voltage("DRAM", 1));
205 v.Add(new Voltage("+3.3V", 2));
206 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0));
207 v.Add(new Voltage("+12V", 7, 27, 9.1f, 0));
208 v.Add(new Voltage("VBat", 8));
209 t.Add(new Temperature("System", 0));
210 t.Add(new Temperature("CPU", 1));
211 f.Add(new Fan("CPU Fan", 0));
212 f.Add(new Fan("System Fan #2", 1));
213 f.Add(new Fan("Power Fan", 2));
214 f.Add(new Fan("System Fan #1", 3));
216 case Model.EX58_EXTREME:
217 v.Add(new Voltage("CPU VCore", 0));
218 v.Add(new Voltage("DRAM", 1));
219 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0));
220 v.Add(new Voltage("VBat", 8));
221 t.Add(new Temperature("System", 0));
222 t.Add(new Temperature("CPU", 1));
223 t.Add(new Temperature("Northbridge", 2));
224 f.Add(new Fan("CPU Fan", 0));
225 f.Add(new Fan("System Fan #2", 1));
226 f.Add(new Fan("Power Fan", 2));
227 f.Add(new Fan("System Fan #1", 3));
231 v.Add(new Voltage("CPU VCore", 0));
232 v.Add(new Voltage("DRAM", 1));
233 v.Add(new Voltage("+3.3V", 2));
234 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0));
235 v.Add(new Voltage("+12V", 7, 27, 9.1f, 0));
236 v.Add(new Voltage("VBat", 8));
237 t.Add(new Temperature("System", 0));
238 t.Add(new Temperature("CPU", 1));
239 f.Add(new Fan("CPU Fan", 0));
240 f.Add(new Fan("System Fan #1", 1));
241 f.Add(new Fan("System Fan #2", 2));
242 f.Add(new Fan("Power Fan", 3));
244 case Model.GA_MA785GMT_UD2H:
245 v.Add(new Voltage("CPU VCore", 0));
246 v.Add(new Voltage("DRAM", 1));
247 v.Add(new Voltage("+3.3V", 2));
248 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0));
249 v.Add(new Voltage("+12V", 4, 27, 9.1f, 0));
250 v.Add(new Voltage("VBat", 8));
251 t.Add(new Temperature("System", 0));
252 t.Add(new Temperature("CPU", 1));
253 f.Add(new Fan("CPU Fan", 0));
254 f.Add(new Fan("System Fan", 1));
255 f.Add(new Fan("NB Fan", 2));
257 case Model.X58A_UD3R:
258 v.Add(new Voltage("CPU VCore", 0));
259 v.Add(new Voltage("DRAM", 1));
260 v.Add(new Voltage("+3.3V", 2));
261 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0));
262 v.Add(new Voltage("+12V", 5, 27, 9.1f, 0));
263 v.Add(new Voltage("VBat", 8));
264 t.Add(new Temperature("System", 0));
265 t.Add(new Temperature("CPU", 1));
266 t.Add(new Temperature("Northbridge", 2));
267 f.Add(new Fan("CPU Fan", 0));
268 f.Add(new Fan("System Fan #2", 1));
269 f.Add(new Fan("Power Fan", 2));
270 f.Add(new Fan("System Fan #1", 3));
273 v.Add(new Voltage("CPU VCore", 0));
274 v.Add(new Voltage("DRAM", 1, true));
275 v.Add(new Voltage("+3.3V", 2, true));
276 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0, true));
277 v.Add(new Voltage("Voltage #5", 4, true));
278 v.Add(new Voltage("Voltage #6", 5, true));
279 v.Add(new Voltage("Voltage #7", 6, true));
280 v.Add(new Voltage("+12V", 7, 27, 9.1f, 0, true));
281 v.Add(new Voltage("VBat", 8));
282 for (int i = 0; i < superIO.Temperatures.Length; i++)
283 t.Add(new Temperature("Temperature #" + (i + 1), i));
284 for (int i = 0; i < superIO.Fans.Length; i++)
285 f.Add(new Fan("Fan #" + (i + 1), i));
291 v.Add(new Voltage("CPU VCore", 0));
292 v.Add(new Voltage("Voltage #2", 1, true));
293 v.Add(new Voltage("Voltage #3", 2, true));
294 v.Add(new Voltage("Voltage #4", 3, true));
295 v.Add(new Voltage("Voltage #5", 4, true));
296 v.Add(new Voltage("Voltage #6", 5, true));
297 v.Add(new Voltage("Voltage #7", 6, true));
298 v.Add(new Voltage("Voltage #8", 7, true));
299 v.Add(new Voltage("VBat", 8));
300 for (int i = 0; i < superIO.Temperatures.Length; i++)
301 t.Add(new Temperature("Temperature #" + (i + 1), i));
302 for (int i = 0; i < superIO.Fans.Length; i++)
303 f.Add(new Fan("Fan #" + (i + 1), i));
309 v.Add(new Voltage("VCC3V", 0, 150, 150, 0));
310 v.Add(new Voltage("VSB3V", 1, 150, 150, 0));
311 v.Add(new Voltage("Battery", 2, 150, 150, 0));
312 for (int i = 0; i < superIO.Temperatures.Length; i++)
313 t.Add(new Temperature("Temperature #" + (i + 1), i));
314 for (int i = 0; i < superIO.Fans.Length; i++)
315 f.Add(new Fan("Fan #" + (i + 1), i));
322 switch (manufacturer) {
323 case Manufacturer.EVGA:
325 case Model.X58_SLI_Classified:
326 v.Add(new Voltage("VCC3V", 0, 150, 150, 0));
327 v.Add(new Voltage("CPU VCore", 1, 47, 100, 0));
328 v.Add(new Voltage("DIMM", 2, 47, 100, 0));
329 v.Add(new Voltage("CPU VTT", 3, 24, 100, 0));
330 v.Add(new Voltage("IOH Vcore", 4, 24, 100, 0));
331 v.Add(new Voltage("+5V", 5, 51, 12, 0));
332 v.Add(new Voltage("+12V", 6, 56, 6.8f, 0));
333 v.Add(new Voltage("3VSB", 7, 150, 150, 0));
334 v.Add(new Voltage("VBat", 8, 150, 150, 0));
335 t.Add(new Temperature("CPU", 0));
336 t.Add(new Temperature("VREG", 1));
337 t.Add(new Temperature("System", 2));
338 f.Add(new Fan("CPU Fan", 0));
339 f.Add(new Fan("Power Fan", 1));
340 f.Add(new Fan("Chassis Fan", 2));
343 v.Add(new Voltage("VCC3V", 0, 150, 150, 0));
344 v.Add(new Voltage("CPU VCore", 1));
345 v.Add(new Voltage("Voltage #3", 2, true));
346 v.Add(new Voltage("Voltage #4", 3, true));
347 v.Add(new Voltage("Voltage #5", 4, true));
348 v.Add(new Voltage("Voltage #6", 5, true));
349 v.Add(new Voltage("Voltage #7", 6, true));
350 v.Add(new Voltage("VSB3V", 7, 150, 150, 0));
351 v.Add(new Voltage("VBat", 8, 150, 150, 0));
352 for (int i = 0; i < superIO.Temperatures.Length; i++)
353 t.Add(new Temperature("Temperature #" + (i + 1), i));
354 for (int i = 0; i < superIO.Fans.Length; i++)
355 f.Add(new Fan("Fan #" + (i + 1), i));
360 v.Add(new Voltage("VCC3V", 0, 150, 150, 0));
361 v.Add(new Voltage("CPU VCore", 1));
362 v.Add(new Voltage("Voltage #3", 2, true));
363 v.Add(new Voltage("Voltage #4", 3, true));
364 v.Add(new Voltage("Voltage #5", 4, true));
365 v.Add(new Voltage("Voltage #6", 5, true));
366 v.Add(new Voltage("Voltage #7", 6, true));
367 v.Add(new Voltage("VSB3V", 7, 150, 150, 0));
368 v.Add(new Voltage("VBat", 8, 150, 150, 0));
369 for (int i = 0; i < superIO.Temperatures.Length; i++)
370 t.Add(new Temperature("Temperature #" + (i + 1), i));
371 for (int i = 0; i < superIO.Fans.Length; i++)
372 f.Add(new Fan("Fan #" + (i + 1), i));
378 v.Add(new Voltage("CPU VCore", 0));
379 v.Add(new Voltage("Voltage #2", 1, true));
380 v.Add(new Voltage("AVCC", 2, 34, 34, 0));
381 v.Add(new Voltage("3VCC", 3, 34, 34, 0));
382 v.Add(new Voltage("Voltage #5", 4, true));
383 v.Add(new Voltage("Voltage #6", 5, true));
384 v.Add(new Voltage("Voltage #7", 6, true));
385 v.Add(new Voltage("3VSB", 7, 34, 34, 0));
386 v.Add(new Voltage("VBAT", 8, 34, 34, 0));
387 v.Add(new Voltage("Voltage #10", 9, true));
388 t.Add(new Temperature("CPU", 0));
389 t.Add(new Temperature("Auxiliary", 1));
390 t.Add(new Temperature("System", 2));
391 f.Add(new Fan("System", 0));
392 f.Add(new Fan("CPU", 1));
393 f.Add(new Fan("Auxiliary", 2));
394 f.Add(new Fan("CPU #2", 3));
395 f.Add(new Fan("Auxiliary #2", 4));
398 case Chip.W83627DHGP:
401 v.Add(new Voltage("CPU VCore", 0));
402 v.Add(new Voltage("Voltage #2", 1, true));
403 v.Add(new Voltage("AVCC", 2, 34, 34, 0));
404 v.Add(new Voltage("3VCC", 3, 34, 34, 0));
405 v.Add(new Voltage("Voltage #5", 4, true));
406 v.Add(new Voltage("Voltage #6", 5, true));
407 v.Add(new Voltage("Voltage #7", 6, true));
408 v.Add(new Voltage("3VSB", 7, 34, 34, 0));
409 v.Add(new Voltage("VBAT", 8, 34, 34, 0));
410 t.Add(new Temperature("CPU", 0));
411 t.Add(new Temperature("Auxiliary", 1));
412 t.Add(new Temperature("System", 2));
413 f.Add(new Fan("System", 0));
414 f.Add(new Fan("CPU", 1));
415 f.Add(new Fan("Auxiliary", 2));
416 f.Add(new Fan("CPU #2", 3));
417 f.Add(new Fan("Auxiliary #2", 4));
422 v.Add(new Voltage("CPU VCore", 0));
423 v.Add(new Voltage("Voltage #2", 1, true));
424 v.Add(new Voltage("Voltage #3", 2, true));
425 v.Add(new Voltage("AVCC", 3, 34, 51, 0));
426 v.Add(new Voltage("Voltage #5", 4, true));
427 v.Add(new Voltage("5VSB", 5, 34, 51, 0));
428 v.Add(new Voltage("VBAT", 6));
429 t.Add(new Temperature("CPU", 0));
430 t.Add(new Temperature("Auxiliary", 1));
431 t.Add(new Temperature("System", 2));
432 f.Add(new Fan("System", 0));
433 f.Add(new Fan("CPU", 1));
434 f.Add(new Fan("Auxiliary", 2));
437 for (int i = 0; i < superIO.Voltages.Length; i++)
438 v.Add(new Voltage("Voltage #" + (i + 1), i, true));
439 for (int i = 0; i < superIO.Temperatures.Length; i++)
440 t.Add(new Temperature("Temperature #" + (i + 1), i));
441 for (int i = 0; i < superIO.Fans.Length; i++)
442 f.Add(new Fan("Fan #" + (i + 1), i));
446 string formula = "Voltage = value + (value - Vf) * Ri / Rf.";
447 foreach (Voltage voltage in v)
448 if (voltage.Index < superIO.Voltages.Length) {
449 Sensor sensor = new Sensor(voltage.Name, voltage.Index,
450 voltage.Hidden, SensorType.Voltage, this,
451 new ParameterDescription[] {
452 new ParameterDescription("Ri [kΩ]", "Input resistance.\n" +
453 formula, voltage.Ri),
454 new ParameterDescription("Rf [kΩ]", "Reference resistance.\n" +
455 formula, voltage.Rf),
456 new ParameterDescription("Vf [V]", "Reference voltage.\n" +
459 voltages.Add(sensor);
462 foreach (Temperature temperature in t)
463 if (temperature.Index < superIO.Temperatures.Length) {
464 Sensor sensor = new Sensor(temperature.Name, temperature.Index,
465 SensorType.Temperature, this, new ParameterDescription[] {
466 new ParameterDescription("Offset [°C]", "Temperature offset.", 0)
468 temperatures.Add(sensor);
471 foreach (Fan fan in f)
472 if (fan.Index < superIO.Fans.Length) {
473 Sensor sensor = new Sensor(fan.Name, fan.Index, SensorType.Fan,
479 public override Identifier Identifier {
480 get { return new Identifier("lpc", superIO.Chip.ToString().ToLower()); }
483 public override Image Icon {
487 public override string Name {
491 public override string GetReport() {
492 return superIO.GetReport();
495 public override void Update() {
498 foreach (Sensor sensor in voltages) {
499 float? value = superIO.Voltages[sensor.Index];
500 if (value.HasValue) {
501 sensor.Value = value + (value - sensor.Parameters[2].Value) *
502 sensor.Parameters[0].Value / sensor.Parameters[1].Value;
503 ActivateSensor(sensor);
507 foreach (Sensor sensor in temperatures) {
508 float? value = superIO.Temperatures[sensor.Index];
509 if (value.HasValue) {
510 sensor.Value = value + sensor.Parameters[0].Value;
511 ActivateSensor(sensor);
515 foreach (Sensor sensor in fans) {
516 float? value = superIO.Fans[sensor.Index];
517 if (value.HasValue) {
518 sensor.Value = value;
520 ActivateSensor(sensor);
525 private class Voltage {
526 public readonly string Name;
527 public readonly int Index;
528 public readonly float Ri;
529 public readonly float Rf;
530 public readonly float Vf;
531 public readonly bool Hidden;
533 public Voltage(string name, int index) :
534 this(name, index, 0, 1, 0, false) { }
536 public Voltage(string name, int index, bool hidden) :
537 this(name, index, 0, 1, 0, hidden) { }
539 public Voltage(string name, int index, float ri, float rf, float vf) :
540 this(name, index, ri, rf, vf, false) { }
542 public Voltage(string name, int index, float ri, float rf, float vf,
549 this.Hidden = hidden;
553 private class Temperature {
554 public readonly string Name;
555 public readonly int Index;
557 public Temperature(string name, int index) {
564 public readonly string Name;
565 public readonly int Index;
567 public Fan(string name, int index) {