内に含ま
その他のドキュメント
サポート リソース
|
Preface
- Writing Device Drivers describes how to develop device drivers for character-oriented devices, block-oriented devices, and Small Computer System Interface (SCSI) target devices. A common driver programming approach is taken so that drivers can be written without concern for platform-specific issues such as endianness and data ordering.
Who Should Read This Book
- The audience for this book is UNIX programmers familiar with UNIX device drivers. Several overview chapters at the beginning of the book provide background information for the detailed technical chapters that follow, but they are not intended as a general tutorial or text on device drivers.
How This Book Is Organized
- This book discusses the development of a dynamically loadable and unloadable, multithreaded reentrant device driver applicable to all architectures that conform to the Solaris 2.x DDI/DKI.
Chapter Overview
-
-
-
Chapter 2, "Hardware Overview," discusses multiplatform hardware issues related to device drivers.
-
Chapter 3, "Overview of SunOS Device Drivers," gives an outline of the kinds of device drivers and their basic structure. It points out the common data access routines and concludes with an illustrated roadmap of common driver entry points and structures.
-
Chapter 4, "Multithreading," describes the mechanisms of the SunOS multithreaded kernel that are of interest to driver writers.
-
Chapter 5, "Autoconfiguration," describes the support a driver must provide for autoconfiguration.
-
Chapter 6, "Interrupt Handlers," describes the interrupt handling mechanisms. These include registering, servicing, and removing interrupts.
-
Chapter 7, "DMA," describes direct memory access (DMA) and the DMA interfaces.
-
Chapter 8, "Drivers for Character Devices," describes the structure and functions of a driver for a character-oriented device.
-
Chapter 9, "Drivers for Block Devices," describes the structure and functions of a driver for a block-oriented device.
-
Chapter 10, "Device Context Management" describes the set of interfaces that allow device drivers to manage the context of user processes accessing a device.
-
Chapter 11, "SCSI Target Drivers," outlines the Sun Common SCSI Architecture and describes the additional requirements of SCSI target drivers.
-
Chapter 12, "SCSI Host Bus Adapter Drivers" explains how to write a SCSI Host Bus Adapter (HBA) driver using the Sun Common SCSI Architecture (SCSA).
-
Chapter 13, "Loading and Unloading Drivers," shows the steps for compiling and linking a driver, and for installing it in the system.
-
Chapter 14, "Debugging," gives coding suggestions, debugging hints, a simple adb/kadb tutorial, and some hints on testing the driver.
-
Appendix A, "Converting a 4.x Device Driver to SunOS 5.5," gives hints on converting SunOS 4.x drivers to SunOS 5.5.
-
-
Appendix B, "Interface Transition List" presents a list of DDI/DKI data access interface functions that have changed from Solaris 2.4 to Solaris 2.5. It also presents data access functions new to Solaris 2.5.
-
Appendix C, "Summary of Solaris 2.5 DDI/DKI Services," summarizes, by topic, the kernel functions device driver can use.
-
Appendix D, "Sample Driver Source Code Listings" displays a list of sample drivers, and the location of the sample code in the DDK.
-
Appendix E, "Driver Code Layout Structure" presents header files and an outline of xx.c source code samples for a typical driver.
-
Appendix F, "Advanced Topics," presents a collection of optional topics.
Related Books
- For more detailed reference information about the device driver interfaces, see sections 9, 9E (entry points), 9F (functions), and 9S (structures) of the Solaris 2.5 Reference Manual AnswerBook.
Typographic Conventions
- The following table describes the meanings of the typefaces used in this book:
- Typographic Conventions
-
| Typeface | Meaning | Example |
| constant width | C language symbol or UNIX command | ddi_add_intr() registers a device interrupt with the system. add_drv adds a driver to the system. |
| italic | Placeholder for a value that the driver must supply | inumber is the number of the interrupt to register. |
| italic | Book title, a new word or term, or an emphasized word | See chapter 9 of the STREAMS Programmer's Guide. A mutual exclusion lock is... Any device interrupts must be registered with the system.
|
|
|