summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bench/MHz.c12
-rw-r--r--x86info.c12
-rw-r--r--x86info.h2
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)))
diff --git a/x86info.c b/x86info.c
index d310062..2c25b04 100644
--- a/x86info.c
+++ b/x86info.c
@@ -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)
{
diff --git a/x86info.h b/x86info.h
index 370c1e7..ac09e15 100644
--- a/x86info.h
+++ b/x86info.h
@@ -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);