Added a mainboard specific configuration for the ASUS P8P67-M Pro and fixed a few problems in the NCT677X implementation.
1.1 --- a/Hardware/LPC/NCT677X.cs Sat Apr 30 16:03:58 2011 +0000
1.2 +++ b/Hardware/LPC/NCT677X.cs Sat Apr 30 21:01:54 2011 +0000
1.3 @@ -47,7 +47,7 @@
1.4 private readonly Chip chip;
1.5
1.6 private readonly float?[] voltages = new float?[9];
1.7 - private readonly float?[] temperatures = new float?[3];
1.8 + private readonly float?[] temperatures = new float?[4];
1.9 private readonly float?[] fans = new float?[0];
1.10
1.11 // Hardware Monitor
1.12 @@ -73,12 +73,13 @@
1.13 private const ushort VOLTAGE_VBAT_REG = 0x0551;
1.14
1.15 private readonly ushort[] TEMPERATURE_REG =
1.16 - { 0x150, 0x250, 0x27, 0x62B, 0x62C, 0x62D };
1.17 + { 0x027, 0x73, 0x75, 0x77, 0x150, 0x250, 0x62B, 0x62C, 0x62D };
1.18 private readonly ushort[] TEMPERATURE_HALF_REG =
1.19 - { 0x151, 0x251, 0, 0x62E, 0x62E, 0x62E };
1.20 + { 0, 0x74, 0x76, 0x78, 0x151, 0x251, 0x62E, 0x62E, 0x62E };
1.21 private readonly ushort[] TEMPERATURE_SRC_REG =
1.22 - { 0x621, 0x622, 0x623, 0x624, 0x625, 0x626 };
1.23 - private readonly int[] TEMPERATURE_HALF_BIT = { 7, 7, -1, 0, 1, 2 };
1.24 + { 0x621, 0x100, 0x200, 0x300, 0x622, 0x623, 0x624, 0x625, 0x626 };
1.25 + private readonly int[] TEMPERATURE_HALF_BIT =
1.26 + { -1, 7, 7, 7, 7, 7, 0, 1, 2 };
1.27 private readonly ushort[] VOLTAGE_REG =
1.28 { 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x550, 0x551 };
1.29 private readonly ushort[] FAN_RPM_REG =
1.30 @@ -86,19 +87,19 @@
1.31
1.32 private readonly int minFanRPM;
1.33
1.34 - private enum TemperatureSource : byte {
1.35 + private enum SourceNCT6771F : byte {
1.36 SYSTIN = 1,
1.37 CPUTIN = 2,
1.38 AUXTIN = 3,
1.39 SMBUSMASTER = 4,
1.40 - PECI0 = 5,
1.41 - PECI1 = 6,
1.42 - PECI2 = 7,
1.43 - PECI3 = 8,
1.44 - PECI4 = 9,
1.45 - PECI5 = 10,
1.46 - PECI6 = 11,
1.47 - PECI7 = 12,
1.48 + PECI_0 = 5,
1.49 + PECI_1 = 6,
1.50 + PECI_2 = 7,
1.51 + PECI_3 = 8,
1.52 + PECI_4 = 9,
1.53 + PECI_5 = 10,
1.54 + PECI_6 = 11,
1.55 + PECI_7 = 12,
1.56 PCH_CHIP_CPU_MAX_TEMP = 13,
1.57 PCH_CHIP_TEMP = 14,
1.58 PCH_CPU_TEMP = 15,
1.59 @@ -109,6 +110,31 @@
1.60 PCH_DIM3_TEMP = 20
1.61 }
1.62
1.63 + private enum SourceNCT6776F : byte {
1.64 + SYSTIN = 1,
1.65 + CPUTIN = 2,
1.66 + AUXTIN = 3,
1.67 + SMBUSMASTER_0 = 4,
1.68 + SMBUSMASTER_1 = 5,
1.69 + SMBUSMASTER_2 = 6,
1.70 + SMBUSMASTER_3 = 7,
1.71 + SMBUSMASTER_4 = 8,
1.72 + SMBUSMASTER_5 = 9,
1.73 + SMBUSMASTER_6 = 10,
1.74 + SMBUSMASTER_7 = 11,
1.75 + PECI_0 = 12,
1.76 + PECI_1 = 13,
1.77 + PCH_CHIP_CPU_MAX_TEMP = 14,
1.78 + PCH_CHIP_TEMP = 15,
1.79 + PCH_CPU_TEMP = 16,
1.80 + PCH_MCH_TEMP = 17,
1.81 + PCH_DIM0_TEMP = 18,
1.82 + PCH_DIM1_TEMP = 19,
1.83 + PCH_DIM2_TEMP = 20,
1.84 + PCH_DIM3_TEMP = 21,
1.85 + BYTE_TEMP = 22
1.86 + }
1.87 +
1.88 public NCT677X(Chip chip, byte revision, ushort port) {
1.89 this.chip = chip;
1.90 this.revision = revision;
1.91 @@ -162,25 +188,36 @@
1.92 voltages[i] = valid ? value : (float?)null;
1.93 }
1.94
1.95 - for (int i = 0; i < TEMPERATURE_REG.Length; i++) {
1.96 + for (int i = TEMPERATURE_REG.Length - 1; i >= 0 ; i--) {
1.97 int value = ((sbyte)ReadByte(TEMPERATURE_REG[i])) << 1;
1.98 if (TEMPERATURE_HALF_BIT[i] > 0) {
1.99 value |= ((ReadByte(TEMPERATURE_HALF_REG[i]) >>
1.100 TEMPERATURE_HALF_BIT[i]) & 0x1);
1.101 }
1.102
1.103 - TemperatureSource source = (TemperatureSource)
1.104 - ReadByte(TEMPERATURE_SRC_REG[i]);
1.105 + byte source = ReadByte(TEMPERATURE_SRC_REG[i]);
1.106
1.107 float? temperature = 0.5f * value;
1.108 if (temperature > 125 || temperature < -55)
1.109 temperature = null;
1.110
1.111 - switch (source) {
1.112 - case TemperatureSource.CPUTIN: temperatures[0] = temperature; break;
1.113 - case TemperatureSource.AUXTIN: temperatures[1] = temperature; break;
1.114 - case TemperatureSource.SYSTIN: temperatures[2] = temperature; break;
1.115 - }
1.116 + switch (chip) {
1.117 + case Chip.NCT6771F:
1.118 + switch ((SourceNCT6771F)source) {
1.119 + case SourceNCT6771F.PECI_0: temperatures[0] = temperature; break;
1.120 + case SourceNCT6771F.CPUTIN: temperatures[1] = temperature; break;
1.121 + case SourceNCT6771F.AUXTIN: temperatures[2] = temperature; break;
1.122 + case SourceNCT6771F.SYSTIN: temperatures[3] = temperature; break;
1.123 +
1.124 + } break;
1.125 + case Chip.NCT6776F:
1.126 + switch ((SourceNCT6776F)source) {
1.127 + case SourceNCT6776F.PECI_0: temperatures[0] = temperature; break;
1.128 + case SourceNCT6776F.CPUTIN: temperatures[1] = temperature; break;
1.129 + case SourceNCT6776F.AUXTIN: temperatures[2] = temperature; break;
1.130 + case SourceNCT6776F.SYSTIN: temperatures[3] = temperature; break;
1.131 + } break;
1.132 + }
1.133 }
1.134
1.135 for (int i = 0; i < fans.Length; i++) {
2.1 --- a/Hardware/Mainboard/Model.cs Sat Apr 30 16:03:58 2011 +0000
2.2 +++ b/Hardware/Mainboard/Model.cs Sat Apr 30 21:01:54 2011 +0000
2.3 @@ -50,6 +50,7 @@
2.4 P5W_DH_Deluxe,
2.5 P6X58D_E,
2.6 P8P67_PRO,
2.7 + P8P67_M_PRO,
2.8 Rampage_Extreme,
2.9 Rampage_II_GENE,
2.10
3.1 --- a/Hardware/Mainboard/SMBIOS.cs Sat Apr 30 16:03:58 2011 +0000
3.2 +++ b/Hardware/Mainboard/SMBIOS.cs Sat Apr 30 21:01:54 2011 +0000
3.3 @@ -324,6 +324,8 @@
3.4 return Model.P6X58D_E;
3.5 case "P8P67 PRO":
3.6 return Model.P8P67_PRO;
3.7 + case "P8P67-M PRO":
3.8 + return Model.P8P67_M_PRO;
3.9 case "Rampage Extreme":
3.10 return Model.Rampage_Extreme;
3.11 case "Rampage II GENE":
4.1 --- a/Hardware/Mainboard/SuperIOHardware.cs Sat Apr 30 16:03:58 2011 +0000
4.2 +++ b/Hardware/Mainboard/SuperIOHardware.cs Sat Apr 30 21:01:54 2011 +0000
4.3 @@ -757,15 +757,33 @@
4.4 v.Add(new Voltage("Voltage #7", 6, true));
4.5 v.Add(new Voltage("3VSB", 7, 34, 34));
4.6 v.Add(new Voltage("VBAT", 8, 34, 34));
4.7 - t.Add(new Temperature("CPU", 0));
4.8 - t.Add(new Temperature("Auxiliary", 1));
4.9 - t.Add(new Temperature("System", 2));
4.10 + t.Add(new Temperature("CPU", 1));
4.11 + t.Add(new Temperature("Auxiliary", 2));
4.12 + t.Add(new Temperature("System", 3));
4.13 f.Add(new Fan("System Fan", 0));
4.14 f.Add(new Fan("CPU Fan", 1));
4.15 f.Add(new Fan("Auxiliary Fan", 2));
4.16 f.Add(new Fan("Auxiliary Fan #2", 3));
4.17 f.Add(new Fan("Auxiliary Fan #3", 4));
4.18 break;
4.19 + case Model.P8P67_M_PRO: // NCT6776F
4.20 + v.Add(new Voltage("CPU VCore", 0));
4.21 + v.Add(new Voltage("+12V", 1, 11, 1));
4.22 + v.Add(new Voltage("Analog +3.3V", 2, 34, 34));
4.23 + v.Add(new Voltage("+3V", 3, 34, 34));
4.24 + v.Add(new Voltage("+5V", 4, 12, 3));
4.25 + v.Add(new Voltage("Voltage #6", 5, true));
4.26 + v.Add(new Voltage("Voltage #7", 6, true));
4.27 + v.Add(new Voltage("Standby +3.3V", 7, 34, 34));
4.28 + v.Add(new Voltage("VBAT", 8, 34, 34));
4.29 + t.Add(new Temperature("CPU", 0));
4.30 + t.Add(new Temperature("Motherboard", 3));
4.31 + f.Add(new Fan("Chassis Fan #1", 0));
4.32 + f.Add(new Fan("CPU Fan", 1));
4.33 + f.Add(new Fan("Chassis Fan #2", 2));
4.34 + f.Add(new Fan("Power Fan", 3));
4.35 + f.Add(new Fan("Auxiliary Fan", 4));
4.36 + break;
4.37 default:
4.38 v.Add(new Voltage("CPU VCore", 0));
4.39 v.Add(new Voltage("Voltage #2", 1, true));
4.40 @@ -777,8 +795,9 @@
4.41 v.Add(new Voltage("3VSB", 7, 34, 34));
4.42 v.Add(new Voltage("VBAT", 8, 34, 34));
4.43 t.Add(new Temperature("CPU", 0));
4.44 - t.Add(new Temperature("Auxiliary", 1));
4.45 - t.Add(new Temperature("System", 2));
4.46 + t.Add(new Temperature("CPU", 1));
4.47 + t.Add(new Temperature("Auxiliary", 2));
4.48 + t.Add(new Temperature("System", 3));
4.49 for (int i = 0; i < superIO.Fans.Length; i++)
4.50 f.Add(new Fan("Fan #" + (i + 1), i));
4.51 break;
4.52 @@ -795,8 +814,9 @@
4.53 v.Add(new Voltage("3VSB", 7, 34, 34));
4.54 v.Add(new Voltage("VBAT", 8, 34, 34));
4.55 t.Add(new Temperature("CPU", 0));
4.56 - t.Add(new Temperature("Auxiliary", 1));
4.57 - t.Add(new Temperature("System", 2));
4.58 + t.Add(new Temperature("CPU", 1));
4.59 + t.Add(new Temperature("Auxiliary", 2));
4.60 + t.Add(new Temperature("System", 3));
4.61 for (int i = 0; i < superIO.Fans.Length; i++)
4.62 f.Add(new Fan("Fan #" + (i + 1), i));
4.63 break;