# HG changeset patch # User moel.mich # Date 1341233403 0 # Node ID e471b1c2b1a66e12674f8fcc343292b02ade6a85 # Parent 17dbf781401e681dd92497fa03f963ee8ac654ba Corrected the temperature reading on NCT6779D super I/O chips. Added a default mainboard specific configuration for NCT6779D super I/O chips. diff -r 17dbf781401e -r e471b1c2b1a6 Hardware/LPC/NCT677X.cs --- a/Hardware/LPC/NCT677X.cs Sun Jul 01 21:44:07 2012 +0000 +++ b/Hardware/LPC/NCT677X.cs Mon Jul 02 12:50:03 2012 +0000 @@ -46,7 +46,7 @@ Ring0.WriteIoPort(port + DATA_REGISTER_OFFSET, bank); Ring0.WriteIoPort(port + ADDRESS_REGISTER_OFFSET, register); Ring0.WriteIoPort(port + DATA_REGISTER_OFFSET, value); - } + } // Consts private const ushort NUVOTON_VENDOR_ID = 0x5CA3; @@ -215,6 +215,7 @@ alternateTemperatureRegister = new ushort?[] { null, null, null, null }; break; + case Chip.NCT6779D: fans = new float?[5]; fanRpmBaseRegister = 0x4C0; @@ -354,7 +355,13 @@ if ((temperatureSourceMask & (1 << temperaturesSource[i])) > 0) continue; - temperatures[i] = ReadByte(alternateTemperatureRegister[i].Value); + float? temperature = (sbyte) + ReadByte(alternateTemperatureRegister[i].Value); + + if (temperature > 125 || temperature < -55) + temperature = null; + + temperatures[i] = temperature; } for (int i = 0; i < fans.Length; i++) { diff -r 17dbf781401e -r e471b1c2b1a6 Hardware/Mainboard/SuperIOHardware.cs --- a/Hardware/Mainboard/SuperIOHardware.cs Sun Jul 01 21:44:07 2012 +0000 +++ b/Hardware/Mainboard/SuperIOHardware.cs Mon Jul 02 12:50:03 2012 +0000 @@ -941,6 +941,34 @@ break; } break; + case Chip.NCT6779D: + v.Add(new Voltage("CPU VCore", 0)); + v.Add(new Voltage("Voltage #2", 1, true)); + v.Add(new Voltage("AVCC", 2, 34, 34)); + v.Add(new Voltage("3VCC", 3, 34, 34)); + v.Add(new Voltage("Voltage #5", 4, true)); + v.Add(new Voltage("Voltage #6", 5, true)); + v.Add(new Voltage("Voltage #7", 6, true)); + v.Add(new Voltage("3VSB", 7, 34, 34)); + v.Add(new Voltage("VBAT", 8, 34, 34)); + v.Add(new Voltage("VTT", 9)); + v.Add(new Voltage("Voltage #11", 10, true)); + v.Add(new Voltage("Voltage #12", 11, true)); + v.Add(new Voltage("Voltage #13", 12, true)); + v.Add(new Voltage("Voltage #14", 13, true)); + v.Add(new Voltage("Voltage #15", 14, true)); + t.Add(new Temperature("CPU Core", 0)); + t.Add(new Temperature("Temperature #1", 1)); + t.Add(new Temperature("Temperature #2", 2)); + t.Add(new Temperature("Temperature #3", 3)); + t.Add(new Temperature("Temperature #4", 4)); + t.Add(new Temperature("Temperature #5", 5)); + t.Add(new Temperature("Temperature #6", 6)); + for (int i = 0; i < superIO.Fans.Length; i++) + f.Add(new Fan("Fan #" + (i + 1), i)); + for (int i = 0; i < superIO.Controls.Length; i++) + c.Add(new Ctrl("Fan Control #" + (i + 1), i)); + break; default: for (int i = 0; i < superIO.Voltages.Length; i++) v.Add(new Voltage("Voltage #" + (i + 1), i, true));