DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

dma_buf(D4)


dma_buf -- DMA buffer descriptor structure

Syntax

   #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 on an ISA, EISA, or MCA DMA channel.

Usage

Each DMA operation is controlled by a dma_cb(D4) DMA command block 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;
   paddr_t         address;
   paddr_t         physical;
   struct dma_buf  *next_buf;
   ushort_t        count_hi;
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.

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.

Applicable hardware

PC-AT compatible platforms with ISA, EISA, or MCA buses

Version applicability

ddi: 1, 2, 3, 4, 5, 5mp, 6, 6mp, 7, 7mp, 7.1, 7.1mp, 8, 8mp

Difference between versions

This structure is expected to be replaced or modified in a future release.

References

dma_cb(D4), dma_free_buf(D3), dma_get_buf(D3)

``DMA'' in HDK Technical Reference


19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005