MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


Data Structures for Drivers               devmapcallbackctl(9S)



NAME
     devmapcallbackctl - device mapping-control structure

SYNOPSIS
     #include 


INTERFACE LEVEL
     Solaris DI specific (Solaris DI).

DESCRIPTION
     A devmapcallbackctl structure describes a set of  callback
     routines  that  are called by  the system to notify a device
     driver to manage events on  the device mappings  created  by
     devmapsetup(9F) or ddidevmapsegmap(9F).


     Device  drivers  pass  the  initialized  devmapcallbackctl
     structure     to     either    devmapdevmemsetup(9F)    or
     devmapumemsetup(9F) in the devmap(9E) entry  point  during
     the  mapping  setup.  The system makes a private copy of the
     structure for later use. Device  drivers  can  specify  dif-
     ferent devmapcallbackctl for different mappings.


     A device driver should allocate the device  mapping  control
     structure and initialize the following fields, if the driver
     wants the entry points to be called by the system:

     devmaprev        Version    number.     Set     this     to
                       DEVMAPOPSREV.


     devmapmap        Set to the address of  the  devmapmap(9E)
                       entry point or to  NUL if the driver does
                       not support this  callback.  If  set,  the
                       system   calls  the  devmapmap(9E)  entry
                       point during the mmap(2) system call.  The
                       drivers  typically allocate driver private
                       data structure in this function and return
                       the  pointer to the private data structure
                       to the system for later use.


     devmapaccess     Set    to    the    address     of     the
                       devmapaccess(9E)  entry point or to  NUL
                       if the driver does not support this  call-
                       back.   If   set,  the  system  calls  the
                       driver's  devmapaccess(9E)  entry   point
                       during  memory access.  The system expects
                       devmapaccess(9E)    to    call     either
                       devmapdoctxmgt(9F)                    or



SunOS 5.11          Last change: 24 Jul 1996                    1






Data Structures for Drivers               devmapcallbackctl(9S)



                       devmapdefaultaccess(9F)  to   load   the
                       memory   address  translations  before  it
                       returns to the system.


     devmapdup        Set to the address of  the  devmapdup(9E)
                       entry point or to  NUL if the driver does
                       not support this call. If set, the  system
                       calls  the devmapdup(9E) entry point dur-
                       ing the fork(2) system call.


     devmapunmap      Set to the address of the devmapunmap(9E)
                       entry point or to  NUL if the driver does
                       not support this call. If set, the  system
                       will call the devmapunmap(9E) entry point
                       during the  munmap(2)  or  exit(2)  system
                       calls.


STRUCTURE MEMBERS
       int  devmaprev;
       int  (*devmapmap)(devmapcookiet dhp, devt dev,
            uintt flags,offsett off, sizet len, void **pvtp);
       int  (*devmapaccess)(devmapcookiet dhp, void *pvtp,
            offsett off, sizet len, uintt type, uintt rw);
       int  (*devmapdup)(devmapcookiet dhp, void *pvtp,
                    devmapcookiet newdhp, void **newpvtp);
       void (*devmapunmap)(devmapcookiet dhp, void *pvtp,
            offsett off, sizet len, devmapcookiet newdhp1,
            void **newpvtp1, devmapcookiet newdhp2, void **newpvtp2);


SEE ALSO
     exit(2),   fork(2),    mmap(2),    munmap(2),    devmap(9E),
     devmapaccess(9E),      devmapdup(9E),      devmapmap(9E),
     devmapunmap(9E),                     ddidevmapsegmap(9F),
     devmapdefaultaccess(9F),          devmapdevmemsetup(9F),
     devmapdoctxmgt(9F),                      devmapsetup(9F),
     devmapumemsetup(9F)


     Writing Device Drivers












SunOS 5.11          Last change: 24 Jul 1996                    2



OpenSolaris man pages main menu

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