Deleted Added
full compact
nexus.c (52397) nexus.c (54073)
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 * $FreeBSD: head/sys/i386/i386/nexus.c 52397 1999-10-19 17:12:28Z peter $
29 * $FreeBSD: head/sys/i386/i386/nexus.c 54073 1999-12-03 08:41:24Z mdodd $
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

--- 159 unchanged lines hidden (view full) ---

197 * First, deal with the children we know about already
198 */
199 bus_generic_attach(dev);
200 /*
201 * And if we didn't see EISA or ISA on a pci bridge, create some
202 * connection points now so they show up "on motherboard".
203 */
204 if (!devclass_get_device(devclass_find("eisa"), 0)) {
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

--- 159 unchanged lines hidden (view full) ---

197 * First, deal with the children we know about already
198 */
199 bus_generic_attach(dev);
200 /*
201 * And if we didn't see EISA or ISA on a pci bridge, create some
202 * connection points now so they show up "on motherboard".
203 */
204 if (!devclass_get_device(devclass_find("eisa"), 0)) {
205 child = device_add_child(dev, "eisa", 0, 0);
205 child = device_add_child(dev, "eisa", 0);
206 if (child == NULL)
207 panic("nexus_attach eisa");
208 device_probe_and_attach(child);
209 }
210#if NMCA > 0
211 if (!devclass_get_device(devclass_find("mca"), 0)) {
206 if (child == NULL)
207 panic("nexus_attach eisa");
208 device_probe_and_attach(child);
209 }
210#if NMCA > 0
211 if (!devclass_get_device(devclass_find("mca"), 0)) {
212 child = device_add_child(dev, "mca", 0, 0);
212 child = device_add_child(dev, "mca", 0);
213 if (child == 0)
214 panic("nexus_probe mca");
215 device_probe_and_attach(child);
216 }
217#endif
218 if (!devclass_get_device(devclass_find("isa"), 0)) {
213 if (child == 0)
214 panic("nexus_probe mca");
215 device_probe_and_attach(child);
216 }
217#endif
218 if (!devclass_get_device(devclass_find("isa"), 0)) {
219 child = device_add_child(dev, "isa", 0, 0);
219 child = device_add_child(dev, "isa", 0);
220 if (child == NULL)
221 panic("nexus_attach isa");
222 device_probe_and_attach(child);
223 }
220 if (child == NULL)
221 panic("nexus_attach isa");
222 device_probe_and_attach(child);
223 }
224
224 return 0;
225}
226
227static int
228nexus_print_child(device_t bus, device_t child)
229{
230 int retval = 0;
231
232 retval += bus_print_child_header(bus, child);
233 retval += printf(" on motherboard\n");
234
235 return (retval);
236}
237
238static device_t
239nexus_add_child(device_t bus, int order, const char *name, int unit)
240{
225 return 0;
226}
227
228static int
229nexus_print_child(device_t bus, device_t child)
230{
231 int retval = 0;
232
233 retval += bus_print_child_header(bus, child);
234 retval += printf(" on motherboard\n");
235
236 return (retval);
237}
238
239static device_t
240nexus_add_child(device_t bus, int order, const char *name, int unit)
241{
241 return device_add_child_ordered(bus, order, name, unit, 0);
242 return device_add_child_ordered(bus, order, name, unit);
242}
243
244/*
245 * Allocate a resource on behalf of child. NB: child is usually going to be a
246 * child of one of our descendants, not a direct child of nexus0.
247 * (Exceptions include npx.)
248 */
249static struct resource *

--- 166 unchanged lines hidden ---
243}
244
245/*
246 * Allocate a resource on behalf of child. NB: child is usually going to be a
247 * child of one of our descendants, not a direct child of nexus0.
248 * (Exceptions include npx.)
249 */
250static struct resource *

--- 166 unchanged lines hidden ---