Checking hardware and device drivers under OpenSolaris-0906.

This is my memorandum about checking hardware and device drivers under OpenSolaris-0906.

1. What devices are available?

Using prtconf , the result is shown like this,

foo@opensolaris:~$prtconf
system Configuration: Sun Microsystems i86pc
Memory size: 1024 Megabytes
System Peripherals (Software Nodes):

i86pc
scsi_vhci, instance #0
isa, instance #0
i8042, instance #0
keyboard, instance #0
mouse, instance #0
fdc, instance #0
asy, instance #0
pit_beep, instance #0
pci, instance #0
pci1af4,1100 (driver not attached)
pci1af4,1100 (driver not attached)
pci-ide, instance #0
ide, instance #0
cmdk, instance #0
ide, instance #1
sd, instance #0
pci1af4,1100 (driver not attached)
pci1af4,1100 (driver not attached)
display, instance #0
pci1af4,5 (driver not attached)
pci1af4,1100, instance #0
pci8086,0 (driver not attached)
pseudo, instance #0
xsvc, instance #0
options, instance #0
agpgart, instance #0 (driver not attached)
used-resources (driver not attached)
cpus, instance #0
cpu (driver not attached)

The some tips of reading result of 'prtconf' are shown below,

(1) The first word in each line is the name of device. man may be shown the discription about device. (ex. man fdc, man asy,etc...)

(2) The sentence '(driver not attached)' means 'the apropriate driver is not loaded yet.'

(3) The words 'pcixxx,xxxx'(x is hexdecimal or digits) is identifier to load device driver by manually.

2. What hardware are attached in PCI bus?

The 'scanpci' is convenient. The result like this,

foo@opensolaris:~$ pfexec scanpci
pci bus 0x0000 cardnum 0x00 function 0x00: vendor 0x8086 device 0x1237
Intel Corporation 440FX - 82441FX PMC [Natoma]

pci bus 0x0000 cardnum 0x01 function 0x00: vendor 0x8086 device 0x7000
Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II]

pci bus 0x0000 cardnum 0x01 function 0x01: vendor 0x8086 device 0x7010
Intel Corporation 82371SB PIIX3 IDE [Natoma/Triton II]

pci bus 0x0000 cardnum 0x01 function 0x02: vendor 0x8086 device 0x7020
Intel Corporation 82371SB PIIX3 USB [Natoma/Triton II]

pci bus 0x0000 cardnum 0x01 function 0x03: vendor 0x8086 device 0x7113
Intel Corporation 82371AB/EB/MB PIIX4 ACPI

pci bus 0x0000 cardnum 0x02 function 0x00: vendor 0x1013 device 0x00b8
Cirrus Logic GD 5446

pci bus 0x0000 cardnum 0x03 function 0x00: vendor 0x1af4 device 0x1002
Qumranet, Inc. Device unknown

pci bus 0x0000 cardnum 0x04 function 0x00: vendor 0x10ec device 0x8139
Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+

pci bus 0x0000 cardnum 0x05 function 0x00: vendor 0x8086 device 0x2415
Intel Corporation 82801AA AC'97 Audio Controller

3. What device drivers are loaded in my OpenSolaris box?

The 'modinfo' is convenient. The result are like this,

foo@opensolaris:~$ modinfo
Id Loadaddr Size Info Rev Module Name
0 fe800000 120b7e - 0 unix ()
1 fe8d5488 2087e0 - 0 genunix ()
3 feaa2000 4968 1 1 specfs (filesystem for specfs)
4 feaa6908 3348 3 1 fifofs (filesystem for fifo)
5 f94af000 18598 155 1 dtrace (Dynamic Tracing)
6 feaa9be8 4468 16 1 devfs (devices filesystem)
7 feaadee0 daa0 17 1 dev (/dev filesystem)
8 feabb5e8 439c - 1 dls (Data-Link Services)
9 feabf7bc 1af1c - 1 mac (MAC Services v1.20)
11 feada1a0 3134 1 1 TS (time sharing sched class)
12 feadcd84 8bc - 1 TS_DPTBL (Time sharing dispatch table)
13 feadce40 8aa8 - 1 pci_autoconfig (PCI BIOS interface)
...snip...

4. What packages include xxx device driver?

To search package included device driver you want, the 'pkg serch ' is convenient.
Example:

foo@opensoalris:~$ pkg search asy
INDEX ACTION VALUE PACKAGE
driver_name driver asy pkg:/SUNWpsdcr@0.5.11-0.91
driver_name driver asy pkg:/SUNWpsdcr@0.5.11-0.86
driver_name driver asy pkg:/SUNWpsdcr@0.5.11-0.98
driver_name driver asy pkg:/SUNWpsdcr@0.5.11-0.75
...snip...

That result shows that asy driver is included in pkg:/SUNWpsdcr.

5. The list of available driver in OpenSolaris box.

To get the list of all driver installed in OpenSolaris box,the 'sysdef' command is convenient.
Note: sysdef generates long list.
Example:

sysdef | less

The lists below the line of '* Loadable Objects' are shown all device drivers already installed.

Appendix:
Good article about OpenSolaris device driver for newbie is,
http://www.sun.com/bigadmin/features/articles/write_dev_driver.jsp