diff --git a/libcpuid/libcpuid.h b/libcpuid/libcpuid.h index 224138f..257b99e 100644 --- a/libcpuid/libcpuid.h +++ b/libcpuid/libcpuid.h @@ -857,7 +857,7 @@ struct msr_driver_t* cpu_msr_driver_open_core(int core_num); * The error message can be obtained by calling \ref cpuid_error. * @see cpu_error_t */ -int cpu_rdmsr(struct msr_driver_t* handle, int msr_index, uint64_t* result); +int cpu_rdmsr(struct msr_driver_t* handle, uint32_t msr_index, uint64_t* result); typedef enum { diff --git a/libcpuid/rdmsr.c b/libcpuid/rdmsr.c index 2aee872..ebc73a8 100644 --- a/libcpuid/rdmsr.c +++ b/libcpuid/rdmsr.c @@ -105,7 +105,7 @@ struct msr_driver_t* cpu_msr_driver_open_core(int core_num) handle->fd = fd; return handle; } -int cpu_rdmsr(struct msr_driver_t* driver, int msr_index, uint64_t* result) +int cpu_rdmsr(struct msr_driver_t* driver, uint32_t msr_index, uint64_t* result) { ssize_t ret; @@ -350,7 +350,7 @@ clean_up: #define IOCTL_UNKNOWN_BASE FILE_DEVICE_UNKNOWN #define IOCTL_PROCVIEW_RDMSR CTL_CODE(IOCTL_UNKNOWN_BASE, 0x0803, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS) -int cpu_rdmsr(struct msr_driver_t* driver, int msr_index, uint64_t* result) +int cpu_rdmsr(struct msr_driver_t* driver, uint32_t msr_index, uint64_t* result) { DWORD dwBytesReturned; __int64 msrdata;