diff options
author | Dale Rahn <drahn@cvs.openbsd.org> | 2002-01-03 07:14:51 +0000 |
---|---|---|
committer | Dale Rahn <drahn@cvs.openbsd.org> | 2002-01-03 07:14:51 +0000 |
commit | 5c8152990258f034ddd2f768694edaf083debc24 (patch) | |
tree | 8cf8a37339e05332ea152e475e4970f53f079922 | |
parent | 3b7b13aa4e4623ae878e6f2163a535b06df10b66 (diff) |
If the dma decides to perform I/O on memory that is not mapped, panic
immediately instead of writing on random memory addresses.
Could the mapping be faulted in, no?
-rw-r--r-- | sys/arch/macppc/macppc/dma.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/arch/macppc/macppc/dma.c b/sys/arch/macppc/macppc/dma.c index 1ffa91984d8..33356e6602b 100644 --- a/sys/arch/macppc/macppc/dma.c +++ b/sys/arch/macppc/macppc/dma.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dma.c,v 1.10 2001/12/31 17:03:59 miod Exp $ */ +/* $OpenBSD: dma.c,v 1.11 2002/01/03 07:14:50 drahn Exp $ */ /* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */ /*- @@ -155,7 +155,10 @@ _dmamap_load_buffer(t, map, buf, buflen, p, flags, lastaddrp, segp, first) /* * Get the physical address for this segment. */ - (void) pmap_extract(pmap, vaddr, (paddr_t *)&curaddr); + if (pmap_extract(pmap, vaddr, (paddr_t *)&curaddr) != TRUE) { + panic("dmamap_load_buffer pmap %x vaddr %x " + "pmap_extract failed", pmap, vaddr); + } /* * Compute the segment size, and adjust counts. |