Hardware/CPU/IntelCPU.cs
changeset 236 763675f19ff4
parent 219 ce04404774d6
child 238 bddc6e01840a
     1.1 --- a/Hardware/CPU/IntelCPU.cs	Mon Oct 18 07:18:14 2010 +0000
     1.2 +++ b/Hardware/CPU/IntelCPU.cs	Sun Oct 31 22:08:47 2010 +0000
     1.3 @@ -117,7 +117,7 @@
     1.4                  uint eax, edx;
     1.5                  tjMax = new float[coreCount];
     1.6                  for (int i = 0; i < coreCount; i++) {
     1.7 -                  if (WinRing0.RdmsrTx(IA32_TEMPERATURE_TARGET, out eax,
     1.8 +                  if (Ring0.RdmsrTx(IA32_TEMPERATURE_TARGET, out eax,
     1.9                      out edx, (UIntPtr)(1L << cpuid[i][0].Thread))) {
    1.10                      tjMax[i] = (eax >> 16) & 0xFF;
    1.11                    } else {
    1.12 @@ -142,14 +142,14 @@
    1.13          case Microarchitecture.Atom:
    1.14          case Microarchitecture.Core: {
    1.15              uint eax, edx;
    1.16 -            if (WinRing0.Rdmsr(IA32_PERF_STATUS, out eax, out edx)) {
    1.17 +            if (Ring0.Rdmsr(IA32_PERF_STATUS, out eax, out edx)) {
    1.18                timeStampCounterMultiplier = 
    1.19                  ((edx >> 8) & 0x1f) + 0.5 * ((edx >> 14) & 1);
    1.20              }
    1.21            } break;
    1.22          case Microarchitecture.Nehalem: {
    1.23              uint eax, edx;
    1.24 -            if (WinRing0.Rdmsr(MSR_PLATFORM_INFO, out eax, out edx)) {
    1.25 +            if (Ring0.Rdmsr(MSR_PLATFORM_INFO, out eax, out edx)) {
    1.26                timeStampCounterMultiplier = (eax >> 8) & 0xff;
    1.27              }
    1.28            } break;
    1.29 @@ -215,7 +215,7 @@
    1.30  
    1.31        for (int i = 0; i < coreTemperatures.Length; i++) {
    1.32          uint eax, edx;
    1.33 -        if (WinRing0.RdmsrTx(
    1.34 +        if (Ring0.RdmsrTx(
    1.35            IA32_THERM_STATUS_MSR, out eax, out edx,
    1.36              (UIntPtr)(1L << cpuid[i][0].Thread))) {
    1.37            // if reading is valid
    1.38 @@ -236,7 +236,7 @@
    1.39          uint eax, edx;
    1.40          for (int i = 0; i < coreClocks.Length; i++) {
    1.41            System.Threading.Thread.Sleep(1);
    1.42 -          if (WinRing0.RdmsrTx(IA32_PERF_STATUS, out eax, out edx,
    1.43 +          if (Ring0.RdmsrTx(IA32_PERF_STATUS, out eax, out edx,
    1.44              (UIntPtr)(1L << cpuid[i][0].Thread))) 
    1.45            {
    1.46              newBusClock =