ioconfig(1M) ioconfig(1M)
ioconfig - configure I/O devices
ioconfig [-d] -f starting_directory
ioconfig assigns logical controller numbers to all devices in the I/O
subsystem. It is run as a part of the /etc/bcheckrc startup script.
ioconfig walks the /hw hardware graph tree and assigns a unique and
persistent logical controller number to each physical device found.
The options are:
-d Enable debugging messages.
-f starting_directory
Specify the root of the hardware graph tree.
ioconfig attempts to match each device found as it walks the /hw hardware
graph tree with an entry in /etc/ioconfig.conf. For each device found,
if there is a match, ioconfig assigns the logical controller number
specified for the device in /etc/ioconfig.conf to the device. If there
is no match, ioconfig assigns a logical controller number. This logical
controller number is the next number that is available to devices in that
class of device. (Device classes include SCSI, tty, and the various
network devices among others.) The assigned logical controller number
and the device are added to /etc/ioconfig.conf. The format of an entry
in /etc/ioconfig.conf is:
<logical controller number> <canonical name of the physical device>
Some examples are:
1 /hw/module/2/slot/n1/node/xtalk/0/pci/2/ef
3 /hw/module/2/slot/n1/node/xtalk/0/pci/1/scsi_ctlr/0
3 /hw/module/2/slot/n1/node/xtalk/0/pci/3/tty/1
In this example a tty controller and a SCSI controller have the same
logical number. This is possible because they are in different classes.
Within each class, each physical device has a unique logical controller
number. These logical controller numbers are not unique across all
classes.
Because controller numbers, once allocated, are persistent across reboots
and physical hardware configuration changes, adding a new device or
removing an existing device does not effect the assigned controller
number of other devices. Editing or removing /etc/ioconfig.conf erases
controller numbering history and results in a reallocation of controller
numbers for all devices found.
Page 1
ioconfig(1M) ioconfig(1M)
ioconfig reads permissions from /etc/ioperms to set the ownership and
permissions for I/O devices. This is done after the devices have been
assigned their logical numbers. Comment lines begin with the character #
and the wild card characters * are allowed in the device names. The
format of an entry for a device in the permissions file is:
<device_name> <permissions> <owner_name> <group_name>
Some examples are:
/dev/console 0644 root sys
/dev/input/* 0644 root sys
Ioconfig scans /var/sysgen/ioconfig directory to check for any device
specific files. Comment lines in these files start with a pound
character. Format of an entry of these files is:
<class> <type> <state> <generic> <suffix> <pattern> <start_num> <ioctl_num>
Some examples are:
#1. Entry for tty device
#
# INV_SERIAL INV_IOC3_DMA IGNORE "d" "tty" 2 SIOC_MKHWG
# ('z' << 8 | 15)
4 16 -1 d tty 2 0x7a05
#2. Entry for mouse device
#
# INV_MISC INV_MISC_PCKM MS IGNORE IGNORE 2 IGNORE
#
14 1 0 -1 -1 2 -1
<type> can be -1 if the <class> itself is enough to uniquely
identify the device
<state> can be -1 if <class> & <type> uniquely identify the device
<suffix> can be -1 in which case ioconfig ignores it
<pattern> can be -1 in which case ioconfig takes the basename of the
canonical name of the device that it is looking at
<ioctl> can be -1 in which case ioconfig doesnot make the devicedriver
specific ioctl
For a particular device the more generic entries should appear first in
the corresponding device file.
Eg:- For a network device consider the entries
<class> <type> <state>
<e1> INV_NETWORK IGNORE IGNORE .......
Page 2
ioconfig(1M) ioconfig(1M)
<e2> INV_NETWORK INV_ETHER_EF IGNORE .......
Since <e2> is more specific than <e1> in the sense that <type> is also
specified <e1> MUST appear before <e2> for <e2> to have any effect.
Persistent ctlr num (#1) different from hwgraph ctlr num (#2) for <hwg_name>
The recommended action in this case is to REMOVE the
line corresponding to <hwg_name> from
etc/ioconfig.conf file. /etc/ioconfig.conf maps logical controller numbers to canonical device
names
/etc/ioperms specifies permissions, owner, and group for devices
/var/sysgen/ioconfig each device file in this directory specifies the
ioconfig policy for that device
hwgraph(4), basename(1).
If a disk is not properly initialized at the time of running ioconfig,
only /dev/rdsk/dks*{vol,vh} device special files are created for that
disk. This is because ioconfig fails when it opens the volume and finds
that the volume header is not valid. If this disk is repartitioned using
fx, all the proper partition device special files and aliases in /dev/dsk
and /dev/rdsk are created for that disk.
PPPPaaaaggggeeee 3333 [ Back ]
|