1
0
Fork 0
mirror of https://github.com/anrieff/libcpuid synced 2025-10-03 11:01:30 +00:00

Added support for reading the max multiplier

git-svn-id: https://svn.code.sf.net/p/libcpuid/code/HEAD/libcpuid@74 3b4be424-7ac5-41d7-8526-f4ddcb85d872
This commit is contained in:
Veselin Georgiev 2009-10-02 09:14:45 +00:00
commit b0092bd84e
2 changed files with 8 additions and 2 deletions

View file

@ -389,9 +389,14 @@ int cpu_msrinfo(struct msr_driver_t* handle, cpu_msrinfo_request_t which)
{
err = cpu_rdmsr(handle, 0x2a, &r);
if (err) return CPU_INVALID_VALUE;
return (int) ((r >> 22) & 0x3f) * 100;
return (int) ((r>>22) & 0x1f) * 100;
}
case INFO_MAX_MULTIPLIER:
{
err = cpu_rdmsr(handle, 0x198, &r);
if (err) return CPU_INVALID_VALUE;
return (int) ((r >> 40) & 0x1f) * 100;
}
case INFO_TEMPERATURE:
case INFO_THROTTLING:
default: