Windows Driver Model
|
In computing, the Windows Driver Model (WDM) — also known (somewhat misleadingly) at one point as the Win32 Driver Model — is a framework for device drivers that was introduced with Windows 98 and Windows 2000 to replace VxD, which was used on older versions of Windows such as Windows 95 and Windows 3.1. WDM drivers are layered in a complex hierarchy and communicate with each other via IO Request Packets (IRPs). The Windows Driver Model defined a unified driver model for the Windows 98 and Windows 2000 line by standardizing requirements and reducing the amount of code that needed to be written. WDM drivers will not run on operating systems earlier than Windows 98 or Windows 2000, such as Windows 95 and Windows 3.1. By conforming to WDM, drivers can be binary and source compatible across Windows 98, Windows 98 Second Edition, Windows 2000, Windows XP and Windows Server 2003 on x86-based computers. WDM is designed to be forward-compatible but not backward-compatible. That is, drivers will be compatible with the same or higher-numbered WDM versions. Such WDM drivers will not be able to take advantage of new operating system services, but they will still load and run. Newer drivers running in a lower-version environment will most likely fail while loading. For example, a WDM driver written for Windows 2000 will load and function under Windows XP, but cannot take advantage of any new WDM features that were introduced in Windows XP.ie: A WDM driver written for Windows XP will not load under Windows 2000.
WDM exists in the intermediary layer of Windows 2000 kernel-mode drivers and was introduced to increase the functionality and ease of writing drivers for Windows. The WDM was mainly designed to be binary and source compatible between Windows 98 and Windows 2000. However, this may not always be desired and so specific drivers can be developed for either operating system. WDM consists of:
- Class drivers: these can be thought of as built-in framework drivers that miniport and other class drivers can be built on top of. The class drivers provide an interfaces between different levels of the WDM architecture. Common functionality between different classes of drivers can be written into the class driver and used by other class and miniport drivers. The lower edge of the class driver will have its interface exposed to the miniport driver, while the upper edge of top level class drivers is operating system specific. Class drivers can be dynamically loaded and unloaded at will. They can do class specific functions that are not hardware or bus-specific (with the exception of bus-type class drivers) and in fact sometimes only do class specific functions like enumeration).
- Miniport drivers: these are USB, Audio, SCSI and network adapters. They should usually be source and binary compatible between Windows 98 and Windows 2000 and are hardware specific but control access to the hardware through a specific bus class driver.
- Software bus drivers: Microsoft provides bus drivers for most common buses, such as PCI, PnpISA, SCSI, USB and Firewire. Each software vendor can create their own bus drivers if needed.
- OS Services: this layer is all the operating system functionality that has been abstracted away from the miniport driver.
- Virtualisation drivers: have been part of Windows since v3.0 and are used for legacy hardware.
In the layered architecture of Windows kernel-mode drivers, class/mini port drivers are functional drivers.
References
- Finnel, Lynn (2000). MCSE Exam 70-215, Microsoft Windows 2000 Server. Microsoft Press. ISBN 1-57231-903-8.