dma_buf(D4) dma_buf(D4)
NAME
dma_buf - DMA buffer descriptor structure
SYNOPSIS
#include <sys/types.h>
#include <sys/dma.h>
#include <sys/ddi.h>
DESCRIPTION
The DMA buffer descriptor structure is used to specify the
data to be transferred by a DMA operation.
USAGE
Each DMA operation is controlled by a DMA command block [see
dma_cb(D4)] structure that includes pointers to two dma_buf
structures.
Each dma_buf structure provides the physical address and size
of a data block involved in a DMA transfer. Scatter/gather
operations involving multiple data blocks may be implemented
by linking together multiple dma_bufs in a singly-linked list.
Each dma_buf includes both the virtual and physical address of
the next DMA buffer descriptor in the list.
DMA buffer descriptor structures should only be allocated via
dma_get_buf(D3). Although drivers may access the members
listed below, they should not make any assumptions about the
size of the structure or the contents of other fields in the
structure.
Structure Definitions
The dma_buf structure contains the following members:
ushort_t count; /* size of block*/
paddr_t address; /* physical address of data block */
paddr_t physical; /* physical address of next dma_buf */
struct dma_buf *next_buf; /* next buffer descriptor */
ushort_t count_hi; /* for big blocks */
The members of the dma_buf structure are:
count specifies the low-order 16 bits of the size of the data
block in bytes.
address specifies the physical address of the data block.
Copyright 1994 Novell, Inc. Page 1
dma_buf(D4) dma_buf(D4)
physical specifies the physical address of the next dma_buf in
a linked list of DMA buffers descriptors. It should be NULL
if the buffer descriptor is the last one in the list. Note
that a DMA buffer descriptor allocated by dma_get_buf will be
zeroed out initially, thus no explicit initialization is
required for this field if a value of NULL is desired.
next_buf specifies the virtual address of the next dma_buf in
a linked list of DMA buffer descriptors. It should be NULL if
the buffer descriptor is the last one in the list. Note that
a DMA buffer descriptor allocated by dma_get_buf will be
zeroed out initially, thus no explicit initialization is
required for this field if a value of NULL is desired.
count_hi specifies the high-order 16 bits of the size of the
data block in bytes. Since a dma_buf allocated by dma_get_buf
is initially zeroed out, no explicit initialization is
required for this field if the size of the data block may be
specified by a ushort_t.
REFERENCES
dma_cb(D4), dma_free_buf(D3), dma_get_buf(D3)
NOTICES
Portability
AT-compatible architectures
Future Directions
This structure is expected to be replaced or modified in a
future release.
Copyright 1994 Novell, Inc. Page 2