diff options
author | 2002-01-03 07:14:50 +0000 | |
---|---|---|
committer | 2002-01-03 07:14:50 +0000 | |
commit | 9659e7f58a77c2ac0e4047a0a99d365202d7c0d8 (patch) | |
tree | a7212d04f086b55c54bb7e0db4f2f406874ec300 | |
parent | grammar in comment (diff) | |
download | wireguard-openbsd-9659e7f58a77c2ac0e4047a0a99d365202d7c0d8.tar.xz wireguard-openbsd-9659e7f58a77c2ac0e4047a0a99d365202d7c0d8.zip |
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. |