# HG changeset patch # User moel.mich # Date 1296167383 0 # Node ID 49c38a2958c86984ee88d01e7bf79aa256899627 # Parent c19d56a0bcad2bb4b5e194783b3308afab73930a Added support for AMD family 11h CPUs. diff -r c19d56a0bcad -r 49c38a2958c8 Hardware/CPU/AMD10CPU.cs --- a/Hardware/CPU/AMD10CPU.cs Sat Jan 22 17:58:32 2011 +0000 +++ b/Hardware/CPU/AMD10CPU.cs Thu Jan 27 22:29:43 2011 +0000 @@ -57,26 +57,36 @@ private const uint COFVID_STATUS = 0xC0010071; private const byte MISCELLANEOUS_CONTROL_FUNCTION = 3; - private const ushort MISCELLANEOUS_CONTROL_DEVICE_ID = 0x1203; + private const ushort FAMILY_10H_MISCELLANEOUS_CONTROL_DEVICE_ID = 0x1203; + private const ushort FAMILY_11H_MISCELLANEOUS_CONTROL_DEVICE_ID = 0x1303; private const uint REPORTED_TEMPERATURE_CONTROL_REGISTER = 0xA4; private readonly uint miscellaneousControlAddress; + private readonly ushort miscellaneousControlDeviceId; private double timeStampCounterMultiplier; public AMD10CPU(int processorIndex, CPUID[][] cpuid, ISettings settings) : base(processorIndex, cpuid, settings) { - // AMD family 10h processors support only one temperature sensor + // AMD family 10h/11h processors support only one temperature sensor coreTemperature = new Sensor( "Core" + (coreCount > 1 ? " #1 - #" + coreCount : ""), 0, SensorType.Temperature, this, new [] { new ParameterDescription("Offset [°C]", "Temperature offset.", 0) }, settings); + switch (family) { + case 0x10: miscellaneousControlDeviceId = + FAMILY_10H_MISCELLANEOUS_CONTROL_DEVICE_ID; break; + case 0x11: miscellaneousControlDeviceId = + FAMILY_11H_MISCELLANEOUS_CONTROL_DEVICE_ID; break; + default: miscellaneousControlDeviceId = 0; break; + } + // get the pci address for the Miscellaneous Control registers miscellaneousControlAddress = GetPciAddress( - MISCELLANEOUS_CONTROL_FUNCTION, MISCELLANEOUS_CONTROL_DEVICE_ID); + MISCELLANEOUS_CONTROL_FUNCTION, miscellaneousControlDeviceId); busClock = new Sensor("Bus Speed", 0, SensorType.Clock, this, settings); coreClocks = new Sensor[coreCount]; diff -r c19d56a0bcad -r 49c38a2958c8 Hardware/CPU/CPUGroup.cs --- a/Hardware/CPU/CPUGroup.cs Sat Jan 22 17:58:32 2011 +0000 +++ b/Hardware/CPU/CPUGroup.cs Thu Jan 27 22:29:43 2011 +0000 @@ -124,6 +124,7 @@ hardware.Add(new AMD0FCPU(index, coreThreads, settings)); break; case 0x10: + case 0x11: hardware.Add(new AMD10CPU(index, coreThreads, settings)); break; default: diff -r c19d56a0bcad -r 49c38a2958c8 Properties/AssemblyVersion.cs --- a/Properties/AssemblyVersion.cs Sat Jan 22 17:58:32 2011 +0000 +++ b/Properties/AssemblyVersion.cs Thu Jan 27 22:29:43 2011 +0000 @@ -37,5 +37,5 @@ using System.Reflection; -[assembly: AssemblyVersion("0.2.1.9")] -[assembly: AssemblyInformationalVersion("0.2.1.9 Alpha")] \ No newline at end of file +[assembly: AssemblyVersion("0.2.1.10")] +[assembly: AssemblyInformationalVersion("0.2.1.10 Alpha")] \ No newline at end of file