From 43cca2bab54cf98899acf891792e39889ccdd80f Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Sun, 6 Apr 2003 17:00:36 +0000 Subject: Check for the "addr" locator versus the physical address of the VSIMM, so as not to attach a single VSIMM put in the secondary slot as cgfourteen0. --- sys/arch/sparc/dev/cgfourteen.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sys/arch/sparc/dev/cgfourteen.c b/sys/arch/sparc/dev/cgfourteen.c index 60a9a141b19..49616018d5c 100644 --- a/sys/arch/sparc/dev/cgfourteen.c +++ b/sys/arch/sparc/dev/cgfourteen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cgfourteen.c,v 1.21 2002/12/12 20:21:34 miod Exp $ */ +/* $OpenBSD: cgfourteen.c,v 1.22 2003/04/06 17:00:35 miod Exp $ */ /* $NetBSD: cgfourteen.c,v 1.7 1997/05/24 20:16:08 pk Exp $ */ /* @@ -203,6 +203,14 @@ cgfourteenmatch(parent, vcf, aux) if (strcmp(cf->cf_driver->cd_name, ra->ra_name)) return (0); + /* + * This driver should not be attached without an "addr" locator, + * as this is the only way to differentiate the main and secondary + * VSIMM. + */ + if (cf->cf_loc[0] != -1 && cf->cf_loc[0] != (int)ra->ra_paddr) + return (0); + /* * The cgfourteen is a local-bus video adaptor, accessed directly * via the processor, and not through device space or an external -- cgit v1.2.3