Lines Matching +full:data +full:- +full:mapping
19 .\" TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
47 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
80 .Nd Bus and Machine Independent DMA Mapping Interface
163 Direct Memory Access (DMA) is a method of transferring data
170 API is a bus, device, and machine-independent (MI) interface to
182 For example, if a DMA engine in a device is limited to 32-bit addresses,
190 For example, a device might require 16-byte alignment of its descriptor ring
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.
205 A mapping structure
207 represents a mapping of a memory region for DMA.
209 the mapping structure tracks any I/O MMU entries used by a request.
211 the mapping tracks the bounce pages used.
214 a mapping must be bound to a memory region by calling one of the
217 These functions configure the mapping which can include programming entries
223 When a mapping is no longer needed,
224 the mapping must be unloaded via
229 must be used to ensure that the correct data is used by the DMA engine and
231 If a mapping uses bounce pages,
232 the sync operations copy data between the bounce pages and the memory region
233 bound to the mapping.
234 Sync operations also handle architecture-specific details such as CPU cache
239 Static transactions are used with a long-lived memory region that is reused
256 allocates a memory region along with a mapping object.
257 The associated tag, memory region, and mapping object must then be passed to
259 to bind the mapping to the allocated region and obtain the
274 it should unload the mapping via
276 and then release the memory region and mapping object via
283 and a pool of mapping objects must be allocated via
285 to track the mappings of any in-flight transactions.
288 the consumer must first obtain an unused mapping object from its pool
289 of mapping objects.
290 The memory region must be bound to the mapping object via one of the
305 The mapping can then be unloaded via
307 and the mapping object can be returned to the pool of unused mapping objects.
310 the mapping objects should be freed via
315 .Bl -tag -width indent
317 A machine-dependent (MD) opaque type that describes the
329 a driver can over-ride individual fields to suit its needs.
331 .Bd -literal
353 .Bl -tag -width indent
367 argument contains a potential starting address of a DMA mapping.
371 .Ql trunc_page(testaddr) + PAGE_SIZE - 1 ,
373 The filter function should return zero if any mapping in this range
374 can be accommodated by the device and non-zero otherwise.
378 A machine-dependent type that describes individual
381 .Bd -literal
391 Although the DMA segments returned by a mapping call will adhere to
396 A machine-dependent opaque type describing an individual mapping.
407 Client specified callback for receiving mapping information resulting from
418 .Bl -tag -width indent
433 structures that represent the mapping.
435 The success or failure of the mapping is indicated by the
441 Client specified callback for receiving mapping information resulting from
450 .Bl -tag -width indent
458 with the addition that the length of the data mapped is provided via
463 visible mapping in order to guarantee memory coherency.
476 where a read implies data coming from the device to the host memory, and a write
477 implies data going from the host memory to the device.
482 .Bl -tag -width ".Dv BUS_DMASYNC_POSTWRITE"
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
553 .Bl -tag -width ".Fa filtfuncarg"
621 DMA mapping associated with this tag.
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.
675 or allocating mapping resources.
703 argument is non-NULL, this parent tag is associated with the template and
733 key-value parameters.
735 it into a key-value structure that is directly usable as a parameter argument.
737 .Bd -literal
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
764 and as opposed to streamable data such as receive and transmit buffers.
778 map or allocating mapping resources.
782 .Bl -tag -width ".Fa dmat"
792 if a mapping is still active for
796 Creates a mapping in device visible address space of
804 .Bl -tag -width ".Fa buflen"
809 A DMA map without a currently active mapping.
817 This function is called once sufficient mapping resources are available for
826 .Bl -tag -width ".Dv BUS_DMA_NOWAIT"
828 The load should not be deferred in case of insufficient mapping resources,
831 The generated transactions to and from the virtual page are non-cacheable.
836 .Bl -tag -width ".Er EINPROGRESS"
839 The status of the mapping has been delivered to the callback.
841 The mapping has been deferred for lack of resources.
847 This may result in out-of-order processing of requests.
874 indicating the disposition of the mapping.
876 .Bl -tag -width ".Er EINPROGRESS"
878 The mapping was successful and the
882 elements describing the mapping.
885 A mapping could not be achieved within the segment constraints provided
899 which maps data pointed to by
902 The data for
905 .Bl -tag -width ".Er CAM_DATA_SG_PADDR"
907 The data is a single KVA buffer.
909 The data is a single bus address range.
911 The data is a scatter/gather list of KVA buffers.
913 The data is a scatter/gather list of bus address ranges.
915 The data is contained in a
923 .Bl -item -offset indent -compact
944 which maps the crypto data buffer pointed to by
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
1018 .Bl -tag -width ".Fa dmam"
1032 Performs synchronization of a device visible mapping with the CPU visible
1033 memory referenced by that mapping.
1035 .Bl -tag -width ".Fa dmat"
1040 The DMA mapping to be synchronized.
1057 To ensure that the data are visible via the device's mapping of that
1086 .Bl -tag -width ".Fa alignment"
1088 DMA tag describing the constraints of the DMA mapping.
1090 Pointer to a pointer that will hold the returned KVA mapping of
1094 .Bl -tag -width ".Dv BUS_DMA_NOWAIT"
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