Do not depend on the nubus being mapped in one huge segment.

This commit is contained in:
briggs 1996-05-06 01:08:24 +00:00
parent 1b475d6b74
commit db495102be
6 changed files with 22 additions and 20 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: grf.c,v 1.31 1996/05/05 06:16:30 briggs Exp $ */
/* $NetBSD: grf.c,v 1.32 1996/05/06 01:08:24 briggs Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -312,7 +312,7 @@ grfmap(dev, addrp, p)
flags = MAP_SHARED | MAP_FIXED;
*addrp = (caddr_t) mac68k_trunc_page(
NUBUS_VIRT_TO_PHYS((u_int) gp->curr_mode.fbbase));
NUBUS_SLOT_TO_PADDR(gp->sc_slot.slot));
vn.v_type = VCHR; /* XXX */
vn.v_specinfo = &si; /* XXX */

View File

@ -1,4 +1,4 @@
/* $NetBSD: grf_mv.c,v 1.8 1996/05/05 06:16:35 briggs Exp $ */
/* $NetBSD: grf_mv.c,v 1.9 1996/05/06 01:08:30 briggs Exp $ */
/*
* Copyright (c) 1995 Allen Briggs. All rights reserved.
@ -94,9 +94,11 @@ grfmv_intr(vsc, slot)
void *vsc;
int slot;
{
caddr_t slotbase;
caddr_t slotbase;
struct grf_softc *sc;
slotbase = (caddr_t) NUBUS_SLOT_TO_BASE(slot);
sc = (struct grf_softc *) vsc;
slotbase = (caddr_t) sc->sc_slot.virtual_base;
slotbase[0xa0000] = zero;
}
@ -211,7 +213,7 @@ grfmv_attach(parent, self, aux)
load_image_data((caddr_t) &image_store, &image);
base = NUBUS_SLOT_TO_BASE(sc->sc_slot.slot);
base = sc->sc_slot.virtual_base;
sc->curr_mode.mode_id = mode;
sc->curr_mode.fbbase = (caddr_t) (base + image.offset);

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_ae.c,v 1.43 1996/05/05 06:16:40 briggs Exp $ */
/* $NetBSD: if_ae.c,v 1.44 1996/05/06 01:08:35 briggs Exp $ */
/*
* Device driver for National Semiconductor DS8390/WD83C690 based ethernet
@ -311,7 +311,7 @@ aeprobe(parent, match, aux)
sc->regs_rev = 0;
addr = (caddr_t) NUBUS_SLOT_TO_BASE(nu->slot);
addr = (caddr_t) nu->virtual_base;
switch (sc->vendor) {
case AE_VENDOR_INTERLAN:

View File

@ -1,4 +1,4 @@
/* $NetBSD: nubus.c,v 1.19 1996/05/05 06:17:03 briggs Exp $ */
/* $NetBSD: nubus.c,v 1.20 1996/05/06 01:08:41 briggs Exp $ */
/*
* Copyright (c) 1995 Allen Briggs. All rights reserved.
@ -197,8 +197,8 @@ probe_slot(slot, fmt)
#ifdef DEBUG
if (nubus_debug & NDB_PROBE)
printf("bytelanes of 0x%x found for slot 0x%x (base 0x%x).\n",
fmt->bytelanes, slot, NUBUS_SLOT_TO_BASE(slot));
printf("bytelanes of 0x%x found for slot 0x%x.\n",
fmt->bytelanes, slot);
#endif
hdr_size = 20;
@ -209,7 +209,6 @@ probe_slot(slot, fmt)
* would be valid. This is necessary for NUBUS_ROM_offset()
* to work.
*/
printf("Mapping in space for slot %d.\n", fmt->slot);
hdr = (vm_offset_t)
bus_mapin(BUS_NUBUS,NUBUS_SLOT_TO_PADDR(fmt->slot),NBMEMSIZE);
if (hdr == NULL) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: grf_nubus.c,v 1.8 1996/05/05 06:16:35 briggs Exp $ */
/* $NetBSD: grf_nubus.c,v 1.9 1996/05/06 01:08:30 briggs Exp $ */
/*
* Copyright (c) 1995 Allen Briggs. All rights reserved.
@ -94,9 +94,11 @@ grfmv_intr(vsc, slot)
void *vsc;
int slot;
{
caddr_t slotbase;
caddr_t slotbase;
struct grf_softc *sc;
slotbase = (caddr_t) NUBUS_SLOT_TO_BASE(slot);
sc = (struct grf_softc *) vsc;
slotbase = (caddr_t) sc->sc_slot.virtual_base;
slotbase[0xa0000] = zero;
}
@ -211,7 +213,7 @@ grfmv_attach(parent, self, aux)
load_image_data((caddr_t) &image_store, &image);
base = NUBUS_SLOT_TO_BASE(sc->sc_slot.slot);
base = sc->sc_slot.virtual_base;
sc->curr_mode.mode_id = mode;
sc->curr_mode.fbbase = (caddr_t) (base + image.offset);

View File

@ -1,4 +1,4 @@
/* $NetBSD: nubus.c,v 1.19 1996/05/05 06:17:03 briggs Exp $ */
/* $NetBSD: nubus.c,v 1.20 1996/05/06 01:08:41 briggs Exp $ */
/*
* Copyright (c) 1995 Allen Briggs. All rights reserved.
@ -197,8 +197,8 @@ probe_slot(slot, fmt)
#ifdef DEBUG
if (nubus_debug & NDB_PROBE)
printf("bytelanes of 0x%x found for slot 0x%x (base 0x%x).\n",
fmt->bytelanes, slot, NUBUS_SLOT_TO_BASE(slot));
printf("bytelanes of 0x%x found for slot 0x%x.\n",
fmt->bytelanes, slot);
#endif
hdr_size = 20;
@ -209,7 +209,6 @@ probe_slot(slot, fmt)
* would be valid. This is necessary for NUBUS_ROM_offset()
* to work.
*/
printf("Mapping in space for slot %d.\n", fmt->slot);
hdr = (vm_offset_t)
bus_mapin(BUS_NUBUS,NUBUS_SLOT_TO_PADDR(fmt->slot),NBMEMSIZE);
if (hdr == NULL) {