Added additional Intel Sandy Bridge CPU power sensors.
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-2011
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;
40 using System.Globalization;
41 using System.Threading;
42 using OpenHardwareMonitor.Hardware.LPC;
44 namespace OpenHardwareMonitor.Hardware.Mainboard {
45 internal class SuperIOHardware : Hardware {
47 private readonly Mainboard mainboard;
48 private readonly ISuperIO superIO;
50 private readonly List<Sensor> voltages = new List<Sensor>();
51 private readonly List<Sensor> temperatures = new List<Sensor>();
52 private readonly List<Sensor> fans = new List<Sensor>();
54 private delegate float? ReadValueDelegate(int index);
55 private delegate void UpdateDelegate();
57 // delegates for mainboard specific sensor reading code
58 private readonly ReadValueDelegate readVoltage;
59 private readonly ReadValueDelegate readTemperature;
60 private readonly ReadValueDelegate readFan;
62 // delegate for post update mainboard specific code
63 private readonly UpdateDelegate postUpdate;
65 // mainboard specific mutex
66 private readonly Mutex mutex;
68 public SuperIOHardware(Mainboard mainboard, ISuperIO superIO,
69 Manufacturer manufacturer, Model model, ISettings settings)
70 : base(ChipName.GetName(superIO.Chip), new Identifier("lpc",
71 superIO.Chip.ToString().ToLower(CultureInfo.InvariantCulture)),
74 this.mainboard = mainboard;
75 this.superIO = superIO;
77 this.readVoltage = (index) => superIO.Voltages[index];
78 this.readTemperature = (index) => superIO.Temperatures[index];
79 this.readFan = (index) => superIO.Fans[index];
81 this.postUpdate = () => { };
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: // IT8720F
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));
106 v.Add(new Voltage("+12V", 4, 30, 10));
107 v.Add(new Voltage("+5VSB", 7, 6.8f, 10));
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));
115 case Model.M4A79XTD_EVO: // IT8720F
116 v.Add(new Voltage("+5V", 3, 6.8f, 10));
117 v.Add(new Voltage("VBat", 8));
118 t.Add(new Temperature("CPU", 0));
119 t.Add(new Temperature("Motherboard", 1));
120 f.Add(new Fan("CPU Fan", 0));
121 f.Add(new Fan("Chassis Fan #1", 1));
122 f.Add(new Fan("Chassis Fan #2", 2));
125 v.Add(new Voltage("CPU VCore", 0));
126 v.Add(new Voltage("Voltage #2", 1, true));
127 v.Add(new Voltage("Voltage #3", 2, true));
128 v.Add(new Voltage("Voltage #4", 3, true));
129 v.Add(new Voltage("Voltage #5", 4, true));
130 v.Add(new Voltage("Voltage #6", 5, true));
131 v.Add(new Voltage("Voltage #7", 6, true));
132 v.Add(new Voltage("Voltage #8", 7, true));
133 v.Add(new Voltage("VBat", 8));
134 for (int i = 0; i < superIO.Temperatures.Length; i++)
135 t.Add(new Temperature("Temperature #" + (i + 1), i));
136 for (int i = 0; i < superIO.Fans.Length; i++)
137 f.Add(new Fan("Fan #" + (i + 1), i));
142 case Manufacturer.ASRock:
144 case Model.P55_Deluxe: // IT8720F
146 v.Add(new Voltage("CPU VCore", 0));
147 v.Add(new Voltage("+3.3V", 2));
148 v.Add(new Voltage("+12V", 4, 30, 10));
149 v.Add(new Voltage("+5V", 5, 6.8f, 10));
150 v.Add(new Voltage("VBat", 8));
151 t.Add(new Temperature("CPU", 0));
152 t.Add(new Temperature("Motherboard", 1));
153 f.Add(new Fan("CPU Fan", 0));
154 f.Add(new Fan("Chassis Fan #1", 1));
156 // this mutex is also used by the official ASRock tool
157 mutex = new Mutex(false, "ASRockOCMark");
159 bool exclusiveAccess = false;
161 exclusiveAccess = mutex.WaitOne(10, false);
162 } catch (AbandonedMutexException) { }
163 catch (InvalidOperationException) { }
165 // only read additional fans if we get exclusive access
166 if (exclusiveAccess) {
168 f.Add(new Fan("Chassis Fan #2", 2));
169 f.Add(new Fan("Chassis Fan #3", 3));
170 f.Add(new Fan("Power Fan", 4));
172 readFan = (index) => {
174 return superIO.Fans[index];
177 byte? gpio = superIO.ReadGPIO(7);
181 // read the last 3 fans based on GPIO 83-85
182 int[] masks = { 0x05, 0x03, 0x06 };
183 return (((gpio.Value >> 3) & 0x07) ==
184 masks[index - 2]) ? superIO.Fans[2] : null;
191 byte? gpio = superIO.ReadGPIO(7);
195 // prepare the GPIO 83-85 for the next update
196 int[] masks = { 0x05, 0x03, 0x06 };
198 (byte)((gpio.Value & 0xC7) | (masks[fanIndex] << 3)));
199 fanIndex = (fanIndex + 1) % 3;
205 v.Add(new Voltage("CPU VCore", 0));
206 v.Add(new Voltage("Voltage #2", 1, true));
207 v.Add(new Voltage("Voltage #3", 2, true));
208 v.Add(new Voltage("Voltage #4", 3, true));
209 v.Add(new Voltage("Voltage #5", 4, true));
210 v.Add(new Voltage("Voltage #6", 5, true));
211 v.Add(new Voltage("Voltage #7", 6, true));
212 v.Add(new Voltage("Voltage #8", 7, true));
213 v.Add(new Voltage("VBat", 8));
214 for (int i = 0; i < superIO.Temperatures.Length; i++)
215 t.Add(new Temperature("Temperature #" + (i + 1), i));
216 for (int i = 0; i < superIO.Fans.Length; i++)
217 f.Add(new Fan("Fan #" + (i + 1), i));
222 case Manufacturer.DFI:
224 case Model.LP_BI_P45_T2RS_Elite: // IT8718F
225 v.Add(new Voltage("CPU VCore", 0));
226 v.Add(new Voltage("FSB VTT", 1));
227 v.Add(new Voltage("+3.3V", 2));
228 v.Add(new Voltage("+5V", 3, 6.8f, 10));
229 v.Add(new Voltage("+12V", 4, 30, 10));
230 v.Add(new Voltage("NB Core", 5));
231 v.Add(new Voltage("VDIMM", 6));
232 v.Add(new Voltage("+5VSB", 7, 6.8f, 10));
233 v.Add(new Voltage("VBat", 8));
234 t.Add(new Temperature("CPU", 0));
235 t.Add(new Temperature("System", 1));
236 t.Add(new Temperature("Chipset", 2));
237 f.Add(new Fan("Fan #1", 0));
238 f.Add(new Fan("Fan #2", 1));
239 f.Add(new Fan("Fan #3", 2));
241 case Model.LP_DK_P55_T3eH9: // IT8720F
242 v.Add(new Voltage("CPU VCore", 0));
243 v.Add(new Voltage("VTT", 1));
244 v.Add(new Voltage("+3.3V", 2));
245 v.Add(new Voltage("+5V", 3, 6.8f, 10));
246 v.Add(new Voltage("+12V", 4, 30, 10));
247 v.Add(new Voltage("CPU PLL", 5));
248 v.Add(new Voltage("DRAM", 6));
249 v.Add(new Voltage("+5VSB", 7, 6.8f, 10));
250 v.Add(new Voltage("VBat", 8));
251 t.Add(new Temperature("Chipset", 0));
252 t.Add(new Temperature("CPU PWM", 1));
253 t.Add(new Temperature("CPU", 2));
254 f.Add(new Fan("Fan #1", 0));
255 f.Add(new Fan("Fan #2", 1));
256 f.Add(new Fan("Fan #3", 2));
259 v.Add(new Voltage("CPU VCore", 0));
260 v.Add(new Voltage("VTT", 1, true));
261 v.Add(new Voltage("+3.3V", 2, true));
262 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0, true));
263 v.Add(new Voltage("+12V", 4, 30, 10, 0, true));
264 v.Add(new Voltage("Voltage #6", 5, true));
265 v.Add(new Voltage("DRAM", 6, true));
266 v.Add(new Voltage("+5VSB", 7, 6.8f, 10, 0, true));
267 v.Add(new Voltage("VBat", 8));
268 for (int i = 0; i < superIO.Temperatures.Length; i++)
269 t.Add(new Temperature("Temperature #" + (i + 1), i));
270 for (int i = 0; i < superIO.Fans.Length; i++)
271 f.Add(new Fan("Fan #" + (i + 1), i));
276 case Manufacturer.Gigabyte:
278 case Model._965P_S3: // IT8718F
279 v.Add(new Voltage("CPU VCore", 0));
280 v.Add(new Voltage("DRAM", 1));
281 v.Add(new Voltage("+3.3V", 2));
282 v.Add(new Voltage("+5V", 3, 6.8f, 10));
283 v.Add(new Voltage("+12V", 7, 27, 9.1f));
284 v.Add(new Voltage("VBat", 8));
285 t.Add(new Temperature("System", 0));
286 t.Add(new Temperature("CPU", 1));
287 f.Add(new Fan("CPU Fan", 0));
288 f.Add(new Fan("System Fan", 1));
290 case Model.EP45_DS3R: // IT8718F
291 case Model.EP45_UD3R:
293 v.Add(new Voltage("CPU VCore", 0));
294 v.Add(new Voltage("DRAM", 1));
295 v.Add(new Voltage("+3.3V", 2));
296 v.Add(new Voltage("+5V", 3, 6.8f, 10));
297 v.Add(new Voltage("+12V", 7, 27, 9.1f));
298 v.Add(new Voltage("VBat", 8));
299 t.Add(new Temperature("System", 0));
300 t.Add(new Temperature("CPU", 1));
301 f.Add(new Fan("CPU Fan", 0));
302 f.Add(new Fan("System Fan #2", 1));
303 f.Add(new Fan("Power Fan", 2));
304 f.Add(new Fan("System Fan #1", 3));
306 case Model.EX58_EXTREME: // IT8720F
307 v.Add(new Voltage("CPU VCore", 0));
308 v.Add(new Voltage("DRAM", 1));
309 v.Add(new Voltage("+5V", 3, 6.8f, 10));
310 v.Add(new Voltage("VBat", 8));
311 t.Add(new Temperature("System", 0));
312 t.Add(new Temperature("CPU", 1));
313 t.Add(new Temperature("Northbridge", 2));
314 f.Add(new Fan("CPU Fan", 0));
315 f.Add(new Fan("System Fan #2", 1));
316 f.Add(new Fan("Power Fan", 2));
317 f.Add(new Fan("System Fan #1", 3));
319 case Model.P35_DS3: // IT8718F
320 case Model.P35_DS3L: // IT8718F
321 v.Add(new Voltage("CPU VCore", 0));
322 v.Add(new Voltage("DRAM", 1));
323 v.Add(new Voltage("+3.3V", 2));
324 v.Add(new Voltage("+5V", 3, 6.8f, 10));
325 v.Add(new Voltage("+12V", 7, 27, 9.1f));
326 v.Add(new Voltage("VBat", 8));
327 t.Add(new Temperature("System", 0));
328 t.Add(new Temperature("CPU", 1));
329 f.Add(new Fan("CPU Fan", 0));
330 f.Add(new Fan("System Fan #1", 1));
331 f.Add(new Fan("System Fan #2", 2));
332 f.Add(new Fan("Power Fan", 3));
334 case Model.P55_UD4: // IT8720F
335 case Model.P55M_UD4: // IT8720F
336 v.Add(new Voltage("CPU VCore", 0));
337 v.Add(new Voltage("DRAM", 1));
338 v.Add(new Voltage("+3.3V", 2));
339 v.Add(new Voltage("+5V", 3, 6.8f, 10));
340 v.Add(new Voltage("+12V", 5, 27, 9.1f));
341 v.Add(new Voltage("VBat", 8));
342 t.Add(new Temperature("System", 0));
343 t.Add(new Temperature("CPU", 2));
344 f.Add(new Fan("CPU Fan", 0));
345 f.Add(new Fan("System Fan #2", 1));
346 f.Add(new Fan("Power Fan", 2));
347 f.Add(new Fan("System Fan #1", 3));
349 case Model.GA_MA770T_UD3: // IT8720F
350 v.Add(new Voltage("CPU VCore", 0));
351 v.Add(new Voltage("DRAM", 1));
352 v.Add(new Voltage("+3.3V", 2));
353 v.Add(new Voltage("+5V", 3, 6.8f, 10));
354 v.Add(new Voltage("+12V", 4, 27, 9.1f));
355 v.Add(new Voltage("VBat", 8));
356 t.Add(new Temperature("System", 0));
357 t.Add(new Temperature("CPU", 1));
358 f.Add(new Fan("CPU Fan", 0));
359 f.Add(new Fan("System Fan #1", 1));
360 f.Add(new Fan("System Fan #2", 2));
361 f.Add(new Fan("Power Fan", 3));
363 case Model.GA_MA785GMT_UD2H: // IT8718F
364 v.Add(new Voltage("CPU VCore", 0));
365 v.Add(new Voltage("DRAM", 1));
366 v.Add(new Voltage("+3.3V", 2));
367 v.Add(new Voltage("+5V", 3, 6.8f, 10));
368 v.Add(new Voltage("+12V", 4, 27, 9.1f));
369 v.Add(new Voltage("VBat", 8));
370 t.Add(new Temperature("System", 0));
371 t.Add(new Temperature("CPU", 1));
372 f.Add(new Fan("CPU Fan", 0));
373 f.Add(new Fan("System Fan", 1));
374 f.Add(new Fan("NB Fan", 2));
376 case Model.X58A_UD3R: // IT8720F
377 v.Add(new Voltage("CPU VCore", 0));
378 v.Add(new Voltage("DRAM", 1));
379 v.Add(new Voltage("+3.3V", 2));
380 v.Add(new Voltage("+5V", 3, 6.8f, 10));
381 v.Add(new Voltage("+12V", 5, 27, 9.1f));
382 v.Add(new Voltage("VBat", 8));
383 t.Add(new Temperature("System", 0));
384 t.Add(new Temperature("CPU", 1));
385 t.Add(new Temperature("Northbridge", 2));
386 f.Add(new Fan("CPU Fan", 0));
387 f.Add(new Fan("System Fan #2", 1));
388 f.Add(new Fan("Power Fan", 2));
389 f.Add(new Fan("System Fan #1", 3));
392 v.Add(new Voltage("CPU VCore", 0));
393 v.Add(new Voltage("DRAM", 1, true));
394 v.Add(new Voltage("+3.3V", 2, true));
395 v.Add(new Voltage("+5V", 3, 6.8f, 10, 0, true));
396 v.Add(new Voltage("Voltage #5", 4, true));
397 v.Add(new Voltage("Voltage #6", 5, true));
398 v.Add(new Voltage("Voltage #7", 6, true));
399 v.Add(new Voltage("Voltage #8", 7, true));
400 v.Add(new Voltage("VBat", 8));
401 for (int i = 0; i < superIO.Temperatures.Length; i++)
402 t.Add(new Temperature("Temperature #" + (i + 1), i));
403 for (int i = 0; i < superIO.Fans.Length; i++)
404 f.Add(new Fan("Fan #" + (i + 1), i));
410 v.Add(new Voltage("CPU VCore", 0));
411 v.Add(new Voltage("Voltage #2", 1, true));
412 v.Add(new Voltage("Voltage #3", 2, true));
413 v.Add(new Voltage("Voltage #4", 3, true));
414 v.Add(new Voltage("Voltage #5", 4, true));
415 v.Add(new Voltage("Voltage #6", 5, true));
416 v.Add(new Voltage("Voltage #7", 6, true));
417 v.Add(new Voltage("Voltage #8", 7, true));
418 v.Add(new Voltage("VBat", 8));
419 for (int i = 0; i < superIO.Temperatures.Length; i++)
420 t.Add(new Temperature("Temperature #" + (i + 1), i));
421 for (int i = 0; i < superIO.Fans.Length; i++)
422 f.Add(new Fan("Fan #" + (i + 1), i));
430 switch (manufacturer) {
431 case Manufacturer.ECS:
433 case Model.A890GXM_A: // IT8721F
434 v.Add(new Voltage("CPU VCore", 0));
435 v.Add(new Voltage("VDIMM", 1));
436 v.Add(new Voltage("NB Voltage", 2));
437 v.Add(new Voltage("Analog +3.3V", 3, 10, 10));
438 // v.Add(new Voltage("VDIMM", 6, true));
439 v.Add(new Voltage("Standby +3.3V", 7, 10, 10));
440 v.Add(new Voltage("VBat", 8, 10, 10));
441 t.Add(new Temperature("CPU", 0));
442 t.Add(new Temperature("System", 1));
443 t.Add(new Temperature("Northbridge", 2));
444 f.Add(new Fan("CPU Fan", 0));
445 f.Add(new Fan("System Fan", 1));
446 f.Add(new Fan("Power Fan", 2));
449 v.Add(new Voltage("Voltage #1", 0, true));
450 v.Add(new Voltage("Voltage #2", 1, true));
451 v.Add(new Voltage("Voltage #3", 2, true));
452 v.Add(new Voltage("Analog +3.3V", 3, 10, 10, 0, true));
453 v.Add(new Voltage("Voltage #5", 4, true));
454 v.Add(new Voltage("Voltage #6", 5, true));
455 v.Add(new Voltage("Voltage #7", 6, true));
456 v.Add(new Voltage("Standby +3.3V", 7, 10, 10, 0, true));
457 v.Add(new Voltage("VBat", 8, 10, 10));
458 for (int i = 0; i < superIO.Temperatures.Length; i++)
459 t.Add(new Temperature("Temperature #" + (i + 1), i));
460 for (int i = 0; i < superIO.Fans.Length; i++)
461 f.Add(new Fan("Fan #" + (i + 1), i));
465 case Manufacturer.Gigabyte:
467 case Model.P67A_UD4_B3: // IT8728F
468 v.Add(new Voltage("+12V", 0, 100, 10));
469 v.Add(new Voltage("+5V", 1, 15, 10));
470 v.Add(new Voltage("Voltage #3", 2, true));
471 v.Add(new Voltage("Voltage #4", 3, true));
472 v.Add(new Voltage("Voltage #5", 4, true));
473 v.Add(new Voltage("CPU VCore", 5));
474 v.Add(new Voltage("DRAM", 6));
475 v.Add(new Voltage("Standby +3.3V", 7, 10, 10));
476 v.Add(new Voltage("VBat", 8, 10, 10));
477 t.Add(new Temperature("System", 0));
478 t.Add(new Temperature("CPU", 2));
479 f.Add(new Fan("CPU Fan", 0));
480 f.Add(new Fan("System Fan #2", 1));
481 f.Add(new Fan("Power Fan", 2));
482 f.Add(new Fan("System Fan #1", 3));
484 case Model.H67A_UD3H_B3: // IT8728F
485 v.Add(new Voltage("VTT", 0));
486 v.Add(new Voltage("+5V", 1, 15, 10));
487 v.Add(new Voltage("+12V", 2, 68, 22));
488 v.Add(new Voltage("Voltage #4", 3, true));
489 v.Add(new Voltage("Voltage #5", 4, true));
490 v.Add(new Voltage("CPU VCore", 5));
491 v.Add(new Voltage("DRAM", 6));
492 v.Add(new Voltage("Standby +3.3V", 7, 10, 10));
493 v.Add(new Voltage("VBat", 8, 10, 10));
494 t.Add(new Temperature("System", 0));
495 t.Add(new Temperature("CPU", 2));
496 f.Add(new Fan("CPU Fan", 0));
497 f.Add(new Fan("System Fan #1", 1));
498 f.Add(new Fan("Power Fan", 2));
499 f.Add(new Fan("System Fan #2", 3));
501 case Model.Z68X_UD7_B3: // IT8728F
502 v.Add(new Voltage("VTT", 0));
503 v.Add(new Voltage("+3.3V", 1, 13.3f, 20.5f));
504 v.Add(new Voltage("+12V", 2, 68, 22));
505 v.Add(new Voltage("+5V", 3, 14.3f, 20));
506 v.Add(new Voltage("CPU VCore", 5));
507 v.Add(new Voltage("DRAM", 6));
508 v.Add(new Voltage("Standby +3.3V", 7, 10, 10));
509 v.Add(new Voltage("VBat", 8, 10, 10));
510 t.Add(new Temperature("System", 0));
511 t.Add(new Temperature("CPU", 1));
512 t.Add(new Temperature("System 3", 2));
513 f.Add(new Fan("CPU Fan", 0));
514 f.Add(new Fan("Power Fan", 1));
515 f.Add(new Fan("System Fan #1", 2));
516 f.Add(new Fan("System Fan #2", 3));
517 f.Add(new Fan("System Fan #3", 4));
520 v.Add(new Voltage("Voltage #1", 0, true));
521 v.Add(new Voltage("Voltage #2", 1, true));
522 v.Add(new Voltage("Voltage #3", 2, true));
523 v.Add(new Voltage("Voltage #4", 3, true));
524 v.Add(new Voltage("Voltage #5", 4, true));
525 v.Add(new Voltage("Voltage #6", 5, true));
526 v.Add(new Voltage("Voltage #7", 6, true));
527 v.Add(new Voltage("Standby +3.3V", 7, 10, 10, 0, true));
528 v.Add(new Voltage("VBat", 8, 10, 10));
529 for (int i = 0; i < superIO.Temperatures.Length; i++)
530 t.Add(new Temperature("Temperature #" + (i + 1), i));
531 for (int i = 0; i < superIO.Fans.Length; i++)
532 f.Add(new Fan("Fan #" + (i + 1), i));
536 case Manufacturer.Shuttle:
538 case Model.FH67: // IT8772E
539 v.Add(new Voltage("CPU VCore", 0));
540 v.Add(new Voltage("DRAM", 1));
541 v.Add(new Voltage("PCH VCCIO", 2));
542 v.Add(new Voltage("CPU VCCIO", 3));
543 v.Add(new Voltage("Graphic Voltage", 4));
544 v.Add(new Voltage("Standby +3.3V", 7, 10, 10));
545 v.Add(new Voltage("VBat", 8, 10, 10));
546 t.Add(new Temperature("System", 0));
547 t.Add(new Temperature("CPU", 1));
548 f.Add(new Fan("Fan #1", 0));
549 f.Add(new Fan("CPU Fan", 1));
552 v.Add(new Voltage("Voltage #1", 0, true));
553 v.Add(new Voltage("Voltage #2", 1, true));
554 v.Add(new Voltage("Voltage #3", 2, true));
555 v.Add(new Voltage("Voltage #4", 3, true));
556 v.Add(new Voltage("Voltage #5", 4, true));
557 v.Add(new Voltage("Voltage #6", 5, true));
558 v.Add(new Voltage("Voltage #7", 6, true));
559 v.Add(new Voltage("Standby +3.3V", 7, 10, 10, 0, true));
560 v.Add(new Voltage("VBat", 8, 10, 10));
561 for (int i = 0; i < superIO.Temperatures.Length; i++)
562 t.Add(new Temperature("Temperature #" + (i + 1), i));
563 for (int i = 0; i < superIO.Fans.Length; i++)
564 f.Add(new Fan("Fan #" + (i + 1), i));
569 v.Add(new Voltage("Voltage #1", 0, true));
570 v.Add(new Voltage("Voltage #2", 1, true));
571 v.Add(new Voltage("Voltage #3", 2, true));
572 v.Add(new Voltage("Voltage #4", 3, true));
573 v.Add(new Voltage("Voltage #5", 4, true));
574 v.Add(new Voltage("Voltage #6", 5, true));
575 v.Add(new Voltage("Voltage #7", 6, true));
576 v.Add(new Voltage("Standby +3.3V", 7, 10, 10, 0, true));
577 v.Add(new Voltage("VBat", 8, 10, 10));
578 for (int i = 0; i < superIO.Temperatures.Length; i++)
579 t.Add(new Temperature("Temperature #" + (i + 1), i));
580 for (int i = 0; i < superIO.Fans.Length; i++)
581 f.Add(new Fan("Fan #" + (i + 1), i));
587 v.Add(new Voltage("VCC3V", 0, 150, 150));
588 v.Add(new Voltage("VSB3V", 1, 150, 150));
589 v.Add(new Voltage("Battery", 2, 150, 150));
590 for (int i = 0; i < superIO.Temperatures.Length; i++)
591 t.Add(new Temperature("Temperature #" + (i + 1), i));
592 for (int i = 0; i < superIO.Fans.Length; i++)
593 f.Add(new Fan("Fan #" + (i + 1), i));
601 switch (manufacturer) {
602 case Manufacturer.EVGA:
604 case Model.X58_SLI_Classified: // F71882
605 v.Add(new Voltage("VCC3V", 0, 150, 150));
606 v.Add(new Voltage("CPU VCore", 1, 47, 100));
607 v.Add(new Voltage("DIMM", 2, 47, 100));
608 v.Add(new Voltage("CPU VTT", 3, 24, 100));
609 v.Add(new Voltage("IOH Vcore", 4, 24, 100));
610 v.Add(new Voltage("+5V", 5, 51, 12));
611 v.Add(new Voltage("+12V", 6, 56, 6.8f));
612 v.Add(new Voltage("3VSB", 7, 150, 150));
613 v.Add(new Voltage("VBat", 8, 150, 150));
614 t.Add(new Temperature("CPU", 0));
615 t.Add(new Temperature("VREG", 1));
616 t.Add(new Temperature("System", 2));
617 f.Add(new Fan("CPU Fan", 0));
618 f.Add(new Fan("Power Fan", 1));
619 f.Add(new Fan("Chassis Fan", 2));
622 v.Add(new Voltage("VCC3V", 0, 150, 150));
623 v.Add(new Voltage("CPU VCore", 1));
624 v.Add(new Voltage("Voltage #3", 2, true));
625 v.Add(new Voltage("Voltage #4", 3, true));
626 v.Add(new Voltage("Voltage #5", 4, true));
627 v.Add(new Voltage("Voltage #6", 5, true));
628 v.Add(new Voltage("Voltage #7", 6, true));
629 v.Add(new Voltage("VSB3V", 7, 150, 150));
630 v.Add(new Voltage("VBat", 8, 150, 150));
631 for (int i = 0; i < superIO.Temperatures.Length; i++)
632 t.Add(new Temperature("Temperature #" + (i + 1), i));
633 for (int i = 0; i < superIO.Fans.Length; i++)
634 f.Add(new Fan("Fan #" + (i + 1), i));
639 v.Add(new Voltage("VCC3V", 0, 150, 150));
640 v.Add(new Voltage("CPU VCore", 1));
641 v.Add(new Voltage("Voltage #3", 2, true));
642 v.Add(new Voltage("Voltage #4", 3, true));
643 v.Add(new Voltage("Voltage #5", 4, true));
644 v.Add(new Voltage("Voltage #6", 5, true));
645 v.Add(new Voltage("Voltage #7", 6, true));
646 v.Add(new Voltage("VSB3V", 7, 150, 150));
647 v.Add(new Voltage("VBat", 8, 150, 150));
648 for (int i = 0; i < superIO.Temperatures.Length; i++)
649 t.Add(new Temperature("Temperature #" + (i + 1), i));
650 for (int i = 0; i < superIO.Fans.Length; i++)
651 f.Add(new Fan("Fan #" + (i + 1), i));
657 switch (manufacturer) {
658 case Manufacturer.ASRock:
660 case Model.AOD790GX_128M: // W83627EHF
661 v.Add(new Voltage("CPU VCore", 0));
662 v.Add(new Voltage("Analog +3.3V", 2, 34, 34));
663 v.Add(new Voltage("+3.3V", 4, 10, 10));
664 v.Add(new Voltage("+5V", 5, 20, 10));
665 v.Add(new Voltage("+12V", 6, 28, 5));
666 v.Add(new Voltage("Standby +3.3V", 7, 34, 34));
667 v.Add(new Voltage("VBAT", 8, 34, 34));
668 t.Add(new Temperature("CPU", 0));
669 t.Add(new Temperature("Motherboard", 2));
670 f.Add(new Fan("CPU Fan", 0));
671 f.Add(new Fan("Chassis Fan", 1));
674 v.Add(new Voltage("CPU VCore", 0));
675 v.Add(new Voltage("Voltage #2", 1, true));
676 v.Add(new Voltage("AVCC", 2, 34, 34));
677 v.Add(new Voltage("3VCC", 3, 34, 34));
678 v.Add(new Voltage("Voltage #5", 4, true));
679 v.Add(new Voltage("Voltage #6", 5, true));
680 v.Add(new Voltage("Voltage #7", 6, true));
681 v.Add(new Voltage("3VSB", 7, 34, 34));
682 v.Add(new Voltage("VBAT", 8, 34, 34));
683 v.Add(new Voltage("Voltage #10", 9, true));
684 t.Add(new Temperature("CPU", 0));
685 t.Add(new Temperature("Auxiliary", 1));
686 t.Add(new Temperature("System", 2));
687 f.Add(new Fan("System Fan", 0));
688 f.Add(new Fan("CPU Fan", 1));
689 f.Add(new Fan("Auxiliary Fan", 2));
690 f.Add(new Fan("CPU Fan #2", 3));
691 f.Add(new Fan("Auxiliary Fan #2", 4));
695 v.Add(new Voltage("CPU VCore", 0));
696 v.Add(new Voltage("Voltage #2", 1, true));
697 v.Add(new Voltage("AVCC", 2, 34, 34));
698 v.Add(new Voltage("3VCC", 3, 34, 34));
699 v.Add(new Voltage("Voltage #5", 4, true));
700 v.Add(new Voltage("Voltage #6", 5, true));
701 v.Add(new Voltage("Voltage #7", 6, true));
702 v.Add(new Voltage("3VSB", 7, 34, 34));
703 v.Add(new Voltage("VBAT", 8, 34, 34));
704 v.Add(new Voltage("Voltage #10", 9, true));
705 t.Add(new Temperature("CPU", 0));
706 t.Add(new Temperature("Auxiliary", 1));
707 t.Add(new Temperature("System", 2));
708 f.Add(new Fan("System Fan", 0));
709 f.Add(new Fan("CPU Fan", 1));
710 f.Add(new Fan("Auxiliary Fan", 2));
711 f.Add(new Fan("CPU Fan #2", 3));
712 f.Add(new Fan("Auxiliary Fan #2", 4));
717 case Chip.W83627DHGP:
720 switch (manufacturer) {
721 case Manufacturer.ASRock:
723 case Model._880GMH_USB3: // W83627DHG-P
724 v.Add(new Voltage("CPU VCore", 0));
725 v.Add(new Voltage("+3.3V", 3, 34, 34));
726 v.Add(new Voltage("+5V", 5, 15, 7.5f));
727 v.Add(new Voltage("+12V", 6, 56, 10));
728 v.Add(new Voltage("Standby +3.3V", 7, 34, 34));
729 v.Add(new Voltage("VBAT", 8, 34, 34));
730 t.Add(new Temperature("CPU", 0));
731 t.Add(new Temperature("Motherboard", 2));
732 f.Add(new Fan("Chassis Fan", 0));
733 f.Add(new Fan("CPU Fan", 1));
734 f.Add(new Fan("Power Fan", 2));
737 v.Add(new Voltage("CPU VCore", 0));
738 v.Add(new Voltage("Voltage #2", 1, true));
739 v.Add(new Voltage("AVCC", 2, 34, 34));
740 v.Add(new Voltage("3VCC", 3, 34, 34));
741 v.Add(new Voltage("Voltage #5", 4, true));
742 v.Add(new Voltage("Voltage #6", 5, true));
743 v.Add(new Voltage("Voltage #7", 6, true));
744 v.Add(new Voltage("3VSB", 7, 34, 34));
745 v.Add(new Voltage("VBAT", 8, 34, 34));
746 t.Add(new Temperature("CPU", 0));
747 t.Add(new Temperature("Auxiliary", 1));
748 t.Add(new Temperature("System", 2));
749 f.Add(new Fan("System Fan", 0));
750 f.Add(new Fan("CPU Fan", 1));
751 f.Add(new Fan("Auxiliary Fan", 2));
752 f.Add(new Fan("CPU Fan #2", 3));
753 f.Add(new Fan("Auxiliary Fan #2", 4));
757 case Manufacturer.ASUS:
759 case Model.P6X58D_E: // W83667HG
760 case Model.Rampage_II_GENE: // W83667HG
761 v.Add(new Voltage("CPU VCore", 0));
762 v.Add(new Voltage("+12V", 1, 11.5f, 1.91f));
763 v.Add(new Voltage("Analog +3.3V", 2, 34, 34));
764 v.Add(new Voltage("+3.3V", 3, 34, 34));
765 v.Add(new Voltage("+5V", 4, 15, 7.5f));
766 v.Add(new Voltage("Standby +3.3V", 7, 34, 34));
767 v.Add(new Voltage("VBAT", 8, 34, 34));
768 t.Add(new Temperature("CPU", 0));
769 t.Add(new Temperature("Motherboard", 2));
770 f.Add(new Fan("Chassis Fan #1", 0));
771 f.Add(new Fan("CPU Fan", 1));
772 f.Add(new Fan("Power Fan", 2));
773 f.Add(new Fan("Chassis Fan #2", 3));
774 f.Add(new Fan("Chassis Fan #3", 4));
776 case Model.Rampage_Extreme: // W83667HG
777 v.Add(new Voltage("CPU VCore", 0));
778 v.Add(new Voltage("+12V", 1, 12, 2));
779 v.Add(new Voltage("Analog +3.3V", 2, 34, 34));
780 v.Add(new Voltage("+3.3V", 3, 34, 34));
781 v.Add(new Voltage("+5V", 4, 15, 7.5f));
782 v.Add(new Voltage("Standby +3.3V", 7, 34, 34));
783 v.Add(new Voltage("VBAT", 8, 34, 34));
784 t.Add(new Temperature("CPU", 0));
785 t.Add(new Temperature("Motherboard", 2));
786 f.Add(new Fan("Chassis Fan #1", 0));
787 f.Add(new Fan("CPU Fan", 1));
788 f.Add(new Fan("Power Fan", 2));
789 f.Add(new Fan("Chassis Fan #2", 3));
790 f.Add(new Fan("Chassis Fan #3", 4));
793 v.Add(new Voltage("CPU VCore", 0));
794 v.Add(new Voltage("Voltage #2", 1, true));
795 v.Add(new Voltage("AVCC", 2, 34, 34));
796 v.Add(new Voltage("3VCC", 3, 34, 34));
797 v.Add(new Voltage("Voltage #5", 4, true));
798 v.Add(new Voltage("Voltage #6", 5, true));
799 v.Add(new Voltage("Voltage #7", 6, true));
800 v.Add(new Voltage("3VSB", 7, 34, 34));
801 v.Add(new Voltage("VBAT", 8, 34, 34));
802 t.Add(new Temperature("CPU", 0));
803 t.Add(new Temperature("Auxiliary", 1));
804 t.Add(new Temperature("System", 2));
805 f.Add(new Fan("System Fan", 0));
806 f.Add(new Fan("CPU Fan", 1));
807 f.Add(new Fan("Auxiliary Fan", 2));
808 f.Add(new Fan("CPU Fan #2", 3));
809 f.Add(new Fan("Auxiliary Fan #2", 4));
814 v.Add(new Voltage("CPU VCore", 0));
815 v.Add(new Voltage("Voltage #2", 1, true));
816 v.Add(new Voltage("AVCC", 2, 34, 34));
817 v.Add(new Voltage("3VCC", 3, 34, 34));
818 v.Add(new Voltage("Voltage #5", 4, true));
819 v.Add(new Voltage("Voltage #6", 5, true));
820 v.Add(new Voltage("Voltage #7", 6, true));
821 v.Add(new Voltage("3VSB", 7, 34, 34));
822 v.Add(new Voltage("VBAT", 8, 34, 34));
823 t.Add(new Temperature("CPU", 0));
824 t.Add(new Temperature("Auxiliary", 1));
825 t.Add(new Temperature("System", 2));
826 f.Add(new Fan("System Fan", 0));
827 f.Add(new Fan("CPU Fan", 1));
828 f.Add(new Fan("Auxiliary Fan", 2));
829 f.Add(new Fan("CPU Fan #2", 3));
830 f.Add(new Fan("Auxiliary Fan #2", 4));
837 v.Add(new Voltage("CPU VCore", 0));
838 v.Add(new Voltage("Voltage #2", 1, true));
839 v.Add(new Voltage("Voltage #3", 2, true));
840 v.Add(new Voltage("AVCC", 3, 34, 51));
841 v.Add(new Voltage("Voltage #5", 4, true));
842 v.Add(new Voltage("5VSB", 5, 34, 51));
843 v.Add(new Voltage("VBAT", 6));
844 t.Add(new Temperature("CPU", 0));
845 t.Add(new Temperature("Auxiliary", 1));
846 t.Add(new Temperature("System", 2));
847 f.Add(new Fan("System Fan", 0));
848 f.Add(new Fan("CPU Fan", 1));
849 f.Add(new Fan("Auxiliary Fan", 2));
853 switch (manufacturer) {
854 case Manufacturer.ASUS:
856 case Model.P8P67: // NCT6776F
857 case Model.P8P67_EVO: // NCT6776F
858 case Model.P8P67_PRO: // NCT6776F
859 v.Add(new Voltage("CPU VCore", 0));
860 v.Add(new Voltage("+12V", 1, 11, 1));
861 v.Add(new Voltage("Analog +3.3V", 2, 34, 34));
862 v.Add(new Voltage("+3.3V", 3, 34, 34));
863 v.Add(new Voltage("+5V", 4, 12, 3));
864 v.Add(new Voltage("Standby +3.3V", 7, 34, 34));
865 v.Add(new Voltage("VBAT", 8, 34, 34));
866 t.Add(new Temperature("CPU", 0));
867 t.Add(new Temperature("Auxiliary", 2));
868 t.Add(new Temperature("Motherboard", 3));
869 f.Add(new Fan("Chassis Fan #1", 0));
870 f.Add(new Fan("CPU Fan", 1));
871 f.Add(new Fan("Power Fan", 2));
872 f.Add(new Fan("Chassis Fan #2", 3));
874 case Model.P8P67_M_PRO: // NCT6776F
875 v.Add(new Voltage("CPU VCore", 0));
876 v.Add(new Voltage("+12V", 1, 11, 1));
877 v.Add(new Voltage("Analog +3.3V", 2, 34, 34));
878 v.Add(new Voltage("+3.3V", 3, 34, 34));
879 v.Add(new Voltage("+5V", 4, 12, 3));
880 v.Add(new Voltage("Voltage #6", 5, true));
881 v.Add(new Voltage("Voltage #7", 6, true));
882 v.Add(new Voltage("Standby +3.3V", 7, 34, 34));
883 v.Add(new Voltage("VBAT", 8, 34, 34));
884 t.Add(new Temperature("CPU", 0));
885 t.Add(new Temperature("Motherboard", 3));
886 f.Add(new Fan("Chassis Fan #1", 0));
887 f.Add(new Fan("CPU Fan", 1));
888 f.Add(new Fan("Chassis Fan #2", 2));
889 f.Add(new Fan("Power Fan", 3));
890 f.Add(new Fan("Auxiliary Fan", 4));
893 v.Add(new Voltage("CPU VCore", 0));
894 v.Add(new Voltage("Voltage #2", 1, true));
895 v.Add(new Voltage("AVCC", 2, 34, 34));
896 v.Add(new Voltage("3VCC", 3, 34, 34));
897 v.Add(new Voltage("Voltage #5", 4, true));
898 v.Add(new Voltage("Voltage #6", 5, true));
899 v.Add(new Voltage("Voltage #7", 6, true));
900 v.Add(new Voltage("3VSB", 7, 34, 34));
901 v.Add(new Voltage("VBAT", 8, 34, 34));
902 t.Add(new Temperature("CPU", 0));
903 t.Add(new Temperature("CPU", 1));
904 t.Add(new Temperature("Auxiliary", 2));
905 t.Add(new Temperature("System", 3));
906 for (int i = 0; i < superIO.Fans.Length; i++)
907 f.Add(new Fan("Fan #" + (i + 1), i));
912 v.Add(new Voltage("CPU VCore", 0));
913 v.Add(new Voltage("Voltage #2", 1, true));
914 v.Add(new Voltage("AVCC", 2, 34, 34));
915 v.Add(new Voltage("3VCC", 3, 34, 34));
916 v.Add(new Voltage("Voltage #5", 4, true));
917 v.Add(new Voltage("Voltage #6", 5, true));
918 v.Add(new Voltage("Voltage #7", 6, true));
919 v.Add(new Voltage("3VSB", 7, 34, 34));
920 v.Add(new Voltage("VBAT", 8, 34, 34));
921 t.Add(new Temperature("CPU", 0));
922 t.Add(new Temperature("CPU", 1));
923 t.Add(new Temperature("Auxiliary", 2));
924 t.Add(new Temperature("System", 3));
925 for (int i = 0; i < superIO.Fans.Length; i++)
926 f.Add(new Fan("Fan #" + (i + 1), i));
931 for (int i = 0; i < superIO.Voltages.Length; i++)
932 v.Add(new Voltage("Voltage #" + (i + 1), i, true));
933 for (int i = 0; i < superIO.Temperatures.Length; i++)
934 t.Add(new Temperature("Temperature #" + (i + 1), i));
935 for (int i = 0; i < superIO.Fans.Length; i++)
936 f.Add(new Fan("Fan #" + (i + 1), i));
940 const string formula = "Voltage = value + (value - Vf) * Ri / Rf.";
941 foreach (Voltage voltage in v)
942 if (voltage.Index < superIO.Voltages.Length) {
943 Sensor sensor = new Sensor(voltage.Name, voltage.Index,
944 voltage.Hidden, SensorType.Voltage, this, new [] {
945 new ParameterDescription("Ri [kΩ]", "Input resistance.\n" +
946 formula, voltage.Ri),
947 new ParameterDescription("Rf [kΩ]", "Reference resistance.\n" +
948 formula, voltage.Rf),
949 new ParameterDescription("Vf [V]", "Reference voltage.\n" +
952 voltages.Add(sensor);
955 foreach (Temperature temperature in t)
956 if (temperature.Index < superIO.Temperatures.Length) {
957 Sensor sensor = new Sensor(temperature.Name, temperature.Index,
958 SensorType.Temperature, this, new [] {
959 new ParameterDescription("Offset [°C]", "Temperature offset.", 0)
961 temperatures.Add(sensor);
964 foreach (Fan fan in f)
965 if (fan.Index < superIO.Fans.Length) {
966 Sensor sensor = new Sensor(fan.Name, fan.Index, SensorType.Fan,
972 public override HardwareType HardwareType {
973 get { return HardwareType.SuperIO; }
976 public override IHardware Parent {
977 get { return mainboard; }
981 public override string GetReport() {
982 return superIO.GetReport();
985 public override void Update() {
988 foreach (Sensor sensor in voltages) {
989 float? value = readVoltage(sensor.Index);
990 if (value.HasValue) {
991 sensor.Value = value + (value - sensor.Parameters[2].Value) *
992 sensor.Parameters[0].Value / sensor.Parameters[1].Value;
993 ActivateSensor(sensor);
997 foreach (Sensor sensor in temperatures) {
998 float? value = readTemperature(sensor.Index);
999 if (value.HasValue) {
1000 sensor.Value = value + sensor.Parameters[0].Value;
1001 ActivateSensor(sensor);
1005 foreach (Sensor sensor in fans) {
1006 float? value = readFan(sensor.Index);
1007 if (value.HasValue) {
1008 sensor.Value = value;
1009 if (value.Value > 0)
1010 ActivateSensor(sensor);
1017 private class Voltage {
1018 public readonly string Name;
1019 public readonly int Index;
1020 public readonly float Ri;
1021 public readonly float Rf;
1022 public readonly float Vf;
1023 public readonly bool Hidden;
1025 public Voltage(string name, int index) :
1026 this(name, index, false) { }
1028 public Voltage(string name, int index, bool hidden) :
1029 this(name, index, 0, 1, 0, hidden) { }
1031 public Voltage(string name, int index, float ri, float rf) :
1032 this(name, index, ri, rf, 0, false) { }
1034 // float ri = 0, float rf = 1, float vf = 0, bool hidden = false)
1036 public Voltage(string name, int index,
1037 float ri, float rf, float vf, bool hidden)
1044 this.Hidden = hidden;
1048 private class Temperature {
1049 public readonly string Name;
1050 public readonly int Index;
1052 public Temperature(string name, int index) {
1059 public readonly string Name;
1060 public readonly int Index;
1062 public Fan(string name, int index) {