Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/vax/uba Only map in map registers and the I/O page ...
details: https://anonhg.NetBSD.org/src/rev/c07ebb87a1e7
branches: trunk
changeset: 486721:c07ebb87a1e7
user: ragge <ragge%NetBSD.org@localhost>
date: Sat May 27 21:44:35 2000 +0000
description:
Only map in map registers and the I/O page if they are not mapped in already.
diffstat:
sys/arch/vax/uba/uba_cmi.c | 10 ++++------
sys/arch/vax/uba/uba_dma.c | 15 ++++++++++-----
sys/arch/vax/uba/uba_sbi.c | 5 ++---
3 files changed, 16 insertions(+), 14 deletions(-)
diffs (82 lines):
diff -r ccf85fe366e2 -r c07ebb87a1e7 sys/arch/vax/uba/uba_cmi.c
--- a/sys/arch/vax/uba/uba_cmi.c Sat May 27 21:33:26 2000 +0000
+++ b/sys/arch/vax/uba/uba_cmi.c Sat May 27 21:44:35 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uba_cmi.c,v 1.2 1999/08/14 11:31:48 ragge Exp $ */
+/* $NetBSD: uba_cmi.c,v 1.3 2000/05/27 21:44:35 ragge Exp $ */
/*
* Copyright (c) 1996 Jonathan Stone.
* Copyright (c) 1994, 1996 Ludd, University of Lule}, Sweden.
@@ -103,8 +103,6 @@
{
struct uba_vsoftc *sc = (void *)self;
struct sbi_attach_args *sa = aux;
- struct uba_regs *uh_uba = (void *)sa->nexaddr;
- int ubaddr = sa->nexinfo & 1;
printf(": DW750\n");
/*
@@ -120,11 +118,11 @@
/*
* Fill in variables used by the sgmap system.
*/
- sc->uv_size = UBASIZE; /* Size in bytes of Qbus space */
- sc->uv_addr = (paddr_t)uh_uba->uba_map; /* Map regs physical address */
+ sc->uv_size = UBAPAGES * VAX_NBPG;
+ sc->uv_uba = (void *)sa->nexaddr; /* Map registers is in adaptor */
uba_dma_init(sc);
- uba_attach(&sc->uv_sc, UIOPAGE(ubaddr));
+ uba_attach(&sc->uv_sc, UIOPAGE(sa->type == NEX_UBA1));
}
void
diff -r ccf85fe366e2 -r c07ebb87a1e7 sys/arch/vax/uba/uba_dma.c
--- a/sys/arch/vax/uba/uba_dma.c Sat May 27 21:33:26 2000 +0000
+++ b/sys/arch/vax/uba/uba_dma.c Sat May 27 21:44:35 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uba_dma.c,v 1.3 2000/02/29 17:42:32 matt Exp $ */
+/* $NetBSD: uba_dma.c,v 1.4 2000/05/27 21:44:35 ragge Exp $ */
/*-
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -108,11 +108,16 @@
t->_dmamem_mmap = _bus_dmamem_mmap;
/*
- * Map in Unibus map registers.
+ * Map in Unibus map registers, if not mapped in already.
*/
- pte = (struct pte *)vax_map_physmem(sc->uv_addr, sc->uv_size/VAX_NBPG);
- if (pte == 0)
- panic("uba_dma_init");
+ if (sc->uv_uba) {
+ pte = sc->uv_uba->uba_map;
+ } else {
+ pte = (struct pte *)vax_map_physmem(sc->uv_addr,
+ sc->uv_size/(VAX_NBPG/sizeof(struct pte)));
+ if (pte == 0)
+ panic("uba_dma_init");
+ }
/*
* Initialize the SGMAP.
*/
diff -r ccf85fe366e2 -r c07ebb87a1e7 sys/arch/vax/uba/uba_sbi.c
--- a/sys/arch/vax/uba/uba_sbi.c Sat May 27 21:33:26 2000 +0000
+++ b/sys/arch/vax/uba/uba_sbi.c Sat May 27 21:44:35 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uba_sbi.c,v 1.3 2000/04/30 11:47:21 ragge Exp $ */
+/* $NetBSD: uba_sbi.c,v 1.4 2000/05/27 21:44:35 ragge Exp $ */
/*
* Copyright (c) 1996 Jonathan Stone.
* Copyright (c) 1994, 1996 Ludd, University of Lule}, Sweden.
@@ -161,8 +161,7 @@
/*
* Fill in variables used by the sgmap system.
*/
- sc->uv_size = UBASIZE; /* Size in bytes of Qbus space */
- sc->uv_addr = (paddr_t)sc->uv_uba->uba_map;
+ sc->uv_size = UBASIZE; /* Size in bytes of Unibus space */
uba_dma_init(sc);
uba_attach(&sc->uv_sc, (parent->dv_unit ? UMEMB8600(ubaddr) :
Home |
Main Index |
Thread Index |
Old Index