DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

scgth(D4)


scgth -- DMA scatter/gather list structure

Synopsis

   #include <sys/types.h>
   #include <sys/kmem.h>
   #include <sys/scgth.h>
   #include <sys/ddi.h>
   

typedef struct { union { scgth_el32_t el32; scgth_el64_t el64; } sg_elem; union { scgth_el32_t ea32; scgth_el64_t ea64; } sg_el_addr; uchar_t sg_nelem; uchar_t sg_format; } scgth_t;

typedef struct { u_int32_t sg_base; u_int32_t sg_size; } scgth_el32_t;

typedef struct { u_int32_t sg_base[2]; u_int32_t sg_size; u_int32_t _sg_reserved; } scgth_el64_t;

Description

The scgth structure describes a scatter/gather list, used for performing DMA from an I/O device to mainstore memory. A scatter/gather list contains a sequence of (address, length) pairs identifying one or more physically discontiguous pieces of memory. The addresses are physical addresses appropriate for use by the device's DMA engine.

Structure members


sg_elem
array of scatter/gather elements, allocated in memory that meets the constraints specified by an appropriate physreq(D4) structure (for example, as specified by the bcb argument to the buf_breakup(D3) function).

sg_el_addr
This ``meta'' element, in the same format as a scatter/gather list element, describes the physical memory containing the scatter/gather list itself. This can be used to load the DMA engine with the location of the scatter/gather list.

sg_nelem
number of elements in the sg_elem array

sg_format
Data format to be used, based on the value of the phys_dmasize member of the physreq(D4) structure. Valid values are:

SCGTH32
Scatter/gather list is in 32-bit format; the el32 and ea32 union members are used. Used if the value of phys_dmasize is less than or equal to 32.

SCGTH64
Scatter/gather list is in 64-bit format; the el64 and ea64 union members are used. Used if the value of phys_dmasize is greater than 32.

sg_base
base physical address for the scatter/gather element. For the SCGTH64 format, sg_base[0] holds the least significant 32 bits of information and sg_base[1] holds the most significant 32 bits.

sg_size
size, in bytes, for the scatter/gather element.

_sg_reserved
reserved for future use. Do not use.

Usage

The scgth structure is passed to the buf_breakup(D3) or the msgscgth(D3str) function to implement scatter/gather functionality.

Hardware applicability

All

Version applicability

ddi: 8, 8mp

Differences between versions

References

buf(D4), buf_breakup(D3), msgscgth(D3str), physreq(D4), scgth_free(D3)

``Scatter/gather operations'' in HDK Technical Reference


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