|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
Re: [marco
peereboom.us: est]
From: Dimitry Andric (dimitry
andric.com)
Date: Sat Feb 25 2006 - 22:07:23 CST
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Marco Peereboom wrote:
> On Feb 25, 2006, at 8:50 PM, Dimitry Andric wrote:
>> I probably checked out the same Intel documents as you, but when looking
>> at est.c to fix my 'not in table' problem, I was thinking: how can you
>> distinguish 2 CPU's with the same reported speed?
>
> You are right, we need that extra bit. Do you have the skills to hack
> us up a patch?
Here's a patch, including your original one, that uses cpu_id from
locore.s to determine the CPU in case of multiple items with the same
speed. It's actually only needed for distinguishing the 715 from 758
and 725 from 778, so in all other cases the cpu_id is not checked.
If anyone with one of these specific models can check if this will
detect their CPU properly, please let us know. :) It works okay on my
758.
Index: est.c
===================================================================
RCS file: /cvs/src/sys/arch/i386/i386/est.c,v
retrieving revision 1.11
diff -u -d -p -r1.11 est.c
--- est.c 7 Mar 2005 06:59:14 -0000 1.11
+++ est.c 26 Feb 2006 03:57:10 -0000

-149,7 +149,6 
static const struct fq_info pentium_m_17
{ 600, 956 }
};
-
/* Intel Pentium M processor 723 1.0 GHz */
static const struct fq_info pentium_m_n723[] = {
{ 1000, 940 },

-177,6 +176,17 
static const struct fq_info pentium_m_n7
{ 600, 812 }
};
+/* Intel Pentium M processor 773 1.3 GHz */
+static const struct fq_info pentium_m_n773[] = {
+ { 1300, 940 },
+ { 1200, 924 },
+ { 1100, 908 },
+ { 1000, 892 },
+ { 900, 876 },
+ { 800, 860 },
+ { 600, 812 }
+};
+
/* Intel Pentium M processor 738 1.4 GHz */
static const struct fq_info pentium_m_n738[] = {
{ 1400, 1116 },

-189,7 +199,6 
static const struct fq_info pentium_m_n7
{ 600, 988 }
};
-#if 0
/* Intel Pentium M processor 758 1.5 GHz */
static const struct fq_info pentium_m_n758[] = {
{ 1500, 1116 },

-202,7 +211,20 
static const struct fq_info pentium_m_n7
{ 800, 1020 },
{ 600, 988 }
};
-#endif
+
+/* Intel Pentium M processor 778 1.6 GHz */
+static const struct fq_info pentium_m_n778[] = {
+ { 1600, 1116 },
+ { 1500, 1116 },
+ { 1400, 1100 },
+ { 1300, 1184 },
+ { 1200, 1068 },
+ { 1100, 1052 },
+ { 1000, 1052 },
+ { 900, 1036 },
+ { 800, 1020 },
+ { 600, 988 }
+};
/* Intel Pentium M processor 715 1.5 GHz */
static const struct fq_info pentium_m_n715[] = {

-270,39 +292,40 
static const struct fq_info pentium_m_n7
struct fqlist {
const char *brand_tag;
+ const int cpu_id;
const struct fq_info *table;
u_int n;
};
static const struct fqlist pentium_m[] = {
-#define ENTRY(s, v) { s, v, sizeof(v) / sizeof((v)[0]) }
- ENTRY(" 900", pentium_m_900),
- ENTRY("1000", pentium_m_1000),
- ENTRY("1100", pentium_m_1100),
- ENTRY("1200", pentium_m_1200),
- ENTRY("1300", pentium_m_1300),
- ENTRY("1400", pentium_m_1400),
- ENTRY("1500", pentium_m_1500),
- ENTRY("1600", pentium_m_1600),
- ENTRY("1700", pentium_m_1700),
+#define ENTRY(s, i, v) { s, i, v, sizeof(v) / sizeof((v)[0]) }
+ ENTRY(" 900", 0, pentium_m_900),
+ ENTRY("1000", 0, pentium_m_1000),
+ ENTRY("1100", 0, pentium_m_1100),
+ ENTRY("1200", 0, pentium_m_1200),
+ ENTRY("1300", 0, pentium_m_1300),
+ ENTRY("1400", 0, pentium_m_1400),
+ ENTRY("1500", 0, pentium_m_1500),
+ ENTRY("1600", 0, pentium_m_1600),
+ ENTRY("1700", 0, pentium_m_1700),
#undef ENTRY
};
static const struct fqlist pentium_m_dothan[] = {
-#define ENTRY(s, v) { s, v, sizeof(v) / sizeof((v)[0]) }
- ENTRY("1.00", pentium_m_n723),
- ENTRY("1.10", pentium_m_n733),
- ENTRY("1.20", pentium_m_n753),
- ENTRY("1.40", pentium_m_n738),
-#if 0
- ENTRY("1.50", pentium_m_n758),
-#endif
- ENTRY("1.50", pentium_m_n715),
- ENTRY("1.60", pentium_m_n725),
- ENTRY("1.70", pentium_m_n735),
- ENTRY("1.80", pentium_m_n745),
- ENTRY("2.00", pentium_m_n755),
- ENTRY("2.10", pentium_m_n765),
+#define ENTRY(s, i, v) { s, i, v, sizeof(v) / sizeof((v)[0]) }
+ ENTRY("1.00", 0, pentium_m_n723),
+ ENTRY("1.10", 0, pentium_m_n733),
+ ENTRY("1.20", 0, pentium_m_n753),
+ ENTRY("1.30", 0, pentium_m_n773),
+ ENTRY("1.40", 0, pentium_m_n738),
+ ENTRY("1.50", 0x06d6, pentium_m_n715),
+ ENTRY("1.50", 0x06d8, pentium_m_n758),
+ ENTRY("1.60", 0x06d6, pentium_m_n725),
+ ENTRY("1.60", 0x06d8, pentium_m_n778),
+ ENTRY("1.70", 0, pentium_m_n735),
+ ENTRY("1.80", 0, pentium_m_n745),
+ ENTRY("2.00", 0, pentium_m_n755),
+ ENTRY("2.10", 0, pentium_m_n765),
#undef ENTRY
};

-347,6 +370,7 
est_init(const char *cpu_device)
char *tag;
const struct fqlist *fql;
extern char cpu_brandstr[];
+ extern int cpu_id;
int low, high;
if (setperf_prio > 3)

-374,7 +398,8 
est_init(const char *cpu_device)
fql = &cpu->list[j];
n = strlen(fql->brand_tag);
if (!strncmp(fql->brand_tag, tag, n) &&
- !strcmp(cpu->brand_suffix, tag + n)) {
+ !strcmp(cpu->brand_suffix, tag + n) &&
+ (fql->cpu_id == 0 || fql->cpu_id == cpu_id)) {
est_fqlist = fql;
break;
}
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]