Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-4]: src/sys/arch/alpha/mcbus Pull up revision 1.7 (requested by...



details:   https://anonhg.NetBSD.org/src/rev/18153d06f8ec
branches:  netbsd-1-4
changeset: 469867:18153d06f8ec
user:      he <he%NetBSD.org@localhost>
date:      Thu Dec 16 23:16:04 1999 +0000

description:
Pull up revision 1.7 (requested by mjacob):
  Force probing of MCPCIAs such that if they are not there we can
  still boot.  Not all Alpha 4100 / Rawhide systems have the full
  four MCPCIAs.

diffstat:

 sys/arch/alpha/mcbus/mcbus.c |  21 +++++++++++----------
 1 files changed, 11 insertions(+), 10 deletions(-)

diffs (77 lines):

diff -r 3c6176f2c00c -r 18153d06f8ec sys/arch/alpha/mcbus/mcbus.c
--- a/sys/arch/alpha/mcbus/mcbus.c      Thu Dec 16 23:11:46 1999 +0000
+++ b/sys/arch/alpha/mcbus/mcbus.c      Thu Dec 16 23:16:04 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mcbus.c,v 1.4.8.1 1999/04/16 23:31:02 thorpej Exp $ */
+/* $NetBSD: mcbus.c,v 1.4.8.2 1999/12/16 23:16:04 he Exp $ */
 
 /*
  * Copyright (c) 1998 by Matthew Jacob
@@ -37,7 +37,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: mcbus.c,v 1.4.8.1 1999/04/16 23:31:02 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mcbus.c,v 1.4.8.2 1999/12/16 23:16:04 he Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -54,6 +54,8 @@
 #include "locators.h"
 
 #define KV(_addr)      ((caddr_t)ALPHA_PHYS_TO_K0SEG((_addr)))
+#define        MCPCIA_EXISTS(mid, gid) \
+       (!badaddr((void *)KV(MCPCIA_BRIDGE_ADDR(gid, mid)), sizeof (u_int32_t)))
 
 extern struct cfdriver mcbus_cd;
 extern int     cputype;
@@ -63,7 +65,7 @@
 static int     mcbusmatch __P((struct device *, struct cfdata *, void *));
 static void    mcbusattach __P((struct device *, struct device *, void *));
 static int     mcbusprint __P((void *, const char *));
-static int     mcbussubmatch __P((struct device *, struct cfdata *, void *));
+static int     mcbussbm __P((struct device *, struct cfdata *, void *));
 static char    *mcbus_node_type_str __P((u_int8_t));
 
 typedef struct {
@@ -99,7 +101,7 @@
 }
 
 static int
-mcbussubmatch(parent, cf, aux)
+mcbussbm(parent, cf, aux)
        struct device *parent;
        struct cfdata *cf;
        void *aux;
@@ -167,7 +169,7 @@
        ta.ma_mid = 1;
        ta.ma_type = MCBUS_TYPE_MEM;
        mbp->mcbus_types[1] = MCBUS_TYPE_MEM;
-       (void) config_found_sm(self, &ta, mcbusprint, mcbussubmatch);
+       (void) config_found_sm(self, &ta, mcbusprint, mcbussbm);
 
        /*
         * Now find PCI busses.
@@ -183,10 +185,9 @@
                ta.ma_gid = MCBUS_GID_FROM_INSTANCE(0);
                ta.ma_mid = mid;
                ta.ma_type = MCBUS_TYPE_PCI;
-               /*
-                * XXX MUST ACTUALLY PROBE FOR MCPCIA!
-                */
-               (void) config_found_sm(self, &ta, mcbusprint, mcbussubmatch);
+               if (MCPCIA_EXISTS(ta.ma_mid, ta.ma_gid)) {
+                       (void) config_found_sm(self, &ta, mcbusprint, mcbussbm);
+               }
        }
 
        /*
@@ -213,7 +214,7 @@
                ta.ma_mid = mid;
                ta.ma_type = MCBUS_TYPE_CPU;
                mbp->mcbus_types[mid] = MCBUS_TYPE_CPU;
-               (void) config_found_sm(self, &ta, mcbusprint, mcbussubmatch);
+               (void) config_found_sm(self, &ta, mcbusprint, mcbussbm);
 #endif
        }
 



Home | Main Index | Thread Index | Old Index