MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


Kernel Functions for Drivers                     ddimapregs(9F)



NAME
     ddimapregs, ddiunmapregs - map or unmap registers

SYNOPSIS
     #include 
     #include 
     #include 



     int ddimapregs(devinfot *dip, uintt rnumber, caddrt *kaddrp,
          offt offset, offt len);


     void ddiunmapregs(devinfot *dip, uintt rnumber, caddrt *kaddrp,
          offt offset, offt len);


INTERFACE LEVEL
     These interfaces are  obsolete.  Use  ddiregsmapsetup(9F)
     instead of ddimapregs(). Use ddiregsmapfree(9F) instead
     of ddiunmapregs().

PARAMETERS
  ddimapregs()
     dip        Pointer to the device's devinfo structure.


     rnumber    Register set number.


     kaddrp     Pointer to the base kernel address of the  mapped
                region (set on return).


     offset     Offset into register space.


     len        Length to be mapped.


  ddiunmapregs()
     dip        Pointer to the device's devinfo structure.


     rnumber    Register set number.


     kaddrp     Pointer to the base kernel address of the  region
                to be unmapped.





SunOS 5.11          Last change: 16 Jan 2006                    1






Kernel Functions for Drivers                     ddimapregs(9F)



     offset     Offset into register space.


     len        Length to be unmapped.


DESCRIPTION
     The ddimapregs() function maps in the register  set  given
     by  rnumber.  The  register number determines which register
     set will be mapped if more than one exists. The base  kernel
     virtual  address  of  the mapped register set is returned in
     kaddrp. offset specifies an offset into the  register  space
     to  start  from and len indicates the size of the area to be
     mapped. If len is non-zero, it overrides the length given in
     the  register set description. See the discussion of the reg
     property in sbus(4) and for more information on register set
     descriptions.  If  len and offset are 0, the entire space is
     mapped.


     The ddiunmapregs() function  undoes  mappings  set  up  by
     ddimapregs().  This  is  provided for drivers preparing to
     detach themselves from the system, allowing them to  release
     allocated  mappings.  Mappings  must be released in the same
     way they  were  mapped  (a  call  to  ddiunmapregs()  must
     correspond  to a previous call to ddimapregs()). Releasing
     portions of previous mappings is not allowed. rnumber deter-
     mines  which  register set will be unmapped if more than one
     exists. The kaddrp, offset and len specify the  area  to  be
     unmapped.  kaddrp  is a pointer to the address returned from
     ddimapregs();   offset   and   len   should   match   what
     ddimapregs() was called with.

RETURN VALUES
     The ddimapregs() function returns:

     DISUCES    on success.


CONTEXT
     These functions can be called from user, interrupt, or  ker-
     nel context.

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









SunOS 5.11          Last change: 16 Jan 2006                    2






Kernel Functions for Drivers                     ddimapregs(9F)



     
           ATRIBUTE TYPE               ATRIBUTE VALUE       
    
     Interface Stability          Obsolete                    
    


SEE ALSO
     attributes(5),        sbus(4),        ddiregsmapfree(9F),
     ddiregsmapsetup(9F)


     Writing Device Drivers










































SunOS 5.11          Last change: 16 Jan 2006                    3



OpenSolaris man pages main menu

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