diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/sparc/sparc/iommu.c | 47 |
1 files changed, 1 insertions, 46 deletions
diff --git a/sys/arch/sparc/sparc/iommu.c b/sys/arch/sparc/sparc/iommu.c index 5775aee68af..242bc795b43 100644 --- a/sys/arch/sparc/sparc/iommu.c +++ b/sys/arch/sparc/sparc/iommu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: iommu.c,v 1.15 2002/03/14 01:26:44 millert Exp $ */ +/* $OpenBSD: iommu.c,v 1.16 2002/03/14 20:30:00 jason Exp $ */ /* $NetBSD: iommu.c,v 1.13 1997/07/29 09:42:04 fair Exp $ */ /* @@ -332,48 +332,3 @@ iommu_remove(va, len) va += sc->sc_pagesize; } } - -#if 0 /* These registers aren't there??? */ -void -iommu_error() -{ - struct iommu_softc *sc = X; - struct iommureg *iop = sc->sc_reg; - - printf("iommu: afsr 0x%x, afar 0x%x\n", iop->io_afsr, iop->io_afar); - printf("iommu: mfsr 0x%x, mfar 0x%x\n", iop->io_mfsr, iop->io_mfar); -} -int -iommu_alloc(va, len) - u_int va, len; -{ - struct iommu_softc *sc = X; - int off, tva, pa, iovaddr, pte; - - off = (int)va & PGOFSET; - len = round_page(len + off); - va -= off; - -if ((int)sc->sc_dvmacur + len > 0) - sc->sc_dvmacur = sc->sc_dvmabase; - - iovaddr = tva = sc->sc_dvmacur; - sc->sc_dvmacur += len; - while (len) { - pmap_extract(pmap_kernel(), va, &pa); - -#define IOMMU_PPNSHIFT 8 -#define IOMMU_V 0x00000002 -#define IOMMU_W 0x00000004 - - pte = atop(pa) << IOMMU_PPNSHIFT; - pte |= IOMMU_V | IOMMU_W; - sta(sc->sc_ptes + atop(tva - sc->sc_dvmabase), ASI_BYPASS, pte); - sc->sc_reg->io_flushpage = tva; - len -= NBPG; - va += NBPG; - tva += NBPG; - } - return iovaddr + off; -} -#endif |