1.1 --- a/Hardware/CPU/AMD0FCPU.cs Tue Feb 23 19:45:40 2010 +0000
1.2 +++ b/Hardware/CPU/AMD0FCPU.cs Sat Feb 27 15:55:17 2010 +0000
1.3 @@ -79,13 +79,23 @@
1.4
1.5 totalLoad = new Sensor("CPU Total", 0, SensorType.Load, this);
1.6
1.7 + offset = -49.0f;
1.8 +
1.9 + // AM2+ 65nm +21 offset
1.10 + if (model >= 0x69 && model != 0xc1 && model != 0x6c && model != 0x7c)
1.11 + offset += 21;
1.12 +
1.13 coreTemperatures = new Sensor[coreCount];
1.14 coreLoads = new Sensor[coreCount];
1.15 for (int i = 0; i < coreCount; i++) {
1.16 coreTemperatures[i] =
1.17 new Sensor("Core #" + (i + 1), i, SensorType.Temperature, this);
1.18 - coreLoads[i] = new Sensor("Core #" + (i + 1), i + 1,
1.19 - SensorType.Load, this);
1.20 + coreLoads[i] = new Sensor("Core #" + (i + 1), i + 1, null,
1.21 + SensorType.Load, this, new ParameterDescription[] {
1.22 + new ParameterDescription("Offset",
1.23 + "Temperature offset of the thermal sensor.\n" +
1.24 + "Temperature = Value + Offset.", offset)
1.25 + });
1.26 }
1.27
1.28 cpuLoad = new CPULoad(coreCount, 1);
1.29 @@ -98,12 +108,6 @@
1.30 pciAddress = WinRing0.FindPciDeviceById(PCI_AMD_VENDOR_ID,
1.31 PCI_AMD_0FH_MISCELLANEOUS_DEVICE_ID, 0);
1.32
1.33 - offset = -49.0f;
1.34 -
1.35 - // AM2+ 65nm +21 offset
1.36 - if (model >= 0x69 && model != 0xc1 && model != 0x6c && model != 0x7c)
1.37 - offset += 21;
1.38 -
1.39 Update();
1.40 }
1.41
1.42 @@ -133,7 +137,8 @@
1.43 uint value;
1.44 if (WinRing0.ReadPciConfigDwordEx(
1.45 pciAddress, THERMTRIP_STATUS_REGISTER, out value)) {
1.46 - coreTemperatures[i].Value = ((value >> 16) & 0xFF) + offset;
1.47 + coreTemperatures[i].Value = ((value >> 16) & 0xFF) +
1.48 + coreTemperatures[i].Parameters[0].Value;
1.49 ActivateSensor(coreTemperatures[i]);
1.50 } else {
1.51 DeactivateSensor(coreTemperatures[i]);