Solaris Device Driver Attach Failure


Many times, we have seen failure while attaching a driver module to its corresponding device(s). The more frequent error message is "driver loaded successfully but failed to attach". We don't find any more information in the system log (/var/adm/messages or dmesg) too.


During the driver attach, the Operating System tries to know the presence of the device to which driver module is to be attached. To do this, it checks the name property of each device in the device tree and them proceeds with matching compatible property if it finds no match. If it finds no matching compatible property, then it fails the attach operation.


We can make use of -i (the alias) option of add_drv to specify device to which the driver need to be attached. For example, to attach driver module xyz to a PCIe device with vendor ID 0xABCD and device ID 0x1234, use add_drv -i '"pciexABCD,1234"' xyz. This will result in attaching driver module xyz to the device with vendor ID 0xABCD and device ID 0x1234. This can be verified by running modinfo.

Read More...
Bookmark and Share
Your Ad Here

Getting Solaris Live Core Dump

“Live core” is the crash dump of the live running Solaris system, without actually rebooting or altering the system in any way. This requires understanding of dumpadm and savecore commands. Man pages of these commands can be found online at Sun Documentation site. Find primary memory size:
-bash-3.00# prtconf | grep Memory
Memory size: 8192 Megabytes
Generate the core dump device (good to have its size same as primary memory size)
-bash-3.00# mkfile -n 8G /var/crash/myhost/livecore
-bash-3.00# ls -l /var/crash/myhost/
total 50
-rw-r--r--   1 root     root           3 Jan  2 04:33 bounds
-rw------T   1 root     root     8589934592 Jan  2 04:23 livecore
Using dumpadm (Dump administration command), set dump device as the above generated file
-bash-3.00# dumpadm -d /var/crash/myhost/livecore
Dump content: kernel pages
Dump device: /var/crash/myhost/livecore (dedicated)
Savecore directory: /var/crash/myhost
Savecore enabled: yes
Generate live core using savecore:
-bash-3.00# savecore -L
dumping to /var/crash/myhost/livecore, offset 65536, content: kernel
100% done: 564893 pages dumped, compression ratio 2.91, dump succeeded
System dump time: Fri Jan  2 04:26:41 2009
Constructing namelist /var/crash/myhost/unix.29
Constructing corefile /var/crash/myhost/vmcore.29
100% done: 564893 of 564893 pages saved
Core dump generated two files: vmcore.29 and unix.29.
-bash-3.00# ls -l /var/crash/myhost/
total 12284738
-rw-r--r--   1 root     root           3 Jan  2 04:33 bounds
-rw------T   1 root     root     8589934592 Jan  2 04:33 livecore
-rw-r--r--   1 root     root     1913028 Jan  2 04:30 unix.29
-rw-r--r--   1 root     root     4675993600 Jan  2 04:33 vmcore.29
-bash-3.00# file  /var/crash/myhost/vmcore.29
/var/crash/myhost/vmcore.29:     SunOS 5.10 Generic_127127-11 64-bit SPARC crash dump from ''
-bash-3.00# file  /var/crash/myhost/unix.29
/var/crash/myhost/unix.29:       ELF 64-bit MSB executable SPARCV9 Version 1, UltraSPARC1 Extensions Required, statically linked, not stripped, no debugging information available
Man pages online:
  • dumpadm (1M) :
    http://docs.sun.com/app/docs/doc/819-2240/dumpadm-1m?a=view
  • savecore (1M) :
    http://docs.sun.com/app/docs/doc/816-5166/savecore-1m?a=view
  • Read More...
    Bookmark and Share
    Your Ad Here