Manual page for ddi_dma_buf_bind_handle(9F)
ddi_dma_buf_bind_handle - binds a system buffer to a DMA handle
int ddi_dma_buf_bind_handle(ddi_dma_handle_t handle,
struct buf *bp,
handle previously allocated by a call to
A pointer to a system buffer structure (see
Valid flags include:
Transfer direction is from memory to I/O
Transfer direction is from I/O to memory
Both read and write
redzone at end of the object.
Partial resource allocation
Nonsequential, random, and small block transfers.
Sequential, unidirectional, block-sized, and block-aligned transfers.
The address of a function to call back later if resources are not
available now. The following special function addresses may also
wait until resources are available
do not wait until resources are available and do not schedule a callback.
Argument to be passed to the callback function,
if such a function
A pointer to the first
Upon a successful return,
points to a value representing
the number of cookies for this
Solaris DDI specific (Solaris DDI).
resources for a system buffer
such that a device can perform
to or from the buffer.
are allocated considering the device's
attributes as expressed by
fills in the first
cookie pointed to by
with the appropriate address, length, and bus type.
is set to the number of
cookies representing this
cookies must be retrieved by calling
*countp - 1
transfer completes, the driver should free up system
resources by calling
argument contains information for mapping routines.
These flags describe the intended direction of the
This flag should be set
if the device is doing
sequential, unidirectional, block-sized, and block-aligned transfers to
or from memory. The alignment and padding constraints specified by the
fields in the
is used to allocate the most effective hardware support for large
This flag should be set if
the device accesses
memory randomly, or if synchronization steps using
need to be as efficient as possible.
parameter blocks used
for communication between a device and a driver should be allocated using
If this flag is set, the system attempts to
establish a protected red zone after
the object. The
resource allocation functions do not guarantee the
success of this request as some implementations may not have the
hardware ability to support a red zone.
Setting this flag indicates the caller can accept resources
for part of the object. That is, if the size of the object exceeds the
resources available, only resources for a portion of the object are allocated.
The system indicates this condition returning status
At a later point, the caller can use
to change the valid portion of the object for which
resources are allocated. If resources were allocated for
only part of the object,
returns resources for the
is set, the system may decide to allocate resources for the
entire object (less overhead) in which case
The callback function,
indicates how a caller wants to handle the
possibility of resources not being available. If
is set to
the caller does not care if the allocation
fails, and can handle an allocation failure appropriately. If
is set to
the caller wishes to have the
allocation routines wait for resources to become available. If any
other value is set, and a
resource allocation fails, this value is
assumed to be the address of a
function to call at a later time when resources may
become available. When the specified function is called, it is passed
as an argument. The specified callback function must return either
indicates that the callback function attempted to allocate
resources but failed to do so. In this case the callback
function is put back on a list to be called again later.
a successful allocation of
resources or that the driver no longer wishes to
The callback function is called in interrupt context. Therefore,
only system functions accessible from interrupt context are
be available. The callback function must take whatever steps necessary
to protect its critical resources, data structures, queues, etc.
Successfully allocated resources for the entire object.
Successfully allocated resources for a part
of the object. This is acceptable when
partial transfers are permitted by setting the
transaction is using the
No resources are available at the present time.
The object cannot be reached by the device requesting the resources.
The object is too big. A request of this size can never be
satisfied on this particular system.
The maximum size
varies depending on machine and configuration.
can be called from user, kernel, or interrupt context,
is set to
in which case it can be called from user or kernel context only.
Created by unroff & hp-tools.
© by Hans-Peter Bischof. All Rights Reserved (1997).
Last modified 21/April/97