Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/share/man/man9 Clarify that you shouldn't use the bus_dma_se...



details:   https://anonhg.NetBSD.org/src/rev/7ce214086418
branches:  trunk
changeset: 485592:7ce214086418
user:      fvdl <fvdl%NetBSD.org@localhost>
date:      Mon May 01 23:12:20 2000 +0000

description:
Clarify that you shouldn't use the bus_dma_segment_t return value from
bus_dmamem_alloc to program DMA registers, but that the dm_segs array
of a successfully loaded DMA mapping should be used.

diffstat:

 share/man/man9/bus_dma.9 |  16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 deletions(-)

diffs (32 lines):

diff -r 23866aa597ab -r 7ce214086418 share/man/man9/bus_dma.9
--- a/share/man/man9/bus_dma.9  Mon May 01 22:49:55 2000 +0000
+++ b/share/man/man9/bus_dma.9  Mon May 01 23:12:20 2000 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: bus_dma.9,v 1.12 2000/04/19 07:57:50 soren Exp $
+.\"    $NetBSD: bus_dma.9,v 1.13 2000/05/01 23:12:20 fvdl Exp $
 .\"
 .\" Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -452,10 +452,20 @@
 .\" XXX: This does not work with all the arguments.
 .It Fn bus_dmamem_alloc "tag" "size" "alignment" "boundary" "segs" "..."
 Allocates memory that is "DMA safe" for the bus corresponding to the
-given tag.  The mapping of this memory is machine-dependent (or
+given tag.
+.Pp
+The mapping of this memory is machine-dependent (or
 "opaque"); machine-independent code is not to assume that the
 addresses returned are valid in kernel virtual address space, or that
-the addresses returned are system physical addresses.
+the addresses returned are system physical addresses. The address value
+returned as part of
+.Fa segs
+can thus not be used to program DMA controller address registers. Only
+the values in the
+.Fa dm_segs
+array of a sucessfully loaded DMA map (using
+.Fn bus_dmamap_load
+) can be used for this purpose.
 .Pp
 Allocations will always be rounded to the hardware page size.  Callers
 may wish to take advantage of this, and cluster allocation of small



Home | Main Index | Thread Index | Old Index