Skip to content

Commit

Permalink
Modify INFO_MAX_MULTIPLIER for Intel in cpu_msrinfo()
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTumultuousUnicornOfDarkness committed Oct 6, 2015
1 parent ce6ba81 commit f11a5b6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions libcpuid/rdmsr.c
Expand Up @@ -481,6 +481,12 @@ int cpu_msrinfo(struct msr_driver_t* handle, cpu_msrinfo_request_t which)
}
case INFO_MAX_MULTIPLIER:
{
if(cpu_vendor() == VENDOR_INTEL)
{
int multiplier = (int) cpu_rdmsr_range (handle, PLATFORM_INFO_MSR, PLATFORM_INFO_MSR_high, PLATFORM_INFO_MSR_low, &error_indx);
if(multiplier > 0)
return multiplier * 100;
}
err = cpu_rdmsr(handle, 0x198, &r);
if (err) return CPU_INVALID_VALUE;
return (int) ((r >> 40) & 0x1f) * 100;
Expand Down

0 comments on commit f11a5b6

Please sign in to comment.