Imported Upstream version 1.30
[platform/upstream/x86info.git] / Intel / MSR-P6.c
1 /*
2  *  (C) 2002 Dave Jones.
3  *
4  *  Licensed under the terms of the GNU GPL License version 2.
5  *
6  *  Intel P6 specific MSR information
7  *  See 24547203.pdf for more details.
8  */
9
10 #include <stdio.h>
11 #include <unistd.h>
12 #include <sys/types.h>
13 #include "../x86info.h"
14 #include "Intel.h"
15
16 void dump_p6_MSRs (struct cpudata *cpu)
17 {
18         unsigned long long val = 0;
19
20         if (!user_is_root)
21                 return;
22
23         printf("P6 family MSRs:\n");
24
25         if (read_msr (cpu->number, 0x2a, &val) == 1) {
26                 printf("Low power mode is ");
27                 if ((val & (1<<26)) == 0)
28                         printf("dis");
29                 else
30                         printf("en");
31                 printf("abled\n");
32         }
33
34 /*
35         if (read_msr (cpu->number, 0x410, &val) == 1) {
36         }
37 */
38
39         printf("\n");
40 }