xxattach() and _init() doubts

Hi I am new to Solaris Kernel development

I wanted to know when the xxattach() routine is called.... also, I create a soft-state structure (say mySoftState) and pass it to ddi_soft_state_init() routine inside the _init() routine. Now, the first argument of xxattach is dev_info_t which is a member of mySoftState structure declared by me. Is this member passed to xxattach() automatically ?

Also, in linux we have register_chrdev() routine that associates a character major

number with set of driver entry points. Does the ddi_soft_state_init() do the equivalent operation of register_chrdev() ?

-Kaushik

[635 byte] By [Kaushikgoaa] at [2007-11-27 6:30:28]
# 1
What I meant was that I pass the size of mySoftState structure as the 2nd argument to ddi_soft_state_init() routine inside the _init() routine.mySoftState would contain "dev_info_t *dip" as one of its member variables.
Kaushikgoaa at 2007-7-12 17:54:59 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...