Static Driver Verifier (SDV) Facts

Updated: May 18, 2005
On This Page
What Is SDV?What Is SDV?
Why Use SDV?Why Use SDV?
Key FeaturesKey Features
SDV RulesSDV Rules
System RequirementsSystem Requirements
SDV Quick StartSDV Quick Start
Frequently Asked QuestionsFrequently Asked Questions
For More InformationFor More Information

What Is SDV?

A rule-based, compile-time static analysis tool for device drivers that run on Windows operating systems

Explores all code paths in a driver and symbolically executes source code, looking for errors in the use of Windows DDIs

Why Use SDV?

Symbolically tests the driver in a hostile environment, assuming that any system routine might fail or might return any possible valid value

Defines 65 precise rules for the use of Windows DDIs and reports driver violations of these rules

Provides full code coverage with respect to 65 rules, but does not require any test cases

Key Features

Runs on Windows 2000 and later systems and supports all x86-based build environments

Works with WDM drivers, file system filter drivers, and Windows NT 4.0 drivers that are written in C

Graphic user interface in Defect Viewer enables developers to trace through code that contains defects

SDV Rules

SDV is packaged with seven sets of rules. Each rule set checks for proper driver use of a different aspect of the system. You can select one or more sets of rules or all rules each time you run SDV.

The rule sets are:

IRP—Functions that use input/output request packets

IRQL—Functions that use interrupt request levels

PnP—Plug and Play functions

PM—Power management functions

WMI—Functions that use Windows Management Instrumentation

Sync—Functions that use spin locks, semaphores, timers, mutexes, and other methods of synchronization

Other—Functions that are not fully described by any of the other categories

System Requirements

SDV requires the following software installed on the test machine:

Microsoft .NET Framework version 1.1

Microsoft Windows Server 2003 Driver Development Kit (version 3790 or later) or the Windows Driver Kit

Build utility, included in the Windows DDK and WDK

Hardware requirements depend on the size and complexity of the drivers being verified. These requirements are typically adequate for verifying a small driver:

512 MB of physical memory (RAM)

1 GHz processor

Approximately 15 MB disk space for installation

Free disk space equivalent to approximately 10 times the size of the driver (the folder containing the sources and makefile files)

Verifying a large driver with dependent libraries might require additional RAM and disk space.

SDV Quick Start

1.

Open a WDK build environment window.

2.

Navigate to the directory that contains the sources and makefile files for your driver.

-OR-

Navigate to the directory that contains the failure-prone sample drivers for Static Driver Verifier, fail_driver1 and fail_driver2.

3.

To run SDV with all rules, type:
staticdv /rule:*

4.

To see the results after Static Driver Verifier completes its verification, type:
staticdv /view
This command displays the Static Driver Verifier Report.

5.

If a Defects node appears in the Static Driver Verifier Report, double-click any defect under the Defects node.

To see the Static Driver Verifier help file, type:
staticdv /help

Frequently Asked Questions

How do I use SDV?
SDV is a command-line tool used in a Build environment window. It is designed to be run near the end of the development cycle on drivers that build successfully and are ready for testing.

Which driver models does SDV support?
SDV currently supports WDM drivers only.

When will SDV support WDF drivers?
WDF support is currently under development.

Does SDV verify libraries, too?
SDV can verify all of a driver's source code, including library source code the driver depends on. Each time you run SDV, you can choose whether to verify only the driver source code or to verify the dependent library code as well.

Can I write my own rules?
SDV comes with a predefined set of rules. Writing your own rules is not currently supported.

How do I learn to use SDV?
Start by using it on the fail_driver1 and fail_driver2 samples installed with SDV.

Which rules should I run?
In an actual verification, you might want to run all the rules (staticdv /rule:*). If you're just testing SDV, or looking for the most common errors, use the config.sdv rule list file included in Static Driver Verifier. To use the rule list, type: staticdv /config:config.sdv

Where can I find out about the rules?
Use the Static Driver Verifier Rules section of the help file. To see it, type: staticdv /showrules

How long does it take SDV to run?
The running time varies with the size of the driver code and the number and complexity of the rules. A run time of 10-30 minutes is typical for a small driver. For a larger driver, verifying many complex rules can take several hours.

Where can I get SDV?
SDV is distributed as part of the Windows Driver Kit (WDK).

For More Information

For more information about SDV:

Send email to: sdvfdbk@microsoft.com

Check out SDV on the WHDC web site at: www.microsoft.com/whdc/devtools/tools/sdv.mspx

For more information about WDF:

Check out WDF on the WHDC web site at: www.microsoft.com/whdc/driver/wdf/default.mspx

Read the following white papers on the WHDC web site:

"Architecture of the Windows Driver Foundation"

"Introduction to the WDF User-Mode Driver Model"

"Introduction to Plug and Play and Power Management in the Windows Driver Foundation"


Looking for help with your personal computer?