MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


Kernel Properties for Drivers                            size(9P)



NAME
     size, Nblock, blksize, device-nblocks, device-blksize - dev-
     ice size properties

DESCRIPTION
     A driver can communicate size information to the  system  by
     the values associated with following properties. Size infor-
     mation falls into two  categories:  device  size  associated
     with  a devinfot node, and minor node size associated with
     a ddicreateminornode(9F) devt (partition).


     device size property names:

     device-nblocks    An int64t  property  representing  device
                       size in device-blksizeblocks.


     device-blksize    An integer property representing the  size
                       in bytes of a block. If defined, the value
                       must be a power of two.  If  not  defined,
                       DEVBSIZE is implied.



     minor size property names:

     Size       An int64t  property  representing  the  size  in
                bytes   of  a  character  minor  device  (SIFCHR
                spectype in ddicreateminornode).


     Nblocks    An  int64t  property  representing  the   number
                blocks, in device-blksize units, of a block minor
                device        (SIFBLK        spectype        in
                ddicreateminornode).


     blksize    An integer  property  representing  the  size  in
                bytes of a block. If defined, the value must be a
                power  of  two.  If  not  defined,  DEVBSIZE  is
                implied.



     A driver that implements both block and character minor dev-
     ice  nodes  should  support both "Size" and "Nblocks". Typi-
     cally, the following is true: Size = Nblocks * blksize.


     A driver where all  ddicreateminornode(9F)  calls  for  a
     given  instance  are associated with the same physical block



SunOS 5.11          Last change: 23 Janl2008                    1






Kernel Properties for Drivers                            size(9P)



     device should implement "device-nblocks". If the device  has
     a  fixed  block  size with a value other than DEVBSIZE then
     "device-blksize" should be implemented.


     The driver is responsible for ensuring that property  values
     are  updated  when device, media, or partition sizes change.
     For each represented item, if its size is know to  be  zero,
     the  property  value should be zero. If its size is unknown,
     the property should not be defined.


     A driver may choose to implement size properties within  its
     propop(9E) implementation. This reduces system memory since
     no space is used to store the properties.


     The DI property interfaces  deal  in  signed  numbers.  All
     Size(9P)  values  should  be  considered unsigned. It is the
     responsibility of the code dealing with the  property  value
     to ensure that an unsigned interpretation occurs.

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



     
           ATRIBUTE TYPE               ATRIBUTE VALUE       
    
     Interface Stability          Committed                   
    


SEE ALSO
     attach(9E),             detach(9E),             propop(9E),
     ddicreateminornode(9F), inquiry-vendor-id(9P)


     Writing Device Drivers














SunOS 5.11          Last change: 23 Janl2008                    2



OpenSolaris man pages main menu

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