diff --git a/cpuid_tool/cpuid_tool.c b/cpuid_tool/cpuid_tool.c index bbfffae..16c51e6 100644 --- a/cpuid_tool/cpuid_tool.c +++ b/cpuid_tool/cpuid_tool.c @@ -411,7 +411,8 @@ static void print_info(output_data_switch query, struct cpu_raw_data_t* raw, } else { fprintf(fout, "mperf = %d\n", cpu_msrinfo(handle, INFO_MPERF)); fprintf(fout, "aperf = %d\n", cpu_msrinfo(handle, INFO_APERF)); - fprintf(fout, "cpu:fsb = %.1f\n", cpu_msrinfo(handle, INFO_CUR_MULTIPLIER) / 100.0f); + fprintf(fout, "current cpu:fsb = %.1f\n", cpu_msrinfo(handle, INFO_CUR_MULTIPLIER) / 100.0f); + fprintf(fout, "max cpu:fsb = %.1f\n", cpu_msrinfo(handle, INFO_MAX_MULTIPLIER) / 100.0f); cpu_msr_driver_close(handle); } break; diff --git a/libcpuid/rdmsr.c b/libcpuid/rdmsr.c index 45bc2ce..2ea1790 100644 --- a/libcpuid/rdmsr.c +++ b/libcpuid/rdmsr.c @@ -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: