Release version 0.1.5. Added support for AMD family 0Fh CPUs. Fixed saving of wrong window size values for minimized forms (by not saving them).
1.1 --- a/GUI/MainForm.cs Sun Jan 31 19:30:00 2010 +0000
1.2 +++ b/GUI/MainForm.cs Sun Jan 31 20:57:18 2010 +0000
1.3 @@ -238,10 +238,12 @@
1.4 Utilities.Config.Set(tempMenuItem.Name, tempMenuItem.Checked);
1.5 Utilities.Config.Set(fansMenuItem.Name, fansMenuItem.Checked);
1.6
1.7 - Utilities.Config.Set("mainForm.Location.X", Location.X);
1.8 - Utilities.Config.Set("mainForm.Location.Y", Location.Y);
1.9 - Utilities.Config.Set("mainForm.Width", Width);
1.10 - Utilities.Config.Set("mainForm.Height", Height);
1.11 + if (WindowState != FormWindowState.Minimized) {
1.12 + Utilities.Config.Set("mainForm.Location.X", Location.X);
1.13 + Utilities.Config.Set("mainForm.Location.Y", Location.Y);
1.14 + Utilities.Config.Set("mainForm.Width", Width);
1.15 + Utilities.Config.Set("mainForm.Height", Height);
1.16 + }
1.17
1.18 foreach (IGroup group in groupList)
1.19 group.Close();
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/Hardware/CPU/AMD0FCPU.cs Sun Jan 31 20:57:18 2010 +0000
2.3 @@ -0,0 +1,136 @@
2.4 +/*
2.5 +
2.6 + Version: MPL 1.1/GPL 2.0/LGPL 2.1
2.7 +
2.8 + The contents of this file are subject to the Mozilla Public License Version
2.9 + 1.1 (the "License"); you may not use this file except in compliance with
2.10 + the License. You may obtain a copy of the License at
2.11 +
2.12 + http://www.mozilla.org/MPL/
2.13 +
2.14 + Software distributed under the License is distributed on an "AS IS" basis,
2.15 + WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
2.16 + for the specific language governing rights and limitations under the License.
2.17 +
2.18 + The Original Code is the Open Hardware Monitor code.
2.19 +
2.20 + The Initial Developer of the Original Code is
2.21 + Michael Möller <m.moeller@gmx.ch>.
2.22 + Portions created by the Initial Developer are Copyright (C) 2009-2010
2.23 + the Initial Developer. All Rights Reserved.
2.24 +
2.25 + Contributor(s):
2.26 +
2.27 + Alternatively, the contents of this file may be used under the terms of
2.28 + either the GNU General Public License Version 2 or later (the "GPL"), or
2.29 + the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
2.30 + in which case the provisions of the GPL or the LGPL are applicable instead
2.31 + of those above. If you wish to allow use of your version of this file only
2.32 + under the terms of either the GPL or the LGPL, and not to allow others to
2.33 + use your version of this file under the terms of the MPL, indicate your
2.34 + decision by deleting the provisions above and replace them with the notice
2.35 + and other provisions required by the GPL or the LGPL. If you do not delete
2.36 + the provisions above, a recipient may use your version of this file under
2.37 + the terms of any one of the MPL, the GPL or the LGPL.
2.38 +
2.39 +*/
2.40 +
2.41 +using System;
2.42 +using System.Collections.Generic;
2.43 +using System.Drawing;
2.44 +using System.Text;
2.45 +
2.46 +
2.47 +namespace OpenHardwareMonitor.Hardware.CPU {
2.48 + public class AMD0FCPU : IHardware {
2.49 +
2.50 + private string name;
2.51 + private Image icon;
2.52 +
2.53 + private uint pciAddress;
2.54 +
2.55 + private Sensor[] coreTemperatures;
2.56 +
2.57 + private float offset;
2.58 +
2.59 + private const ushort PCI_AMD_VENDOR_ID = 0x1022;
2.60 + private const ushort PCI_AMD_0FH_MISCELLANEOUS_DEVICE_ID = 0x1103;
2.61 + private const uint THERMTRIP_STATUS_REGISTER = 0xE4;
2.62 + private const byte THERM_SENSE_CORE_SEL_CPU0 = 0x2;
2.63 + private const byte THERM_SENSE_CORE_SEL_CPU1 = 0x0;
2.64 +
2.65 + public AMD0FCPU(string name, uint family, uint model, uint stepping,
2.66 + uint[,] cpuidData, uint[,] cpuidExtData) {
2.67 +
2.68 + this.name = name;
2.69 + this.icon = Utilities.EmbeddedResources.GetImage("cpu.png");
2.70 +
2.71 + uint coreCount = 1;
2.72 + if (cpuidExtData.GetLength(0) > 8)
2.73 + coreCount = (cpuidExtData[8, 2] & 0xFF) + 1;
2.74 +
2.75 + // max two cores
2.76 + coreCount = coreCount > 2 ? 2 : coreCount;
2.77 +
2.78 + coreTemperatures = new Sensor[coreCount];
2.79 + for (int i = 0; i < coreCount; i++)
2.80 + coreTemperatures[i] =
2.81 + new Sensor("Core #" + (i + 1), i, SensorType.Temperature, this);
2.82 +
2.83 + pciAddress = WinRing0.FindPciDeviceById(PCI_AMD_VENDOR_ID,
2.84 + PCI_AMD_0FH_MISCELLANEOUS_DEVICE_ID, 0);
2.85 +
2.86 + offset = -49.0f;
2.87 +
2.88 + // AM2+ 65nm +21 offset
2.89 + if (model >= 0x69 && model != 0xc1 && model != 0x6c && model != 0x7c)
2.90 + offset += 21;
2.91 +
2.92 + Update();
2.93 + }
2.94 +
2.95 + public string Name {
2.96 + get { return name; }
2.97 + }
2.98 +
2.99 + public string Identifier {
2.100 + get { return "/amdcpu/0"; }
2.101 + }
2.102 +
2.103 + public Image Icon {
2.104 + get { return icon; }
2.105 + }
2.106 +
2.107 + public ISensor[] Sensors {
2.108 + get {
2.109 + return coreTemperatures;
2.110 + }
2.111 + }
2.112 +
2.113 + public string GetReport() {
2.114 + return null;
2.115 + }
2.116 +
2.117 + public void Update() {
2.118 + if (pciAddress == 0xFFFFFFFF)
2.119 + return;
2.120 +
2.121 + for (uint i = 0; i < coreTemperatures.Length; i++) {
2.122 + if (WinRing0.WritePciConfigDwordEx(
2.123 + pciAddress, THERMTRIP_STATUS_REGISTER,
2.124 + i > 0 ? THERM_SENSE_CORE_SEL_CPU1 : THERM_SENSE_CORE_SEL_CPU0)) {
2.125 + uint value;
2.126 + if (WinRing0.ReadPciConfigDwordEx(
2.127 + pciAddress, THERMTRIP_STATUS_REGISTER, out value))
2.128 + coreTemperatures[i].Value = ((value >> 16) & 0xFF) + offset;
2.129 + }
2.130 + }
2.131 + }
2.132 +
2.133 + #pragma warning disable 67
2.134 + public event SensorEventHandler SensorAdded;
2.135 + public event SensorEventHandler SensorRemoved;
2.136 + #pragma warning restore 67
2.137 +
2.138 + }
2.139 +}
3.1 --- a/Hardware/CPU/CPUGroup.cs Sun Jan 31 19:30:00 2010 +0000
3.2 +++ b/Hardware/CPU/CPUGroup.cs Sun Jan 31 20:57:18 2010 +0000
3.3 @@ -139,6 +139,10 @@
3.4 // check if processor supports a digital thermal sensor
3.5 if (maxCPUID_EXT >= 7 && (cpuidExtData[7, 3] & 1) != 0) {
3.6 switch (family) {
3.7 + case 0x0F:
3.8 + hardware.Add(new AMD0FCPU(name, family, model, stepping,
3.9 + cpuidData, cpuidExtData));
3.10 + break;
3.11 case 0x10:
3.12 hardware.Add(new AMD10CPU(name, family, model, stepping,
3.13 cpuidData, cpuidExtData));
4.1 --- a/Hardware/LPC/W83627DHG.cs Sun Jan 31 19:30:00 2010 +0000
4.2 +++ b/Hardware/LPC/W83627DHG.cs Sun Jan 31 20:57:18 2010 +0000
4.3 @@ -1,4 +1,41 @@
4.4 -using System;
4.5 +/*
4.6 +
4.7 + Version: MPL 1.1/GPL 2.0/LGPL 2.1
4.8 +
4.9 + The contents of this file are subject to the Mozilla Public License Version
4.10 + 1.1 (the "License"); you may not use this file except in compliance with
4.11 + the License. You may obtain a copy of the License at
4.12 +
4.13 + http://www.mozilla.org/MPL/
4.14 +
4.15 + Software distributed under the License is distributed on an "AS IS" basis,
4.16 + WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
4.17 + for the specific language governing rights and limitations under the License.
4.18 +
4.19 + The Original Code is the Open Hardware Monitor code.
4.20 +
4.21 + The Initial Developer of the Original Code is
4.22 + Michael Möller <m.moeller@gmx.ch>.
4.23 + Portions created by the Initial Developer are Copyright (C) 2009-2010
4.24 + the Initial Developer. All Rights Reserved.
4.25 +
4.26 + Contributor(s):
4.27 +
4.28 + Alternatively, the contents of this file may be used under the terms of
4.29 + either the GNU General Public License Version 2 or later (the "GPL"), or
4.30 + the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
4.31 + in which case the provisions of the GPL or the LGPL are applicable instead
4.32 + of those above. If you wish to allow use of your version of this file only
4.33 + under the terms of either the GPL or the LGPL, and not to allow others to
4.34 + use your version of this file under the terms of the MPL, indicate your
4.35 + decision by deleting the provisions above and replace them with the notice
4.36 + and other provisions required by the GPL or the LGPL. If you do not delete
4.37 + the provisions above, a recipient may use your version of this file under
4.38 + the terms of any one of the MPL, the GPL or the LGPL.
4.39 +
4.40 +*/
4.41 +
4.42 +using System;
4.43 using System.Collections.Generic;
4.44 using System.Drawing;
4.45 using System.Text;
5.1 --- a/Hardware/WinRing0.cs Sun Jan 31 19:30:00 2010 +0000
5.2 +++ b/Hardware/WinRing0.cs Sun Jan 31 20:57:18 2010 +0000
5.3 @@ -90,6 +90,8 @@
5.4 ushort deviceId, byte index);
5.5 public delegate bool ReadPciConfigDwordExDelegate(uint pciAddress,
5.6 uint regAddress, out uint value);
5.7 + public delegate bool WritePciConfigDwordExDelegate(uint pciAddress,
5.8 + uint regAddress, uint value);
5.9
5.10 private static InitializeOlsDelegate InitializeOls;
5.11 private static DeinitializeOlsDelegate DeinitializeOls;
5.12 @@ -103,6 +105,8 @@
5.13 public static SetPciMaxBusIndexDelegate SetPciMaxBusIndex;
5.14 public static FindPciDeviceByIdDelegate FindPciDeviceById;
5.15 public static ReadPciConfigDwordExDelegate ReadPciConfigDwordEx;
5.16 + public static WritePciConfigDwordExDelegate WritePciConfigDwordEx;
5.17 +
5.18
5.19 private static void GetDelegate<T>(string entryPoint, out T newDelegate)
5.20 where T : class
5.21 @@ -127,6 +131,7 @@
5.22 GetDelegate("SetPciMaxBusIndex", out SetPciMaxBusIndex);
5.23 GetDelegate("FindPciDeviceById", out FindPciDeviceById);
5.24 GetDelegate("ReadPciConfigDwordEx", out ReadPciConfigDwordEx);
5.25 + GetDelegate("WritePciConfigDwordEx", out WritePciConfigDwordEx);
5.26
5.27 try {
5.28 if (InitializeOls != null && InitializeOls())
6.1 --- a/OpenHardwareMonitor.csproj Sun Jan 31 19:30:00 2010 +0000
6.2 +++ b/OpenHardwareMonitor.csproj Sun Jan 31 20:57:18 2010 +0000
6.3 @@ -58,6 +58,7 @@
6.4 <ItemGroup>
6.5 <Compile Include="GUI\TypeNode.cs" />
6.6 <Compile Include="Hardware\CPU\AMD10CPU.cs" />
6.7 + <Compile Include="Hardware\CPU\AMD0FCPU.cs" />
6.8 <Compile Include="Hardware\HDD\HDD.cs" />
6.9 <Compile Include="Hardware\HDD\HDDGroup.cs" />
6.10 <Compile Include="Hardware\HDD\SMART.cs" />
7.1 --- a/Properties/AssemblyInfo.cs Sun Jan 31 19:30:00 2010 +0000
7.2 +++ b/Properties/AssemblyInfo.cs Sun Jan 31 20:57:18 2010 +0000
7.3 @@ -1,4 +1,41 @@
7.4 -using System.Reflection;
7.5 +/*
7.6 +
7.7 + Version: MPL 1.1/GPL 2.0/LGPL 2.1
7.8 +
7.9 + The contents of this file are subject to the Mozilla Public License Version
7.10 + 1.1 (the "License"); you may not use this file except in compliance with
7.11 + the License. You may obtain a copy of the License at
7.12 +
7.13 + http://www.mozilla.org/MPL/
7.14 +
7.15 + Software distributed under the License is distributed on an "AS IS" basis,
7.16 + WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
7.17 + for the specific language governing rights and limitations under the License.
7.18 +
7.19 + The Original Code is the Open Hardware Monitor code.
7.20 +
7.21 + The Initial Developer of the Original Code is
7.22 + Michael Möller <m.moeller@gmx.ch>.
7.23 + Portions created by the Initial Developer are Copyright (C) 2009-2010
7.24 + the Initial Developer. All Rights Reserved.
7.25 +
7.26 + Contributor(s):
7.27 +
7.28 + Alternatively, the contents of this file may be used under the terms of
7.29 + either the GNU General Public License Version 2 or later (the "GPL"), or
7.30 + the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
7.31 + in which case the provisions of the GPL or the LGPL are applicable instead
7.32 + of those above. If you wish to allow use of your version of this file only
7.33 + under the terms of either the GPL or the LGPL, and not to allow others to
7.34 + use your version of this file under the terms of the MPL, indicate your
7.35 + decision by deleting the provisions above and replace them with the notice
7.36 + and other provisions required by the GPL or the LGPL. If you do not delete
7.37 + the provisions above, a recipient may use your version of this file under
7.38 + the terms of any one of the MPL, the GPL or the LGPL.
7.39 +
7.40 +*/
7.41 +
7.42 +using System.Reflection;
7.43 using System.Runtime.CompilerServices;
7.44 using System.Runtime.InteropServices;
7.45
7.46 @@ -32,5 +69,5 @@
7.47 // You can specify all the values or you can default the Build and Revision Numbers
7.48 // by using the '*' as shown below:
7.49 // [assembly: AssemblyVersion("1.0.*")]
7.50 -[assembly: AssemblyVersion("0.1.4.0")]
7.51 -[assembly: AssemblyFileVersion("0.1.4.0")]
7.52 +[assembly: AssemblyVersion("0.1.5.0")]
7.53 +[assembly: AssemblyFileVersion("0.1.5.0")]