diff options
-rw-r--r-- | bench/MHz.c | 12 | ||||
-rw-r--r-- | x86info.c | 12 | ||||
-rw-r--r-- | x86info.h | 2 |
3 files changed, 14 insertions, 12 deletions
diff --git a/bench/MHz.c b/bench/MHz.c index 53c11f1..1cb4697 100644 --- a/bench/MHz.c +++ b/bench/MHz.c @@ -15,6 +15,18 @@ #include "../x86info.h" #include "bench.h" +void display_MHz(struct cpudata *cpu) +{ + if (cpu->MHz < 1000) + printf("%uMHz", cpu->MHz); + else { + int a = (cpu->MHz / 1000); + int b = ((cpu->MHz % 1000)/100); + int c = (a*1000)+(b*100); + printf("%u.%u%uGHz", a, b, (cpu->MHz - c)/10); + } +} + static volatile int nosignal = 0; static void sighandler(int sig __attribute__((unused))) @@ -31,18 +31,6 @@ static void separator(void) printf("\n"); } -static void display_MHz(struct cpudata *cpu) -{ - if (cpu->MHz < 1000) - printf("%uMHz", cpu->MHz); - else { - int a = (cpu->MHz / 1000); - int b = ((cpu->MHz % 1000)/100); - int c = (a*1000)+(b*100); - - printf("%u.%u%uGHz", a, b, (cpu->MHz - c)/10); - } -} static void display_address_sizes(struct cpudata *cpu) { @@ -161,7 +161,9 @@ void dumpregs(int cpunum, unsigned int begin, unsigned int end); void dump_mtrrs(struct cpudata *cpu); void dump_apics(struct cpudata *cpu); +void display_MHz(struct cpudata *cpu); void estimate_MHz(struct cpudata *cpu); + int HaveCPUID(void); void interpret_eblcr(u32 lo); int enumerate_cpus(void); |