MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


Kernel Functions for Drivers               ddidmaaddrsetup(9F)



NAME
     ddidmaaddrsetup - easier DMA setup for use  with  virtual
     addresses

SYNOPSIS
     #include 
     #include 

     int ddidmaaddrsetup(devinfot *dip, struct as *as, caddrt addr,
          sizet len, uintt flags, int (*waitfp) (caddrt), caddrt arg,
          ddidmalimt * lim, ddidmahandlet *handlep);


INTERFACE LEVEL
     This  interface  is  obsolete.  ddidmaaddrbindhandle(9F)
     should be used instead.

PARAMETERS
     dip        A pointer to the device's devinfo structure.


     as         A pointer to an address space  structure.  Should
                be  set  to  NUL,  which  implies kernel address
                space.


     addr       Virtual address of the memory object.


     len        Length of the memory object in bytes.


     flags      Flags that would go into the  ddidmareq  struc-
                ture (see ddidmareq(9S)).


     waitfp     The address of a function to call back  later  if
                resources aren't available now. The special func-
                tion addresses DIDMASLEP and DIDMADONTWAIT
                (see  ddidmareq(9S)) are taken to mean, respec-
                tively, wait until resources are  available   or,
                do  not  wait  at all and do not schedule a call-
                back.


     arg        Argument to be passed to a callback function,  if
                such a function is specified.


     lim        A pointer to a DMA limits structure for this dev-
                ice       (see      ddidmalimsparc(9S)      or
                ddidmalimx86(9S)). If this pointer is NUL,  a



SunOS 5.11          Last change: 04 Apr 2006                    1






Kernel Functions for Drivers               ddidmaaddrsetup(9F)



                default set of DMA limits is assumed.


     handlep    Pointer to a DMA  handle.  See  ddidmasetup(9F)
                for a discussion of handle.


DESCRIPTION
     The  ddidmaaddrsetup()  function  is  an   interface   to
     ddidmasetup(9F).  It  uses  its  arguments to construct an
     appropriate     ddidmareq     structure     and      calls
     ddidmasetup(9F) with it.

RETURN VALUES
     See ddidmasetup(9F) for the  possible  return  values  for
     this function.

CONTEXT
     The ddidmaaddrsetup() can be called from user, interrupt,
     or   kernel   context,   except   when   waitfp  is  set  to
     DIDMASLEP, in which case it cannot be called from inter-
     rupt context.

ATRIBUTES
     See attributes(5) for a description of the following  attri-
     butes:



     
           ATRIBUTE TYPE               ATRIBUTE VALUE       
    
     Stability Level              Obsolete                    
    


SEE ALSO
     attributes(5),   ddidmabufsetup(9F),    ddidmafree(9F),
     ddidmahtoc(9F),    ddidmasetup(9F),    ddidmasync(9F),
     ddiiopballoc(9F),                   ddidmalimsparc(9S),
     ddidmalimx86(9S), ddidmareq(9S)


     Writing Device Drivers











SunOS 5.11          Last change: 04 Apr 2006                    2



OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™