summaryrefslogtreecommitdiff
path: root/sys/arch/powerpc
diff options
context:
space:
mode:
authorDale S. Rahn <rahnds@cvs.openbsd.org>1998-09-12 19:58:57 +0000
committerDale S. Rahn <rahnds@cvs.openbsd.org>1998-09-12 19:58:57 +0000
commitbe8e76a8165331d3b67f506e99ae3f714f3234f3 (patch)
tree70effaa4697b6356de234101148e1f820d82660f /sys/arch/powerpc
parent543d26033ec3092b13c9e175299e7f6ca0d7649f (diff)
Detect more that just Motorola machines for openfirmware hardware
detection. This should allow MIX to run on Power4 and possibly Power3 machines. It emits a warning when the system was not recognised.
Diffstat (limited to 'sys/arch/powerpc')
-rw-r--r--sys/arch/powerpc/powerpc/machdep.c30
1 files changed, 26 insertions, 4 deletions
diff --git a/sys/arch/powerpc/powerpc/machdep.c b/sys/arch/powerpc/powerpc/machdep.c
index 3d8be134ea8..2a7ac000435 100644
--- a/sys/arch/powerpc/powerpc/machdep.c
+++ b/sys/arch/powerpc/powerpc/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.16 1998/09/09 04:44:59 rahnds Exp $ */
+/* $OpenBSD: machdep.c,v 1.17 1998/09/12 19:58:56 rahnds Exp $ */
/* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */
/*
@@ -833,9 +833,31 @@ do_pending_int()
void
systype(char *name)
{
- if (strncmp (name, "MOT,", 4) == 0) {
- system_type = PWRSTK;
- printf("recognized system type of %s as PWRSTK\n", name);
+ /* this table may be order specific if substrings match several
+ * computers but a longer string matches a specific
+ */
+ int i;
+ struct systyp {
+ char *name;
+ char *systypename;
+ int type;
+ } systypes[] = {
+ { "MOT,", "(PWRSTK) MCG powerstack family", PWRSTK },
+ { "V-I Power", "(POWER4e) V-I ppc vme boards ", POWER4e},
+ { NULL,"",0}
+ };
+ for (i = 0; systypes[i].name != NULL; i++) {
+ if (strncmp( name , systypes[i].name,
+ strlen (systypes[i].name)) == 0)
+ {
+ system_type = systypes[i].type;
+ printf("recognized system type of %s as %s\n",
+ name, systypes[i].systypename);
+ break;
+ }
+ }
+ if (system_type == OFWMACH) {
+ printf("System type not recognized, good luck\n");
}
}
/*