From 2d570821810a28dc158190f0e72e60ad9796f63a Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Tue, 25 Dec 2007 21:10:57 +0000 Subject: Tell 197SP and 197DP apart in MULTIPROCESSOR kernels. --- sys/arch/mvme88k/mvme88k/m88110.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'sys/arch/mvme88k') 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 #include +#include #include #include #include @@ -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 -- cgit v1.2.3