MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


Kernel Functions for Drivers               ddiregsmapsetup(9F)



NAME
     ddiregsmapsetup - set up a mapping for a register address
     space

SYNOPSIS
     #include 
     #include 



     int ddiregsmapsetup(devinfot *dip, uintt rnumber, caddrt *addrp,
          offsett offset, offsett len, ddideviceaccattrt *accattrp,
          ddiacchandlet *handlep);


INTERFACE LEVEL
     Solaris DI specific (Solaris DI).

PARAMETERS
     dip         Pointer to the device's devinfo structure.


     rnumber     Index number to the register address space set.


     addrp       A platform-dependent value that, when  added  to
                 an  offset that is less than or equal to the len
                 parameter (see below), is used for the  devaddr
                 argument   to   the  ddiget,  ddimemget,  and
                 ddiioget/put routines.


     offset      Offset into the register address space.


     len         Length to be mapped.


     accattrp    Pointer to a device access  attribute  structure
                 of this mapping (see ddideviceaccattr(9S)).


     handlep     Pointer to a data access handle.


DESCRIPTION
     ddiregsmapsetup() maps  in  the  register  set  given  by
     rnumber.  The  register number determines which register set
     is mapped if more than one exists.






SunOS 5.11          Last change: 18 Nov 2004                    1






Kernel Functions for Drivers               ddiregsmapsetup(9F)



     offset specifies the starting location within  the  register
     space  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. If both len and  offset are 0, the
     entire space is mapped. The  base  of  the  mapped  register
     space is returned in  addrp.


     The device access attributes are specified in  the  location
     pointed      by      the      accattrp     argument     (see
     ddideviceaccattr(9S) for details).


     The data access handle is returned in  handlep.  handlep  is
     opaque;  drivers  should not attempt to interpret its value.
     The handle is used by the system to encode  information  for
     subsequent  data  access  function  calls to maintain a con-
     sistent view between the host and the device.

RETURN VALUES
     ddiregsmapsetup() returns:

     DISUCES              Successfully set up the mapping for
                              data access.


     DIFAILURE              Invalid  register  number  rnumber,
                              offset offset, or length len.


     DIMERNUMBERANGE     Invalid register number rnumber  or
                              unable to find reg property.


     DIREGSACONFLICT    Cannot enable the register  mapping
                              due  to access conflicts with other
                              enabled mappings.



     Note that the return value DIMERNUMBERANGE is not  sup-
     ported  on  all  platforms. Also, there is potential overlap
     between DIMERNUMBERANGE and DIFAILURE. Drivers should
     check  for !=DISUCES rather than checking for a specific
     failure value.

CONTEXT
     ddiregsmapsetup() must be called from user or kernel con-
     text.

ATRIBUTES




SunOS 5.11          Last change: 18 Nov 2004                    2






Kernel Functions for Drivers               ddiregsmapsetup(9F)



     See attributes(5) for descriptions of the  following  attri-
     butes:



     
           ATRIBUTE TYPE               ATRIBUTE VALUE       
    
     Architecture                 PCI Local Bus, SBus, ISA    
    


SEE ALSO
     attributes(5),                        ddiregsmapfree(9F),
     ddideviceaccattr(9S)


     Writing Device Drivers





































SunOS 5.11          Last change: 18 Nov 2004                    3



OpenSolaris man pages main menu

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