summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/arch/i386/i386/est.c83
1 files changed, 54 insertions, 29 deletions
diff --git a/sys/arch/i386/i386/est.c b/sys/arch/i386/i386/est.c
index e8d1e010212..0fb47742a37 100644
--- a/sys/arch/i386/i386/est.c
+++ b/sys/arch/i386/i386/est.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: est.c,v 1.11 2005/03/07 06:59:14 mbalmer Exp $ */
+/* $OpenBSD: est.c,v 1.12 2006/02/27 05:37:16 marco Exp $ */
/*
* Copyright (c) 2003 Michael Eriksson.
* All rights reserved.
@@ -149,7 +149,6 @@ static const struct fq_info pentium_m_1700[] = {
{ 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_n753[] = {
{ 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_n738[] = {
{ 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_n758[] = {
{ 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_n765[] = {
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;
}