Hardware/CPU/AMD10CPU.cs
changeset 90 3333b29a1746
parent 63 1a7c13ac7348
child 100 25d18bbaa9cf
     1.1 --- a/Hardware/CPU/AMD10CPU.cs	Mon Apr 05 21:31:21 2010 +0000
     1.2 +++ b/Hardware/CPU/AMD10CPU.cs	Sat Apr 24 19:59:52 2010 +0000
     1.3 @@ -60,15 +60,12 @@
     1.4      private const ushort PCI_AMD_11H_MISCELLANEOUS_DEVICE_ID = 0x1303;
     1.5      private const uint REPORTED_TEMPERATURE_CONTROL_REGISTER = 0xA4;
     1.6  
     1.7 -    public AMD10CPU(string name, uint family, uint model, uint stepping, 
     1.8 -      uint[,] cpuidData, uint[,] cpuidExtData) {
     1.9 -      
    1.10 -      this.name = name;
    1.11 -      this.icon = Utilities.EmbeddedResources.GetImage("cpu.png");     
    1.12 +    public AMD10CPU(CPUID[][] cpuid) {
    1.13  
    1.14 -      uint coreCount = 1;
    1.15 -      if (cpuidExtData.GetLength(0) > 8)
    1.16 -        coreCount = (cpuidExtData[8, 2] & 0xFF) + 1;
    1.17 +      this.name = cpuid[0][0].Name;
    1.18 +      this.icon = Utilities.EmbeddedResources.GetImage("cpu.png");
    1.19 +
    1.20 +      int coreCount = cpuid.Length;
    1.21  
    1.22        totalLoad = new Sensor("CPU Total", 0, SensorType.Load, this);
    1.23  
    1.24 @@ -77,7 +74,7 @@
    1.25          coreLoads[i] = new Sensor("Core #" + (i + 1), i + 1,
    1.26            SensorType.Load, this);
    1.27  
    1.28 -      cpuLoad = new CPULoad(coreCount, 1);
    1.29 +      cpuLoad = new CPULoad(cpuid);
    1.30        if (cpuLoad.IsAvailable) {
    1.31          foreach (Sensor sensor in coreLoads)
    1.32            ActivateSensor(sensor);