summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJason Downs <downsj@cvs.openbsd.org>1998-05-04 06:29:04 +0000
committerJason Downs <downsj@cvs.openbsd.org>1998-05-04 06:29:04 +0000
commit763e0f04110a0ae8f0084a3fb4b192f3b8fbd07a (patch)
treea6cfe059218a0cbd19a742b585f5d5953e1e7203 /sys
parent73d5672c2731c5100d52a347156fcd8a6c988bbb (diff)
Use cpuspeed (and hard coded values) to print clock speed on '040 models.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/hp300/hp300/machdep.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/sys/arch/hp300/hp300/machdep.c b/sys/arch/hp300/hp300/machdep.c
index c1866dfddde..e468b940feb 100644
--- a/sys/arch/hp300/hp300/machdep.c
+++ b/sys/arch/hp300/hp300/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.33 1998/04/25 22:19:48 downsj Exp $ */
+/* $OpenBSD: machdep.c,v 1.34 1998/05/04 06:29:03 downsj Exp $ */
/* $NetBSD: machdep.c,v 1.94 1997/06/12 15:46:29 mrg Exp $ */
/*
@@ -529,6 +529,21 @@ identifycpu()
} else {
td = (hp300_models[i].designation)[0];
}
+
+ /*
+ * Adjust speed if the machine appears to be
+ * running at a different clock rate. Dividing
+ * cpuspeed by 2.67 and truncating it works on my
+ * systems, but I don't want to use floating point.
+ */
+ if (cputype == CPU_68040) {
+ if (cpuspeed > 100)
+ s = "40";
+ else if (cpuspeed > 80)
+ s = "33";
+ else
+ s = "25";
+ }
}
}
if (t == NULL) {
@@ -621,10 +636,12 @@ identifycpu()
strcat(cpu_model, ")");
printf("%s\n", cpu_model);
+#if 0
printf("cpu: delay divisor %d", delay_divisor);
if (mmuid)
printf(", mmuid %d", mmuid);
printf("\n");
+#endif
/*
* Now that we have told the user what they have,