|
|
|
|
|
|
|
|
|
Fundamentals of Windows 2000/XP Device Driver Development |
Duration: 5 days |
|
|
This hands-on course is intended for system programmers who will be writing Windows device drivers that conform to the Windows Driver Model (WDM) in Windows 2000/XP, XP, and Windows 98. |
|
- Programming experience with C is essential with C++ knowledge preferred.
- Some knowledge of device driver development on other platforms is helpful but not required.
- Labs are performed using Microsoft Visual Studio, so students should be familiar with
this development tool.
|
|
|
Description |
This 5-day course gives developers the knowledge to design, write, and debug
Windows 2000/XP device drivers. |
|
Objectives |
- Understand the kinds of device drivers supported by the Windows 2000/XP operating system
- Explain the responsibilities and structure of a Windows device driver within the Windows Driver Model (WDM)
- Understand the development and operating environment for a Windows device driver
- Explain the interaction between a driver and application requests for service
- Reference application memory address space
- Understand the Hardware Abstraction Layer (HAL) and its role in managing hardware resources (ports, interrupts, DMA)
- Explain how the Windows 2000/XP DMA abstraction works in device drivers
- Debug and deploy Windows device drivers
|
|
Course Outline |
Introduction to the Windows 2000/XP Architecture
- Design Goals
- Windows 2000/XP OS layers
- Kernel mode vs. user mode
- The I/O subsystem
- Where device drivers "fit"
Hardware Terminology
- Introduction to hardware terminology
- Device registers and addressing
- Programmed I/O
- DMA
- Device memory
- Buses
Windows 2000/XP Driver Architecture
- Context of code running in kernel mode - traps, interrupts, and kernel threads
- The Windows 2000/XP interrupt abstraction
- Deferred procedure calls
- User buffer access
- Structure of a kernel-mode driver
- The I/O processing sequence
First Driver Code
- Describe the build environment for a driver
- Describe the Windows 2000/XP services driver code can use
- Write "core driver code" to load and unload the driver using the Windows 2000/XP Control Panel
- Lab: First Driver Code
Dispatch Routines
- Describe the role of the Dispatch Routines supplied by a driver
- Show how Dispatch Routines are "announced" during DriverEntry
- Describe the differences between Buffered I/O (BIO) and Direct I/O (DIO)
- Lab: Read/Write Loopback
The WDM Model
- The role of the system registry
- Lab: Parallel Loopback
Windows Management Instrumentation (WMI)
- Overview of WMI and event logging
- The WMI Classes
- Becoming a WMI Provider
- The WMI IRP's
- The WBEM Object Browser
- Lab: Implementing WMI
- Event logging
- Lab: Using the Event Log
Programmed I/O
- Describe the sequence of events for a Programmed I/O Device operation
- Describe the use of an Interrupt Service Routine
- Describe the role of a DPC routine during an interrupt
- Examine data transfer routines
- Lab: Writing an ISR
| |
DMA Operations
- Describe the Windows 2000/XP DMA abstraction
- Describe the role of the Adapter object
- Describe the purpose and structure of a Memory Descriptor List
- Explain the differences between a Slave and Master DMA device driver
- Lab: A DMA Driver Walkthrough
Debugging Drivers
- Why drivers fail
- How to interpret the Windows 2000/XP "Blue Screen"
- WinDbg
- Crash dumps
- DUMPEXAM & DUMPCHK
- Interactive debugging with WinDbg
- Hardware compatibility tests (HCT)
- Lab: Using WinDbg
System Threads
- System threads vs. user threads
- Creating Threads, Terminating Threads
- System thread priority
- Alternatives to system threads: Work Items
- Thread synchronization
- Dispatcher objects: Events, Mutexes, etc.
- Thread objects
- Lab: System Threads
Timers
- What is an IO Timer?
- Uses: Device Timeouts
- Uses: Polling a device
- Custom timer DPC routines
- Time measurements
- Lab: IO Timers
Layered Drivers
- What is an Intermediate Driver
- Layered drivers
- Filter drivers
- Coupled drivers
- Connecting to other drivers
- Lab: Layered Driver
Filter Drivers
- What is a filter driver
- Uses of a filter driver
- The filter driver architecture
- Changes to AddDevice
- Lab: Filter Driver
Installing Device Drivers
- Auto-install using INF files
- Manual installation
- Controlling driver load sequence
- Windows File Protection
- Driver certification
- Digital Signatures
| |
|
|