IRQL rule set (Storport)
Use these rules to verify that your driver makes DDI calls at the required IRQL.
A driver that does not follow the IRQL rules can cause serious problems during operation that can lead to deadlock conditions or computer crashes.
In this section
Topic | Description |
---|---|
This rule verifies that the following routines are only called at IRQL = DISPATCH_LEVEL. |
|
This rule verifies that KeReleaseSpinLock is called at IRQL = DISPATCH_LEVEL only. It must also set the IRQL to the previous IRQL level. Typically this call would be preceded by a call to KeAcquireSpinLock. |
|
This rule verifies that the StorPort callback routines return at the same IRQL level as the level at which they are called. |
|
This rule verifies that the routines TdiRegisterPnPHandlers and TdiDeregisterPnPHandlers are only called at IRQL lower than DISPATCH_LEVEL. However, if ExFreeToNPagedLookasideList is called, the rule passes. |
|
The StorPortIrql rule checks that StorPort routines are called at the correct IRQL levels. |
To select the Irql rule set
Select your driver project (.vcxProj) in Microsoft Visual Studio. From the Driver menu, click Launch Static Driver Verifier….
Click the Rules tab. Under Rule Sets, select Irql.
To select the default rule set from a Visual Studio developer command prompt window, specify Irql.sdv with the /check option. For example:
msbuild /t:sdv /p:Inputs="/check:Irql.sdv" mydriver.VcxProj /p:Configuration="Win8 Release" /p:Platform=Win32
For more information, see Using Static Driver Verifier to Find Defects in Drivers and Static Driver Verifier commands (MSBuild).