dma_struct

The dma_struct structure defines the DMA structure used by PDIAGEX. The dma_struct structure is defined in /usr/include/sys/pdiagex_sys.h and contains the following fields:

typedef struct dmast {
                  struct dmast *next;
                  int   reserved1; 
								
                  int   reserved2; 
								
                  int   dma_flags;
								 /* see /usr/include/sys/dma.h */
                  uchar *baddr;    
									/* address of the host buffer to DMA to/from */
                  uchar *daddr;  
								  /*Phys addr in DMAbus_mem, from
                    diag_dma_master()*/
                  uint  count;    
								 /* size of the DMA data in bytes */
                  struct xmem dp; 
								 /* Cross Memory descriptor of baddr */
                  char  pinned; 
							   /* NonZero if DMA buffer was pinned */
                  char  xmattached;
							  /* NonZero if DMA buffer was CrossMemAttached */
                  char  in_use; 
							   /* TRUE if this linked list member is valid */
                } dma_info_t;
Parameter Description
next Pointer to the next dma_info_t structure in an 'in_use' list.
dma_flags DMA flags as defined in <sys/dma.h>. These flags describe what actions to take (such as, controller/worker transfer, initialize the DMA channel, and so on).
*baddr Address of memory buffer for transfer.
*daddr Address used to program the DMA controller.
count Size (in bytes) of the DMA transfer.
dp Address of cross-memory descriptor.
pinned Nonzero if DMA buffer was pinned.
xmattached Nonzero if DMA buffer was cross-memory attached.
in_use Flag for determining if DMA buffer is valid for transfer.