summaryrefslogtreecommitdiff
path: root/sys/arch/mvme88k/dev
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2001-06-08 08:09:45 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2001-06-08 08:09:45 +0000
commit95da2243c76760307b218cb7f05645e68a73e8af (patch)
tree594a78dc6e16ba4f07e3c1bc9c44def6966cf19e /sys/arch/mvme88k/dev
parent0579d34f9bf07b4a6bfebb51a83de3ac8356c01f (diff)
Change the paddr_t pmap_extract(struct pmap *, vaddr_t) interface to
boolean_t pmap_extract(struct pmap *, vaddr_t, paddr_t *). Matches NetBSD. Tested by various people on various platforms.
Diffstat (limited to 'sys/arch/mvme88k/dev')
-rw-r--r--sys/arch/mvme88k/dev/if_ie.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/sys/arch/mvme88k/dev/if_ie.c b/sys/arch/mvme88k/dev/if_ie.c
index f42566b9d4d..b1c7d9a4368 100644
--- a/sys/arch/mvme88k/dev/if_ie.c
+++ b/sys/arch/mvme88k/dev/if_ie.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ie.c,v 1.10 2001/03/09 05:44:38 smurph Exp $ */
+/* $OpenBSD: if_ie.c,v 1.11 2001/06/08 08:09:13 art Exp $ */
/*-
* Copyright (c) 1998 Steve Murphree, Jr.
@@ -161,8 +161,6 @@ vm_map_t ie_map; /* for obio */
#define NTXBUF 2 /* number of transmit commands */
#define IE_TBUF_SIZE ETHER_MAX_LEN /* length of transmit buffer */
-#define CACHED_TO_PHYS(x) pmap_extract(pmap_kernel(), (vm_offset_t)(x))
-
struct ie_softc {
struct device sc_dev; /* device structure */
struct intrhand sc_ih, sc_failih; /* interrupt info */
@@ -362,8 +360,8 @@ ie_obreset(sc)
ieo->portlow = a >> 16;
delay(1000);
- a = (u_long)CACHED_TO_PHYS(sc->scp) |
- IE_PORT_NEWSCPADDR;
+ pmap_extract(pmap_kernel(), sc->scp, &a);
+ a |= IE_PORT_NEWSCPADDR;
ieo->porthigh = a & 0xffff;
t = 0; t = 1;
ieo->portlow = a >> 16;
@@ -417,8 +415,8 @@ ieattach(parent, self, aux)
/* get the first avaliable etherbuf */
sc->sc_maddr = etherbuf; /* maddr = vaddr */
if (sc->sc_maddr == NULL) panic("ie: too many ethernet boards");
- pa = CACHED_TO_PHYS(sc->sc_maddr);
- if (pa == 0) panic("ie: pmap_extract");
+ if (pmap_extract(pmap_kernel(), sc->sc_maddr, &pa) == FALSE)
+ panic("ie: pmap_extract");
sc->sc_iobase = (caddr_t)pa; /* iobase = paddr (24 bit) */
/*printf("maddrP %x iobaseV %x\n", sc->sc_maddr, sc->sc_iobase);*/
@@ -433,7 +431,8 @@ ieattach(parent, self, aux)
/*printf("scpV %x iscpV %x scbV %x\n", sc->scp, sc->iscp, sc->scb);*/
sc->scp->ie_bus_use = 0x44;
- SWT_32(sc->scp->ie_iscp_ptr, CACHED_TO_PHYS(sc->iscp));
+ pmap_extract(pmap_kernel(), sc->iscp, &pa);
+ SWT_32(sc->scp->ie_iscp_ptr, pa);
/*
* rest of first page is unused (wasted!), rest of ram
* for buffers