ddi_unmap_regs(9f) 맨 페이지 - 윈디하나의 솔라나라

개요

섹션
맨 페이지 이름
검색(S)

ddi_unmap_regs(9f)

ddi_map_regs(9F)               Kernel Functions               ddi_map_regs(9F)



NAME
       ddi_map_regs, ddi_unmap_regs - map or unmap registers

SYNOPSIS
       #include <sys/conf.h>
       #include <sys/ddi.h>
       #include <sys/sunddi.h>

       int ddi_map_regs(dev_info_t *dip, uint_t rnumber, caddr_t *kaddrp,
            off_t offset, off_t len);


       void ddi_unmap_regs(dev_info_t *dip, uint_t rnumber, caddr_t *kaddrp,
            off_t offset, off_t len);

INTERFACE LEVEL
       These  interfaces  are  obsolete. Use ddi_regs_map_setup(9F) instead of
       ddi_map_regs(). Use ddi_regs_map_free(9F) instead of ddi_unmap_regs().

PARAMETERS
   ddi_map_regs()
       dip        Pointer to the device's dev_info 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.


   ddi_unmap_regs()
       dip        Pointer to the device's dev_info structure.


       rnumber    Register set number.


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


       offset     Offset into register space.


       len        Length to be unmapped.


DESCRIPTION
       The ddi_map_regs() 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 speci‐
       fies 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. If len and offset are  0,
       the entire space is mapped.


       The ddi_unmap_regs() function undoes mappings set up by ddi_map_regs().
       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  ddi_unmap_regs()
       must  correspond  to a previous call to ddi_map_regs()). Releasing por‐
       tions of previous mappings is not  allowed.  rnumber  determines  which
       register set will be unmapped if more than one exists. The kaddrp, off‐
       set and len specify the area to be unmapped. kaddrp is a pointer to the
       address  returned from ddi_map_regs(); offset and len should match what
       ddi_map_regs() was called with.

RETURN VALUES
       The ddi_map_regs() function returns:

       DDI_SUCCESS    On success


CONTEXT
       These functions can be called from user, interrupt, or kernel context.

ATTRIBUTES
       See attributes(7) for a description of the following attributes:


       tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE  TYPEAT‐
       TRIBUTE VALUE _ Interface StabilityObsolete


SEE ALSO
       attributes(7), ddi_regs_map_free(9F), ddi_regs_map_setup(9F)


       Writing Device Drivers in Oracle Solaris 11.4



Oracle Solaris 11.4               25 Jan 2017                 ddi_map_regs(9F)
맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 5 CSS3