Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
Configuring HP-UX for Peripherals: HP 9000 > Appendix C Major and Minor Numbers

Understanding how the Kernel Associates Drivers to Device

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

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.

Figure C-1 Device Special Files Contain Major and Minor Numbers

Device Special Files Contain Major and Minor Numbers

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.

Major Numbers

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:

  • The device might be a module that is not a driver.

  • No driver is configured.

  • Driver is not supported in that block or character mode.

Minor Numbers

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.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1995, Hewlett-Packard Development Company, L.P.