1.1 --- a/Hardware/WinRing0.cs Sun Feb 14 21:09:08 2010 +0000
1.2 +++ b/Hardware/WinRing0.cs Mon Feb 15 22:58:29 2010 +0000
1.3 @@ -83,8 +83,9 @@
1.4 out uint eax, out uint ebx, out uint ecx, out uint edx);
1.5 public delegate bool CpuidExDelegate(uint index, uint ecxValue,
1.6 out uint eax, out uint ebx, out uint ecx, out uint edx);
1.7 - public delegate bool RdmsrPxDelegate(uint index, ref uint eax, ref uint edx,
1.8 - UIntPtr processAffinityMask);
1.9 + public delegate bool RdmsrDelegate(uint index, out uint eax, out uint edx);
1.10 + public delegate bool RdmsrTxDelegate(uint index, out uint eax, out uint edx,
1.11 + UIntPtr threadAffinityMask);
1.12 public delegate byte ReadIoPortByteDelegate(ushort port);
1.13 public delegate void WriteIoPortByteDelegate(ushort port, byte value);
1.14 public delegate void SetPciMaxBusIndexDelegate(byte max);
1.15 @@ -94,8 +95,8 @@
1.16 uint regAddress, out uint value);
1.17 public delegate bool WritePciConfigDwordExDelegate(uint pciAddress,
1.18 uint regAddress, uint value);
1.19 - public delegate bool RdtscPxDelegate(ref uint eax, ref uint edx,
1.20 - UIntPtr processAffinityMask);
1.21 + public delegate bool RdtscTxDelegate(out uint eax, out uint edx,
1.22 + UIntPtr threadAffinityMask);
1.23
1.24 private static InitializeOlsDelegate InitializeOls;
1.25 private static DeinitializeOlsDelegate DeinitializeOls;
1.26 @@ -104,14 +105,15 @@
1.27 public static IsCpuidDelegate IsCpuid;
1.28 public static CpuidDelegate Cpuid;
1.29 public static CpuidExDelegate CpuidEx;
1.30 - public static RdmsrPxDelegate RdmsrPx;
1.31 + public static RdmsrDelegate Rdmsr;
1.32 + public static RdmsrTxDelegate RdmsrTx;
1.33 public static ReadIoPortByteDelegate ReadIoPortByte;
1.34 public static WriteIoPortByteDelegate WriteIoPortByte;
1.35 public static SetPciMaxBusIndexDelegate SetPciMaxBusIndex;
1.36 public static FindPciDeviceByIdDelegate FindPciDeviceById;
1.37 public static ReadPciConfigDwordExDelegate ReadPciConfigDwordEx;
1.38 public static WritePciConfigDwordExDelegate WritePciConfigDwordEx;
1.39 - public static RdtscPxDelegate RdtscPx;
1.40 + public static RdtscTxDelegate RdtscTx;
1.41
1.42 private static void GetDelegate<T>(string entryPoint, out T newDelegate)
1.43 where T : class
1.44 @@ -131,14 +133,15 @@
1.45 GetDelegate("IsCpuid", out IsCpuid);
1.46 GetDelegate("Cpuid", out Cpuid);
1.47 GetDelegate("CpuidEx", out CpuidEx);
1.48 - GetDelegate("RdmsrPx", out RdmsrPx);
1.49 + GetDelegate("Rdmsr", out Rdmsr);
1.50 + GetDelegate("RdmsrTx", out RdmsrTx);
1.51 GetDelegate("ReadIoPortByte", out ReadIoPortByte);
1.52 GetDelegate("WriteIoPortByte", out WriteIoPortByte);
1.53 GetDelegate("SetPciMaxBusIndex", out SetPciMaxBusIndex);
1.54 GetDelegate("FindPciDeviceById", out FindPciDeviceById);
1.55 GetDelegate("ReadPciConfigDwordEx", out ReadPciConfigDwordEx);
1.56 GetDelegate("WritePciConfigDwordEx", out WritePciConfigDwordEx);
1.57 - GetDelegate("RdtscPx", out RdtscPx);
1.58 + GetDelegate("RdtscTx", out RdtscTx);
1.59
1.60 try {
1.61 if (InitializeOls != null && InitializeOls())