diff options
author | Dave Jones <davej@redhat.com> | 2011-02-18 14:08:36 -0500 |
---|---|---|
committer | Dave Jones <davej@redhat.com> | 2011-02-18 14:08:36 -0500 |
commit | 8c8cf56c137fd84f379fb0e158cc331cef6aa0cb (patch) | |
tree | af57e99f694a2a18902ea3c1894672d6b9225a1e /Intel | |
parent | 163ebd453b3483d29d7b61695eb520cd56c585b5 (diff) |
formatting. Print out raw values as well as decoded.
Diffstat (limited to 'Intel')
-rw-r--r-- | Intel/MSR-PM.c | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/Intel/MSR-PM.c b/Intel/MSR-PM.c index 6151657..ef30d84 100644 --- a/Intel/MSR-PM.c +++ b/Intel/MSR-PM.c @@ -21,11 +21,13 @@ void dump_centrino_MSRs(struct cpudata *cpu) if (!user_is_root) return; + printf("Performance MSRs:\n"); if (read_msr(cpu->number, MSR_IA32_PERF_STATUS, &val) == 1) - printf("MSR_IA32_PERF_STATUS: %llx\n", val); + printf(" MSR_IA32_PERF_STATUS: %llx\n", val); if (read_msr(cpu->number, MSR_IA32_MISC_ENABLE, &val) == 1) { - printf(" Enabled: "); + printf(" MSR_IA32_MISC_ENABLE: %llx", val); + printf(" [Enabled: "); if (val & (1<<3)) { printf("TCC "); tcc = 1; @@ -41,20 +43,26 @@ void dump_centrino_MSRs(struct cpudata *cpu) if (val & (1<<16)) printf("EnhancedSpeedStep "); - printf("\n"); + printf("]\n"); } - if (tcc && read_msr (cpu->number, MSR_PM_THERM2_CTL, &val) == 1) { /* THERM2_CTL */ - printf(" Thermal monitor %d\n", (val & (1<<16)) ? 2 : 1); + printf("\n"); + + + printf("Thermal MSRs:\n"); + if (tcc && read_msr(cpu->number, MSR_PM_THERM2_CTL, &val) == 1) { /* THERM2_CTL */ + printf(" MSR_PM_THERM2_CTL: %llx, [Thermal monitor: %d]\n", + val, (val & (1<<16)) ? 2 : 1); } - if (read_msr (cpu->number, MSR_IA32_THERM_CONTROL, &val) == 1) { + if (read_msr(cpu->number, MSR_IA32_THERM_CONTROL, &val) == 1) { + printf(" MSR_IA32_THERM_CONTROL: %llx", val); if (val & (1<<4)) { - printf(" Software-controlled clock: %f%% duty cycle\n", + printf("[Software-controlled clock: %f%% duty cycle]\n", ((val >> 1) & 7) / 8.); } else - printf(" Software-controlled clock disabled (full speed)\n"); + printf("[Software-controlled clock disabled (full speed)]\n"); } if (read_msr (cpu->number, MSR_IA32_THERM_STATUS, &val) == 1) { /* THERM_STATUS */ - printf(" Thermal status: %llx", val); + printf(" MSR_IA32_THERM_STATUS: %llx", val); if (val & (1<<0|1<<1)) { printf(" ["); if (val & (1<<0)) |