diff options
author | davej <davej> | 2001-12-10 17:52:15 +0000 |
---|---|---|
committer | davej <davej> | 2001-12-10 17:52:15 +0000 |
commit | cbd09ffcafc05b51405f7ce752c1ee62ad13adf6 (patch) | |
tree | a5dafeabb946c3135086682a3584c6253b59c868 /Intel | |
parent | 14d2eaf874d7092a5026a89e548dbbc204ccf1b3 (diff) |
Clean up externs
Move eblcr to intel only
Diffstat (limited to 'Intel')
-rw-r--r-- | Intel/bluesmoke.c | 5 | ||||
-rw-r--r-- | Intel/eblcr.c | 51 | ||||
-rw-r--r-- | Intel/identify.c | 7 |
3 files changed, 53 insertions, 10 deletions
diff --git a/Intel/bluesmoke.c b/Intel/bluesmoke.c index 25492c9..237d366 100644 --- a/Intel/bluesmoke.c +++ b/Intel/bluesmoke.c @@ -1,5 +1,5 @@ /* - * $Id: bluesmoke.c,v 1.4 2001/12/09 16:35:51 davej Exp $ + * $Id: bluesmoke.c,v 1.5 2001/12/10 17:52:15 davej Exp $ * This file is part of x86info. * (C) 2001 Dave Jones. * @@ -23,9 +23,6 @@ #define MC_ADDR 0x402 #define MC_MISC 0x403 -extern int show_bluesmoke; -extern int user_is_root; - void decode_Intel_bluesmoke(int cpunum) { unsigned long long val, val2; diff --git a/Intel/eblcr.c b/Intel/eblcr.c new file mode 100644 index 0000000..b90b074 --- /dev/null +++ b/Intel/eblcr.c @@ -0,0 +1,51 @@ +#include <stdio.h> +#include "../x86info.h" + +void interpret_eblcr(u32 lo) +{ + static unsigned int buscode[2][4] = { + { 6667, 13333, 10000, 0 }, + { 10000, 13333, 10000, 0 } + }; + + static unsigned int mult[32] = { + 10, 6, 8, 0, 11, 7, 9, 0, + 10, 14, 16, 12, 0, 15, 0, 13, + 0, 0, 0, 0, 0, 0, 17, 0, + 0, 0, 0, 0, 0, 0, 0, 0 + }; + + int bus = (lo >> 18) & 3; + int mul = (lo >> 22) & 15; + int busclock, cpuclk; + + return; /* too many bugs right now.. fix for a future release */ + + if (!user_is_root || !show_eblcr) + return; + + /* + * FIXME: + * 766MHz Celeron. 66MHz x 11.5 Being picked up as 133x5.0 + * bus:1 mul:0 + */ + +/* printf ("bus:%x mul:%x\n", bus, mul);*/ + + /* The mobile pIII added bit 27. + * This is zero on other intel and on the cyrix III */ + + if (lo & (1 >> 27)) + mul += 16; + + busclock = buscode[1][bus]/100; + + if (busclock==0 || mult[mul]==0) + printf("Unknown CPU/BUS multiplier (%d X %dMHz, %x).\n", mul, bus, lo); + + cpuclk = (buscode[1][bus] * mult[mul])/200; + printf ("Bus Speed (%dMHz) x Multiplier (%.1fx) = CPU speed %dMhz\n", + busclock, + (float) cpuclk/busclock, + cpuclk); +} diff --git a/Intel/identify.c b/Intel/identify.c index 34356d2..032c30b 100644 --- a/Intel/identify.c +++ b/Intel/identify.c @@ -1,5 +1,5 @@ /* - * $Id: identify.c,v 1.7 2001/12/10 17:35:08 davej Exp $ + * $Id: identify.c,v 1.8 2001/12/10 17:52:15 davej Exp $ * This file is part of x86info. * (C) 2001 Dave Jones. * @@ -12,11 +12,6 @@ #include "../x86info.h" #include "Intel.h" -extern int show_eblcr; -extern int show_cacheinfo; -extern int show_flags; -extern int show_bluesmoke; - /* Decode Intel TLB and cache info descriptors */ void decode_Intel_TLB (int x, int family) { |