Specifications

ddi_dma_req DMA Request structure
#include <sys/ddidmareq.h>
Solaris DDI specic (Solaris DDI).
A ddi_dma_req structure describes a request for DMA resources. A driver can use it
to describe forms of allocations and ways to allocate DMA resources for a DMA
request.
ddi_dma_lim_t *dmar_limits; /* Callers dma engines*/
/* constraints */
uint_t dmar_flags; /* Contains information for */
/* mapping routines */
int (*dmar_fp)(caddr_t); /* Callback function */
caddr_t dmar_arg; /* Callback functions argument */
ddi_dma_obj_t dmar_object; /* Description of the object */
/* to be mapped */
For the denition of the DMA limits structure, which dmar_limits points to, see
ddi_dma_lim_sparc(9S) or ddi_dma_lim_IA(9S).
Valid values for dmar_flags are:
DDI_DMA_WRITE /* Direction memory --> IO */
DDI_DMA_READ /* Direction IO --> memory */
DDI_DMA_RDWR /* Both read and write */
DDI_DMA_REDZONE /* Establish an MMU redzone at end of mapping */
DDI_DMA_PARTIAL /* Partial mapping is allowed */
DDI_DMA_CONSISTENT /* Byte consistent access wanted */
DDI_DMA_SBUS_64BIT /* Use 64 bit capability on SBus */
DDI_DMA_WRITE, DDI_DMA_READ, and DDI_DMA_RDWR describe the intended
direction of the DMA transfer. Some implementations might explicitly disallow
DDI_DMA_RDWR.
DDI_DMA_REDZONE asks the system to establish a protected red zone after the object.
The DMA resource allocation functions do not guarantee the success of this request, as
some implementations might not have the hardware ability to support it.
DDI_DMA_PARTIAL lets the system know that the caller can accept partial mapping.
That is, if the size of the object exceeds the resources available, the system allocates
only a portion of the object and returns status indicating this partial allocation. At a
later point, the caller can use ddi_dma_curwin(9F) and ddi_dma_movwin(9F) to
change the valid portion of the object that has resources allocated.
DDI_DMA_CONSISTENT gives a hint to the system that the object should be mapped
for byte consistent access. Normal data transfers usually use a streaming mode of
operation. They start at a specic point, transfer a fairly large amount of data
sequentially, and then stop, usually on an aligned boundary. Control mode data
transfers for memory-resident device control blocks (for example, Ethernet message
descriptors) do not access memory in such a sequential fashion. Instead, they tend to
modify a few words or bytes, move around and maybe modify a few more.
ddi_dma_req(9S)
NAME
SYNOPSIS
INTERFACE
LEVEL
DESCRIPTION
STRUCTURE
MEMBERS
Data Structures for Drivers 43