Maximizing Driver Quality in Windows XP Embedded
Part 1: Using the Verifier Tool
by Nick Nehrhood A question arose a few weeks back about how third parties can ensure that the drivers included in their Windows XP Embedded (XPe) runtime installation are of the highest quality. Considering that more than likely the people who are building a device are not the device driver developers or testers, it's an interesting topic to answer. There is, fortunately, a tool that Microsoft releases as a part of both the operating system and the Windows Driver Kit called Driver Verifier (I'll call this just "Verifier" from here on).
Verifier runs on the live installation of Windows on which the driver that you want to verify is installed. Verifier doesn't require the driver source code to perform its analysis.
Verifier.exe includes a GUI and command line utility to configure driver verification. Options are set in the registry at key
HKLM\System\CurrentControlSet\Control\Session Manager\Memory Management in the values
VerifyDriverLevel and
VerifyDrivers. When Windows boots, the kernel's memory manager reads these options and applies the correct monitoring for the selected drivers.
The value
VerifyDriverLevel contains a bitmask representing the verification types that were enabled and
VerifyDrivers contains a space delimited list of the driver binaries to watch or an asterisk ('*') character if all drivers are chosen. Note that if you boot into Safe Mode the Verifier settings are ignored.
Unfortunately the Verifier.exe binary doesn't exist in the XPe database. You can get it by downloading the
Windows Server 2003 Windows Driver Kit or from any XP Professional installation in the path
%windir%\System32.
For all screen shots, click on the image for a larger view.
The first screenThe first screen you'll come to when launching Verifier.exe lets you choose one of the initial options. Choosing "Create standard settings" takes you to the
Drivers screen below. If you choose "Create custom settings (for code developers)" you'll be taken to the following
Settings screen.
SettingsThis screen lets you select between predefined or individual settings. Selecting predefined settings takes you to the
Drivers screen. Individual settings takes you to the following
Individual Settings screen.
Individual SettingsSelect individual settings here.
DriversAfter the settings are defined you now have to choose which drivers to verify. You have the choice of selecting all unsigned drivers, all drivers for older versions of Windows, all drivers, or finally you can select individual drivers from a list of installed drivers.
Individual DriversChoosing individual drivers brings up this screen. Otherwise you will skip this screen and go to the last screen that details what Verifier will do after the reboot.
The Summary ScreenThis screen shows what settings will be in effect when the machine is rebooted.

You may be asking yourself "Ok that's fine, but how do I get anything useful from this utility?" I find that the most useful method is to use the kernel debugger. If Verifier finds anything it displayd the information there and/or causes a bugcheck with extra information if the issue is critical enough.
The other options, which I've never personally used, are to tell Verifier to output to a log file or to monitor counters. To read more about these other options check out
this article. To read more about how to use a debugger then you can check out the
Using a Debugger article.
There are two other articles worth taking a look at that describe in far greater detail how to use Verifier. The first is a
MS Knowledge Base Article on using Verifier to troubleshoot Windows Drivers. The second is a
MSDN Article on Driver Verifier which includes all of the parameters how-to, definitions for all options, etc.
Coming later will be Part 2 of this article, which addresses the other major scenario that's related to the one above -- how to improve driver quality when you do have source code access.
Copyright (c) 2007 Microsoft Corp. All rights reserved. Reproduced by WindowsForDevices.com with permission. This article was originally published on the Windows XP Embedded team blog here.
About the author: Nick Nehrhood's fascination with computers started at age 10 when his uncle showed him an Amiga. He is known as the "hardware guru" of the XP Embedded Team where he has been since 2001. Still a "child at heart," Nick's spare time interests include gaming, software development, and being a "Wikipedia addict."
Related stories: