![]() |
|
When I first began making the transition from UNIX device drivers to those for Windows NT, there weren't a lot of available resources to help me along. However, things have changed over the past couple of years, and there is now plenty of information, including articles in Dr. Dobb's Journal and Microsoft Systems Journal, Paula Tomlinson's "Understanding NT" column in Windows Developer's Journal, Microsoft Developer Network, the Microsoft web site, and various other resources on the Internet. However, the place I recommend you start is with Windows NT Device Driver Development, by Peter G. Viscarola and W. Anthony Mason.
Windows NT Device Driver Development is a well-organized, easy to read, and complete introduction to NT device driver development. It could be read cover to cover as a student text. Because of its clean layout, the book is as valuable a reference as any of the resources listed above.
The book is authoritative, and the asides come from the (apparently extensive) personal experiences of the authors. They have recently been active and helpful on the mail lists described in the resources appendix. Windows NT Device Driver Development is also well edited. There are no major errors or omissions. The index is large and accurate. Index entries are purely topic and concept based. As a commitment to quality, the authors and the publisher have offered a bug bounty.
Windows NT Device Driver Development is divided into four parts:
The speculative Appendix C, "Changes in Windows NT 5.0," is an interesting exercise for Viscarola and Mason to have considered. For one thing, the sample WDM drivers supplied with the NT 5.0-beta DDK look vastly different from the 3.51 and 4.0 DDK samples. However, the authors do promise to update their web site with expanded chapters on data transfer driver code as more Windows NT 5.0 information becomes available.
There is not much source code in this book and no companion CD-ROM. Examples are short, well commented, and infrequent. In short, this is a book about what needs to be done in your driver's routines and what you need to return. It is not a "here is my code and there you go" type of book.
The examples that are there aren't tied to a particular device and do not get bogged down in protocol-specific details. Some examples are a bit abstract (there is a toaster used in some examples) but they still get the point across. Where relevant, there is some coverage of busses found on Windows NT systems (such as PCI and SCSI), but not enough to be a sole reference.
Apart from a discussion of the Windows NT architecture, system calls, algorithms, other driver code related concepts and code samples, the topics cover the entire development process. These topics include installers, the registry, reading blue screens, generating crash dumps, and using WinDbg.exe.
Although Viscarola and Mason complain about how buggy WinDbg.exe is, they fail to mention that there are other debuggers, such as WinDbg.exe to i386kd.exe or axpkd.exe (the DEC Alpha kernel debugger). As tedious and unfriendly as i386kd.exe and axpkd.exe are, they don't have a lot of problems. Any debugging method raises timing issues, and both methods require two machines and a NULL modem cable.
RISC architectures are discussed in the ways they are different from the dominant Intel architecture, such as accessing the BIOS as compared with the ARC console for querying system data, the different Hardware Abstraction Layers, different symbol paths, and other debugger details. Considering that Alpha is the only remaining Microsoft supported RISC architecture, it is surprising to discover coverage in the book of MIPS bus address translation.
In conclusion, Windows NT Device Driver Development -- together with relevant bus, protocol, and/or hardware related documents -- is a prerequisite for any developer starting a new Windows NT driver development project. It will be to device driver developers what Petzold's book is to Windows application developers.
-- Regan Russell
Introduction
Part I - Windows NT Architecture
Chapter 1 - Windows NT Operating System Overview
Chapter 2 - Achieving Hardware Independence with the HAL
Chapter 3 - Virtual Memory
Chapter 4 - The Registry
Chapter 5 - Dispatching and Scheduling
Chapter 6 - Interrupt Request Levels and DPCs
Chapter 7 - Multiprocessor Issues
Part II - The I/O Manager and Device Driver Details
Chapter 8 - I/O Architectures
Chapter 9 - The I/O Manager
Chapter 10 - How I/O Requests Are Described
Chapter 11 - The Layered Driver Model
Chapter 12 - Driver Structure
Chapter 13 - DriverEntry
Chapter 14 - Dispatch Entry Points
Chapter 15 - Interrupt Service Routines and DPCs
Chapter 16 - Programmed I/O Data Transfers
Chapter 17 - DMA Data Transfers
Chapter 18 - Building and Debugging Drivers
Chapter 19 - Creating a Finished Driver
Chapter 20 - Installing and Starting Drivers
Part III - Alternate NT Driver Architectures
Chapter 21 - File System Drivers
Chapter 22 - Video Miniport Drivers
Chapter 23 - SCSI Miniport Drivers
Chapter 24 - NDIS Miniport Drivers
Part IV - Appendixes
Appendix A - Windows NT Status Codes/Win32 Error Codes
Appendix B - Sources of Information for Driver Writers
Appendix C - Changes in NT V5.0
Index
| Readability |
|
| Originality |
|
| Organization |
|
| Accuracy |
|
| Consistency |
|
| Depth |
|
| Timeliness |
|
| Editing |
|
| Design |
|
| Overall Value |
|
Explanation of ERCB rating scale: No stars = unacceptable, 1 Star = marginal, 2 Stars = average, 3 Stars = above average, 4 Stars = exceptional.