This book discusses topics associated with writing device drivers that operate on the Extended Industry Standard Architecture (EISA) bus and the Industry Standard Architecture (ISA) bus.
This book is intended for systems engineers who:
This book assumes that you have a strong background in operating systems based on the UNIX operating system. It also assumes that you have a strong background in systems and C programming, and that you are familiar with topics presented in Writing Device Drivers: Tutorial. In addition, the book assumes that you have no source code licenses.
In this version of Digital UNIX, there are several new features that change the way you implement device drivers. The following list summarizes the issues you need to consider when deciding whether to update device drivers written on previous versions of Digital UNIX to the current version of the Digital UNIX operating system. Although existing device drivers are binary compatible with the current version of Digital UNIX, you might want to make these changes to take advantage of the single binary module technology:
For more information on these and other changes to device drivers, see Writing Device Drivers: Tutorial.
Chapter 8 of this book has been revised to describe the use of the sysconfigtab file for defining EISA and ISA bus options. This method for defining bus options replaces the use of the eisa_option_data.c and isa_option_data.c files.
Chapter 9 has been added to this manual. It describes how to write a configuration file for configuring an EISA or ISA bus with the EISA Configuration Utility (ECU).
A new Appendix B has been added to this manual. It describes the configuration file format recognized by the ECU.
The book is for users of the Digital UNIX operating system on computer systems developed by Digital Equipment Corporation. The book builds on the concepts and topics presented in Writing Device Drivers: Tutorial, the core book for developing device drivers on Digital UNIX. This book introduces driver writers to topics specific to EISA/ISA buses and that are beyond the scope of the core tutorial. The book presents an example driver that operates on the EISA bus.
The book does not emphasize a specific type of device driver. However, mastering the concepts and examples presented in this book can prepare you for writing a variety of device drivers that operate on the EISA bus.
The book contains the following chapters and appendixes.
Chapter 1 | Review of Device Driver Concepts |
Reviews general device driver concepts, which are discussed in detail in Writing Device Drivers: Tutorial. | |
Chapter 2 | EISA/ISA Bus Architectures |
Discusses aspects of the EISA/ISA bus hardware and software architectures with which you must be familiar. | |
Chapter 3 | Structure of EISA/ISA Bus Device Drivers |
Describes the sections that make up EISA/ISA bus device drivers. | |
Chapter 4 | Data Structures for EISA/ISA Bus Device Drivers |
Discusses the data structures developed for use with EISA/ISA bus device drivers. | |
Chapter 5 | The get_config Kernal Interface |
Discusses the kernel interfaces that EISA/ISA bus device drivers use. | |
Chapter 6 | Device Autoconfiguration on EISA/ISA Buses |
Discusses the sequence of events that occurs during the autoconfiguration of devices that operate on EISA/ISA buses. | |
Chapter 7 | EISA Bus Device Driver Example |
Describes the /dev/envram device driver, which operates on the EISA bus. | |
Chapter 8 | EISA/ISA Bus Device Driver Configuration |
Describes the sysconfigtab entries that the driver needs to create so that it can be statically or dynamically configured. | |
Chapter 9 | Writing an EISA Configuration File |
Describes how to write a configuration file, including examples of EISA and ISA configuration files. | |
Appendix A | EISA/ISA Bus-Specific Reference Information |
Describes, in reference-page style, the header file, data structures, kernel support interfaces, and device driver interfaces that are specific to EISA/ISA buses. | |
Appendix B | Configuration File Format |
Describes the format of a configuration file to define a hardware configuration for the EISA Configuration Utility (ECU). | |
Appendix C | EISA Bus Device Driver Source Listing |
Contains the source code listing for the /dev/envram example driver. | |
Appendix D | Summary Tables |
Presents tables that summarize the header files, kernel interfaces, data structures, and other interfaces that device drivers use. | |
Glossary | Defines terms related to EISA/ISA buses. |
The printed version of the Digital UNIX documentation set is color coded to help specific audiences quickly find the books that meet their needs. (You can order the printed documentation from Digital.) This color coding is reinforced with the use of an icon on the spines of books. The following list describes this convention:
Audience | Icon | Color Code |
General users | G | Blue |
System and network administrators | S | Red |
Programmers | P | Purple |
Device driver writers | D | Orange |
Reference page users | R | Green |
Some books in the documentation set help meet the needs of several audiences. For example, the information in some system books is also used by programmers. Keep this in mind when searching for information on specific topics.
The Documentation Overview, Glossary, and Master Index provides information on all of the books in the Digital UNIX documentation set.
Writing device drivers is a complex task; driver writers require knowledge in a variety of areas. One way to acquire this knowledge is to have at least the following categories of documentation available:
The following sections list the documentation associated with each of these categories. EISA bus device driver writers should also be familiar with the Extended Industry Standard Architecture Revision 3.10 specification. ISA bus device driver writers might also find this specification useful. This specification defines a high-performance, open-architecture bus available to personal computer (PC) manufacturers, expansion board vendors, software developers, and semiconductor suppliers.
You should have available the hardware manual associated with the device for which you are writing the device driver. Also, you should have access to the manual that describes the architecture associated with the CPU that the driver operates on, for example, the Alpha Architecture Reference Manual.
The following documents contain information that pertains to writing any device driver:
This manual provides information for systems engineers who write device drivers for hardware that runs the Digital UNIX operating system. Systems engineers can find information on driver concepts, device driver interfaces, kernel interfaces used by device drivers, kernel data structures, configuration of device drivers, and header files related to device drivers.
This manual contains descriptions of the header files, kernel support interfaces, ioctl commands, global variables, data structures, device driver interfaces, and bus configuration interfaces associated with device drivers. The descriptions are formatted similarly to the Digital UNIX reference pages.
This manual provides information on topics that are beyond the scope of the core tutorial. Systems engineers can find information on such advanced topics as kernel threads and writing device drivers in a symmetric multiprocessing (SMP) environment. The manual also contains information about writing disk drivers.
The following books provide information about writing device drivers for a specific bus:
This manual provides information for systems engineers who write device drivers for the PCI bus. The manual describes PCI bus-specific topics, including PCI bus architecture and data structures that PCI bus device drivers use.
This manual provides information for systems engineers who write device drivers for the SCSI/CAM Architecture interfaces.
The manual provides an overview of the Digital UNIX SCSI/CAM Architecture and describes User Agent routines, data structures, common and generic routines and macros, error handling and debugging routines.
The manual includes information on configuration and installation. Examples show how programmers can define SCSI/CAM device drivers and write to the SCSI/CAM special I/O interface supplied by Digital to process special SCSI I/O commands.
This manual contains information systems engineers need to write device drivers that operate on the TURBOchannel bus. The manual describes TURBOchannel-specific topics, including TURBOchannel kernel interfaces that TURBOchannel device drivers use.
This manual contains information systems engineers need to write device drivers that operate on the VMEbus. The manual describes VMEbus-specific topics, including VMEbus architecture and kernel interfaces that VMEbus device drivers use. A VMEbus device driver example illustrates the use of these kernel interfaces.
Refer to the Technical Overview for a technical introduction to the Digital UNIX operating system. This manual provides a technical overview of the Digital UNIX system, focusing on the networking subsystem, the file system, virtual memory, and the development environment. In addition, the manual lists all system limits.
This manual does not supersede the Software Product Description (SPD), which is the definitive description of the Digital UNIX system.
To create your device drivers, you use a number of programming development tools and should have on hand the manuals that describe how to use these tools. The following manuals provide information related to programming tools used in the Digital UNIX operating system environment:
This manual provides information about debugging kernels. The manual describes using the dbx, kdbx, and kdebug debuggers to find problems in kernel code. It also describes how to write a kdbx utility extension and how to create and analyze a crash dump file.
This manual is for system administrators responsible for modifying, rebuilding, and debugging the kernel configuration. It is also for system programmers who need to debug their kernel space programs.
This manual describes several commands and utilities in the Digital UNIX system, including facilities for text manipulation, macro and program generation, and source file management.
The commands and utilities described in this manual are primarily for programmers, but some of them (such as grep, awk, sed, and the Source Code Control System (SCCS)) are useful for other users. This manual assumes that you are a moderately experienced user of UNIX systems.
This manual describes the programming environment of the Digital UNIX operating system, with an emphasis on the C programming language.
This manual is for all programmers who use the Digital UNIX operating system to create or maintain programs in any supported language.
Refer to the System Administration manual for information about building a kernel and for general information on system administration. This manual describes how to configure, use, and maintain the Digital UNIX operating system. It includes information on general day-to-day activities and tasks, changing your system configuration, and locating and eliminating sources of trouble.
This manual is for the system administrators responsible for managing the operating system. It assumes a knowledge of operating system concepts, commands, and configurations.
Refer to the Digital UNIX Migration Guide for information on migrating to Digital UNIX. This manual compares the Digital UNIX operating system to the ULTRIX operating system by describing the differences between the two systems.
This manual has three audiences, as follows:
This manual assumes you are familiar with the ULTRIX operating system.
The following reference pages are of interest to device driver writers:
This section defines system calls (entries into the Digital UNIX kernel) that programmers use. The introduction to Section 2, intro(2), lists error numbers with brief descriptions of their meanings. The introduction also defines many of the terms used in this section. This section is for programmers.
This section describes the routines available in Digital UNIX programming libraries, including the C library, Motif library, and X library. This section is for programmers. In printed format, this section is divided into six volumes.
Section 5 contains miscellaneous information, including ASCII character codes, mail-addressing formats, text-formatting macros, and a description of the root file system. This section is for programmers and system administrators.
Section 7 describes special files, related device driver functions, databases, and network support. This section is for programmers and system administrators.
This section describes commands for system operation and maintenance. It is for system administrators. In printed format, this section is divided into two volumes.
Digital welcomes any comments and suggestions you have on this and other Digital UNIX manuals.
You can send your comments in the following ways:
A Reader's Comment form is located on your system in the following location:
/usr/doc/readers_comment.txt
Digital Equipment Corporation
UEG Publications Manager
ZK03-3/Y32
110 Spit Brook Road
Nashua, NH 03062-9987
A Reader's Comment form is located in the back of each printed manual. The form is postage paid if you mail it in the United States.
Please include the following information along with your comments:
The Digital UNIX Publications group cannot respond to system problems or technical support inquiries. Please address technical questions to your local system vendor or to the appropriate Digital technical support office. Information provided with the software media explains how to send problem reports to Digital.
This book uses the following conventions:
. . . |
A vertical ellipsis indicates that a portion of an example that would normally be present is not shown. |
filename | In examples and function definitions, this typeface indicates variable values. |
get_config | In examples and function definitions, this typeface indicates names that you must type exactly as shown. |
BOARD | In syntax definitions, this typeface indicates keywords that you must type exactly as shown. |
identifier | In syntax definitions, this typeface indicates variables. |
[ ] |
In formal parameter declarations,
brackets indicate arrays.
Brackets can also specify ranges, as for device minor numbers and device special files in file fragments. In syntax definitions, brackets indicate items that are optional. |
. . . | In syntax definitions, a horizontal ellipsis indicates that the preceding item can be repeated one or more times. |
{ | } | In syntax definitions, vertical bars separating items that appear between braces indicate that you choose one item from among those listed. |
This book uses the word kernel ``interface'' instead of kernel ``routine'' or kernel ``macro'' because, from the driver writer's point of view, it does not matter whether the interface is a routine or a macro.