nexus.c (48832) | nexus.c (49195) |
---|---|
1/* 2 * Copyright 1998 Massachusetts Institute of Technology 3 * 4 * Permission to use, copy, modify, and distribute this software and 5 * its documentation for any purpose and without fee is hereby 6 * granted, provided that both the above copyright notice and this 7 * permission notice appear in all copies, that both the above 8 * copyright notice and this permission notice appear in all --- 12 unchanged lines hidden (view full) --- 21 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 22 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 23 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 25 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 26 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * | 1/* 2 * Copyright 1998 Massachusetts Institute of Technology 3 * 4 * Permission to use, copy, modify, and distribute this software and 5 * its documentation for any purpose and without fee is hereby 6 * granted, provided that both the above copyright notice and this 7 * permission notice appear in all copies, that both the above 8 * copyright notice and this permission notice appear in all --- 12 unchanged lines hidden (view full) --- 21 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 22 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 23 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 25 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 26 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * |
29 * $Id: nexus.c,v 1.11 1999/05/30 10:50:57 dfr Exp $ | 29 * $Id: nexus.c,v 1.12 1999/07/16 01:00:24 msmith Exp $ |
30 */ 31 32/* 33 * This code implements a `root nexus' for Intel Architecture 34 * machines. The function of the root nexus is to serve as an 35 * attachment point for both processors and buses, and to manage 36 * resources which are common to all of them. In particular, 37 * this code implements the core resource managers for interrupt --- 31 unchanged lines hidden (view full) --- 69#include <i386/isa/isa.h> 70#endif 71#include <i386/isa/icu.h> 72#include <i386/isa/intr_machdep.h> 73 74static struct rman irq_rman, drq_rman, port_rman, mem_rman; 75 76static int nexus_probe(device_t); | 30 */ 31 32/* 33 * This code implements a `root nexus' for Intel Architecture 34 * machines. The function of the root nexus is to serve as an 35 * attachment point for both processors and buses, and to manage 36 * resources which are common to all of them. In particular, 37 * this code implements the core resource managers for interrupt --- 31 unchanged lines hidden (view full) --- 69#include <i386/isa/isa.h> 70#endif 71#include <i386/isa/icu.h> 72#include <i386/isa/intr_machdep.h> 73 74static struct rman irq_rman, drq_rman, port_rman, mem_rman; 75 76static int nexus_probe(device_t); |
77static void nexus_print_child(device_t, device_t); | 77static int nexus_print_child(device_t, device_t); |
78static device_t nexus_add_child(device_t bus, int order, const char *name, 79 int unit); 80static struct resource *nexus_alloc_resource(device_t, device_t, int, int *, 81 u_long, u_long, u_long, u_int); 82static int nexus_activate_resource(device_t, device_t, int, int, 83 struct resource *); 84static int nexus_deactivate_resource(device_t, device_t, int, int, 85 struct resource *); --- 122 unchanged lines hidden (view full) --- 208 209 child = device_add_child(dev, "isa", 0, 0); 210 if (child == 0) 211 panic("nexus_probe isa"); 212 213 return 0; 214} 215 | 78static device_t nexus_add_child(device_t bus, int order, const char *name, 79 int unit); 80static struct resource *nexus_alloc_resource(device_t, device_t, int, int *, 81 u_long, u_long, u_long, u_int); 82static int nexus_activate_resource(device_t, device_t, int, int, 83 struct resource *); 84static int nexus_deactivate_resource(device_t, device_t, int, int, 85 struct resource *); --- 122 unchanged lines hidden (view full) --- 208 209 child = device_add_child(dev, "isa", 0, 0); 210 if (child == 0) 211 panic("nexus_probe isa"); 212 213 return 0; 214} 215 |
216static void | 216static int |
217nexus_print_child(device_t bus, device_t child) 218{ | 217nexus_print_child(device_t bus, device_t child) 218{ |
219 printf(" on motherboard"); | 219 int retval = 0; 220 221 retval += bus_print_child_header(bus, child); 222 retval += printf(" on motherboard\n"); 223 224 return (retval); |
220} 221 222static device_t 223nexus_add_child(device_t bus, int order, const char *name, int unit) 224{ 225 return device_add_child_ordered(bus, order, name, unit, 0); 226} 227 --- 175 unchanged lines hidden --- | 225} 226 227static device_t 228nexus_add_child(device_t bus, int order, const char *name, int unit) 229{ 230 return device_add_child_ordered(bus, order, name, unit, 0); 231} 232 --- 175 unchanged lines hidden --- |