summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJason Downs <downsj@cvs.openbsd.org>1997-07-13 09:43:33 +0000
committerJason Downs <downsj@cvs.openbsd.org>1997-07-13 09:43:33 +0000
commit20499871c866979e94a6ed88a9701f5d9feb419f (patch)
treea4c2d73a15ec39f683fa2f38040d21df437791c4 /sys
parentd7ffaecd740c32cef0ebbbaea5593643078aba02 (diff)
Save mmuid and use it to print out 425/433 model types.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/hp300/stand/machdep.c24
-rw-r--r--sys/arch/hp300/stand/samachdep.h4
-rw-r--r--sys/arch/hp300/stand/srt0.s12
3 files changed, 31 insertions, 9 deletions
diff --git a/sys/arch/hp300/stand/machdep.c b/sys/arch/hp300/stand/machdep.c
index 2dbf83e01d0..227957c36cf 100644
--- a/sys/arch/hp300/stand/machdep.c
+++ b/sys/arch/hp300/stand/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.6 1997/07/13 07:21:50 downsj Exp $ */
+/* $OpenBSD: machdep.c,v 1.7 1997/07/13 09:43:31 downsj Exp $ */
/* $NetBSD: machdep.c,v 1.4 1997/06/28 07:20:25 thorpej Exp $ */
/*
@@ -49,7 +49,7 @@
char *
getmachineid()
{
- extern int machineid;
+ extern int machineid, mmuid;
char *cp;
switch (machineid) {
@@ -74,9 +74,25 @@ getmachineid()
case HP_400:
cp = "400"; break;
case HP_425:
- cp = "425"; break;
+ switch (mmuid) {
+ case MMUID_425_T:
+ cp = "425t"; break;
+ case MMUID_425_S:
+ cp = "425s"; break;
+ default:
+ cp = "425"; break;
+ }
+ break;
case HP_433:
- cp = "433"; break;
+ switch (mmuid) {
+ case MMUID_433_T:
+ cp = "433t"; break;
+ case MMUID_433_S:
+ cp = "433s"; break;
+ default:
+ cp = "433"; break;
+ }
+ break;
default:
cp = "???"; break;
}
diff --git a/sys/arch/hp300/stand/samachdep.h b/sys/arch/hp300/stand/samachdep.h
index d348e0b6fc7..cc7c3882227 100644
--- a/sys/arch/hp300/stand/samachdep.h
+++ b/sys/arch/hp300/stand/samachdep.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: samachdep.h,v 1.4 1997/07/13 07:21:52 downsj Exp $ */
+/* $OpenBSD: samachdep.h,v 1.5 1997/07/13 09:43:32 downsj Exp $ */
/* $NetBSD: samachdep.h,v 1.3 1997/05/12 07:54:45 thorpej Exp $ */
/*
@@ -61,7 +61,7 @@
#define MHZ_33 4
#define MHZ_50 6
-extern int cpuspeed, machineid;
+extern int cpuspeed, machineid, mmuid;
extern int howto;
extern int cons_scode;
extern u_int opendev;
diff --git a/sys/arch/hp300/stand/srt0.s b/sys/arch/hp300/stand/srt0.s
index d3ca9dd3e8a..894a0d44ce3 100644
--- a/sys/arch/hp300/stand/srt0.s
+++ b/sys/arch/hp300/stand/srt0.s
@@ -1,4 +1,4 @@
-/* $OpenBSD: srt0.s,v 1.4 1997/07/13 07:21:53 downsj Exp $ */
+/* $OpenBSD: srt0.s,v 1.5 1997/07/13 09:43:32 downsj Exp $ */
/* $NetBSD: srt0.s,v 1.2 1997/03/10 08:00:47 thorpej Exp $ */
/*
@@ -54,7 +54,7 @@
.globl _configure
.globl __rtt
.globl _bootdev,_howto,_lowram,_machineid
- .globl _internalhpib
+ .globl _internalhpib,_mmuid
STACK = 0xfffff000 | below the ROM page
BOOTTYPE = 0xfffffdc0
@@ -77,6 +77,8 @@ _lowram:
.long 0
_machineid:
.long 0
+_mmuid:
+ .long 0
.text
begin:
@@ -89,9 +91,11 @@ vecloop:
dbf d0,vecloop | go til done
movl #NMIRESET,a0 | NMI keyboard reset addr
movl #nmi,a0@ | catch in reset routine
+
/*
- * Determine our SPU type and look for internal HP-IB
+ * Determine our CPU type and look for internal HP-IB
*/
+
lea _machineid,a0
movl #0x808,d0
movc d0,cacr | clear and disable on-chip cache(s)
@@ -128,6 +132,7 @@ not370:
jeq ihpibcheck | no, a 360
lsrl #8,d0 | save MMU ID
andl #0xff,d0
+ movl d0,_mmuid | save mmuid
cmpb #1,d0 | are we a 345?
jeq isa345
cmpb #3,d0 | how about a 375?
@@ -167,6 +172,7 @@ not68030:
movl MMUCMD,d0 | get MMU register
lsrl #8,d0
andl #0xff,d0
+ movl d0,_mmuid | save mmuid
cmpb #5,d0 | are we a 425t?
jeq isa425
cmpb #7,d0 | how about 425s?