summaryrefslogtreecommitdiff
path: root/sys/arch/mvme88k
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2007-12-25 21:10:57 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2007-12-25 21:10:57 +0000
commit2d570821810a28dc158190f0e72e60ad9796f63a (patch)
tree1037c0aaec1054572e547816b6d2b4e9ff036dc8 /sys/arch/mvme88k
parent2a836fd105b434df71eed2f229d6703006f5c24e (diff)
Tell 197SP and 197DP apart in MULTIPROCESSOR kernels.
Diffstat (limited to 'sys/arch/mvme88k')
-rw-r--r--sys/arch/mvme88k/mvme88k/m88110.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/sys/arch/mvme88k/mvme88k/m88110.c b/sys/arch/mvme88k/mvme88k/m88110.c
index 714a0706ca2..b816f14dfca 100644
--- a/sys/arch/mvme88k/mvme88k/m88110.c
+++ b/sys/arch/mvme88k/mvme88k/m88110.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: m88110.c,v 1.54 2007/12/25 20:23:04 miod Exp $ */
+/* $OpenBSD: m88110.c,v 1.55 2007/12/25 21:10:56 miod Exp $ */
/*
* Copyright (c) 1998 Steve Murphree, Jr.
* All rights reserved.
@@ -62,6 +62,7 @@
#include <uvm/uvm_extern.h>
#include <machine/asm_macro.h>
+#include <machine/bugio.h>
#include <machine/cmmu.h>
#include <machine/cpu.h>
#include <machine/lock.h>
@@ -173,7 +174,20 @@ void
m88410_setup_board_config(void)
{
#ifdef MULTIPROCESSOR
- max_cpus = 2;
+ struct mvmeprom_brdid brdid;
+
+ /*
+ * MVME197SP are 01-W3815B03, while MVME197DP are 01-W3815B04.
+ * If the CNFG memory has been lost and the board is a 197SP,
+ * we'll just fail to spin up the non-existing second processor.
+ */
+ bzero(&brdid, sizeof(brdid));
+ bugbrdid(&brdid);
+ if (bcmp(brdid.pwa, "01-W3815B03", 11) == 0)
+ max_cpus = 1;
+ else
+ max_cpus = 2;
+ /* XXX what about 01-W3977B QP boards??? */
#else
max_cpus = 1;
#endif