ddi_dma_cookie man page on Solaris

Man page or keyword search:  
man Server   20652 pages
apropos Keyword Search (all sections)
Output format
Solaris logo
[printable version]

ddi_dma_cookie(9S)	  Data Structures for Drivers	    ddi_dma_cookie(9S)

NAME
       ddi_dma_cookie - DMA address cookie

SYNOPSIS
       #include <sys/sunddi.h>

INTERFACE LEVEL
       Solaris DDI specific (Solaris DDI).

DESCRIPTION
       The   ddi_dma_cookie_t	structure  contains  DMA  address  information
       required to program a DMA engine. The structure is filled in by a  call
       to	ddi_dma_getwin(9F),	 ddi_dma_addr_bind_handle(9F),	    or
       ddi_dma_buf_bind_handle(9F), to get device-specific DMA transfer infor‐
       mation for a DMA request or a DMA window.

STRUCTURE MEMBERS
       typedef struct {
	      union {
		      uint64_t	      _dmac_ll;	      /* 64 bit DMA address */
		      uint32_t	      _dmac_la[2];    /* 2 x 32 bit address */
	      } _dmu;
	      size_t	      dmac_size;      /* DMA cookie size */
	      uint_t	      dmac_type;      /* bus specific type bits */
       } ddi_dma_cookie_t;

       You  can	 access the DMA address through the #defines: dmac_address for
       32-bit addresses and dmac_laddress for 64-bit addresses.	 These	macros
       are defined as follows:

       #define dmac_laddress   _dmu._dmac_ll
       #ifdef _LONG_LONG_HTOL
       #define dmac_notused    _dmu._dmac_la[0]
       #define dmac_address    _dmu._dmac_la[1]
       #else
       #define dmac_address    _dmu._dmac_la[0]
       #define dmac_notused    _dmu._dmac_la[1]
       #endif

       dmac_laddress  specifies	 a 64-bit I/O address appropriate for program‐
       ming the device's DMA engine. If a device has a 64-bit DMA address reg‐
       ister  a	 driver	 should	 use  this  field  to  program the DMA engine.
       dmac_address specifies a 32-bit I/O address.  It	 should	 be  used  for
       devices	that have a 32-bit DMA address register. The I/O address range
       that the device can address and other DMA attributes have to be	speci‐
       fied in a ddi_dma_attr(9S) structure.

       dmac_size describes the length of the transfer in bytes.

       dmac_type contains bus-specific type bits, if appropriate. For example,
       a device on a PCI bus has PCI address modifier bits placed here.

SEE ALSO
       pci(4),	   sbus(4),	 sysbus(4),	 ddi_dma_addr_bind_handle(9F),
       ddi_dma_buf_bind_handle(9F),			   ddi_dma_getwin(9F),
       ddi_dma_nextcookie(9F), ddi_dma_attr(9S)

       Writing Device Drivers

SunOS 5.10			  30 Sep 1996		    ddi_dma_cookie(9S)
[top]

List of man pages available for Solaris

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net