Lines Matching +full:dma +full:- +full:window
80 .Nd Bus and Machine Independent DMA Mapping Interface
163 Direct Memory Access (DMA) is a method of transferring data
165 A DMA transaction can be achieved between device to memory,
170 API is a bus, device, and machine-independent (MI) interface to
179 is used to describe the properties of a group of related DMA
181 One way to view this is that a tag describes the limitations of a DMA engine.
182 For example, if a DMA engine in a device is limited to 32-bit addresses,
188 Some devices may require multiple tags to describe DMA
190 For example, a device might require 16-byte alignment of its descriptor ring
195 If a device has restrictions that are common to all DMA transactions
201 The per-group tags can then inherit these restrictions from this
203 tag rather than having to list them explicitly when creating the per-group tags.
207 represents a mapping of a memory region for DMA.
210 For DMA requests that require bounce pages,
213 To prepare for one or more DMA transactions,
221 is the list of scatter/gather address ranges a consumer can pass to a DMA
227 Before and after each DMA transaction,
229 must be used to ensure that the correct data is used by the DMA engine and
234 Sync operations also handle architecture-specific details such as CPU cache
238 handles two types of DMA transactions: static and dynamic.
239 Static transactions are used with a long-lived memory region that is reused
282 to describe the DMA transactions to and from these memory regions,
285 to track the mappings of any in-flight transactions.
309 When a consumer is no longer scheduling DMA transactions,
315 .Bl -tag -width indent
317 A machine-dependent (MD) opaque type that describes the
318 characteristics of a group of DMA transactions.
321 This allows all devices along the path of DMA transactions
329 a driver can over-ride individual fields to suit its needs.
331 .Bd -literal
350 attributes of the DMA tag are not supported with templates.
353 .Bl -tag -width indent
359 for devices whose DMA address restrictions cannot be specified
360 by a single window.
367 argument contains a potential starting address of a DMA mapping.
371 .Ql trunc_page(testaddr) + PAGE_SIZE - 1 ,
374 can be accommodated by the device and non-zero otherwise.
378 A machine-dependent type that describes individual
381 .Bd -literal
388 field contains the device visible address of the DMA segment, and
390 contains the length of the DMA segment.
391 Although the DMA segments returned by a mapping call will adhere to
392 all restrictions necessary for a successful DMA operation, some conversion
396 A machine-dependent opaque type describing an individual mapping.
399 Multiple maps can be associated with one DMA tag.
418 .Bl -tag -width indent
450 .Bl -tag -width indent
462 Bus DMA requires explicit synchronization of memory with its device
466 allows the type of DMA operation that will be or has been performed
482 .Bl -tag -width ".Dv BUS_DMASYNC_POSTWRITE"
500 the callback for a DMA load operation that has been deferred with
508 .Bl -tag -width indent
537 Operations to be performed by the client-specified
539 .Bl -tag -width ".Dv BUS_DMA_UNLOCK"
547 .Bl -tag -width indent
551 Allocates a DMA tag, and initializes it according to
553 .Bl -tag -width ".Fa filtfuncarg"
566 Hardware that can DMA starting at any address would specify
569 Hardware requiring DMA transfers to start on a multiple of 4K
573 Boundary constraint, in bytes, of the target DMA memory region.
582 Bounds of the window of bus address space that
585 The window contains all addresses greater than
589 For example, a device incapable of DMA above 4GB, would specify a
597 Similarly a device that can only perform DMA to addresses below
608 window.
612 the exclusion window.
624 in a DMA mapped region.
626 Maximum size, in bytes, of a segment in any DMA mapped region associated
631 .Bl -tag -width ".Dv BUS_DMA_ALLOCNOW"
633 Pre-allocate enough resources to handle at least one map load operation on
645 Indicate that the DMA engine and CPU are cache-coherent.
668 Pointer to a bus_dma_tag_t where the resulting DMA tag will
685 Deallocate the DMA tag
692 if any DMA maps remain associated with
703 argument is non-NULL, this parent tag is associated with the template and
704 will be compiled into the dma tag that is later created.
733 key-value parameters.
735 it into a key-value structure that is directly usable as a parameter argument.
737 .Bd -literal
751 Allocates and initializes a DMA map.
753 .Bl -tag -width ".Fa nsegments"
758 .Bl -tag -width ".Dv BUS_DMA_COHERENT"
763 be accessed by both a CPU and a DMA engine, frequently such as control data
772 where the resulting DMA map will be stored.
780 Frees all resources associated with a given DMA map.
782 .Bl -tag -width ".Fa dmat"
787 The DMA map to destroy.
800 associated with the DMA map
804 .Bl -tag -width ".Fa buflen"
809 A DMA map without a currently active mapping.
818 the DMA operation.
826 .Bl -tag -width ".Dv BUS_DMA_NOWAIT"
831 The generated transactions to and from the virtual page are non-cacheable.
836 .Bl -tag -width ".Er EINPROGRESS"
847 This may result in out-of-order processing of requests.
869 argument used to create the dma tag
876 .Bl -tag -width ".Er EINPROGRESS"
893 for DMA transfers.
901 for DMA transfers.
905 .Bl -tag -width ".Er CAM_DATA_SG_PADDR"
923 .Bl -item -offset indent -compact
936 for DMA transfers.
946 for DMA transfers.
955 for DMA transfers.
989 for DMA transfers.
995 .Fa uio->uio_resid .
1003 .Fa uio->uio_segflg
1009 .Fa "uio->uio_td->td_proc" Ns 's
1011 User space memory must be in-core and wired prior to attempting a map
1016 Unloads a DMA map.
1018 .Bl -tag -width ".Fa dmam"
1023 The DMA map that is to be unloaded.
1027 will not perform any implicit synchronization of DMA buffers.
1035 .Bl -tag -width ".Fa dmat"
1040 The DMA mapping to be synchronized.
1053 memory access (DMA) to shared
1058 memory, the buffer must be loaded and a DMA sync operation of
1067 In this case, the buffer must be loaded, and a DMA sync operation of
1071 once the DMA operation has completed and a
1086 .Bl -tag -width ".Fa alignment"
1088 DMA tag describing the constraints of the DMA mapping.
1094 .Bl -tag -width ".Dv BUS_DMA_NOWAIT"
1128 where the resulting DMA map will be stored.
1166 .Bl -tag -width ".Fa vaddr"
1220 .Bl -item -offset indent -compact
1240 It is common practice to call some of these functions during driver start-up
1252 called with any non-sleepable locks held:
1254 .Bl -item -offset indent -compact
1274 .%T "A Machine-Independent DMA Framework for NetBSD"
1305 .An -nosplit