From e50fc72424a15a9eb260d7914c0ac63d657d0859 Mon Sep 17 00:00:00 2001 From: chuck Date: Fri, 5 Apr 1996 21:50:05 +0000 Subject: [PATCH] make netbsd/sparc boot on sun4 once again. the sun4m changes introduced config lines for obio0 devices without addresses (thus cf->cf_loc[0] took the default value of -1). we now ignore these entries on a sun4 since they could never be valid (eliminates a 'panic:alignment' fault at bootup). --- sys/arch/sparc/dev/obio.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sys/arch/sparc/dev/obio.c b/sys/arch/sparc/dev/obio.c index c97eeb9a76cd..30ce4e1c2fc6 100644 --- a/sys/arch/sparc/dev/obio.c +++ b/sys/arch/sparc/dev/obio.c @@ -1,4 +1,4 @@ -/* $NetBSD: obio.c,v 1.22 1996/03/31 22:28:38 pk Exp $ */ +/* $NetBSD: obio.c,v 1.23 1996/04/05 21:50:05 chuck Exp $ */ /* * Copyright (c) 1993, 1994 Theo de Raadt @@ -295,6 +295,13 @@ busattach(parent, child, args, bustype) caddr_t tmp; if (bustype == BUS_OBIO && CPU_ISSUN4) { + + /* + * avoid sun4m entries which don't have valid PA's. + * no point in even probing them. + */ + if (cf->cf_loc[0] == -1) return 0; + /* * On the 4/100 obio addresses must be mapped at * 0x0YYYYYYY, but alias higher up (we avoid the