| United States-English |
|
|
|
![]() |
Configuring HP-UX for Peripherals: HP 9000 > Appendix C Major and Minor Numbers Understanding how the Kernel Associates Drivers to Device |
|
The kernel communicates with the hardware by associating the driver name with a hardware address. The kernel identifies the drivers it needs from the /stand/system file and finds them using the files in the /usr/conf/master.d directory. All standard HP-UX interface and device drivers shipped are located in the library /usr/conf/lib/libhp-ux.a. The kernel recognizes interface and device drivers (and by extension, peripheral devices) by major and minor numbers encoded into the device special files. Each device driver in the system is assigned a major number, which the kernel uses to locate the driver routine to service an I/O request. The driver uses the minor number to locate the specific device and for information regarding how to handle data. The major number is an index for the device driver into one of two kernel tables — bdevsw, the block device switch table and cdevsw, the character device switch table. Drivers that support both block and character I/O (such as SCSI disk driver and optical autochanger) have both a block major number and a character major number. Devices that support only character-mode access have only a character major number. The core-hpux file in /usr/conf/master.d contains a Driver install table, which lists major numbers for reference only. To identify valid major numbers for devices configured on your system, you can execute the lsdev command. lsdev reads the driver headers and lists the drivers configured into the kernel with their block and character major numbers. If the driver is designed to use a dynamically assigned major number, lsdev displays the assigned major number. Major numbers are displayed in decimal form. The -1 designation in either character or block major number field of lsdev output can mean:
Minor numbers represent two kinds of information: the location of the interface to which a device is attached and driver-dependent characteristics. This information is organized by specific bit assignments. The tables later in this Appendix show the bit assignments for many HP-UX device drivers. You can also consult the device driver manpage in section 7 of the HP-UX Reference. For non-HP drivers, consult the documentation provided with the driver. |
|||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||