Hi,
I have noticed something weird in the WDF osrusbfx2 sample that is supplied
with the DDK. The IO functions in the example (read, write, control) are
placed in pageable code sections.
The documentation states that these functions are called at <= DISPATCH
level unless the parent has been created with the execution level attribute
set to WdfExecutionLevelPassive.
Looking in the code, the device is created with the default attributes,
which specify WdfExecutionLevelInheritFromParent, according to the
documentation.
The driver object is also created with the default object attributes, but
the KMDF documentation states that The default execution level for driver
objects is WdfExecutionLevelDispatch.
The documentation also states that DriverObjects do not have a parent.
This means there are 4 options (I think):
-
the example is wrong, because the IO functions can be called at
DISPATCH level. -
The documentation is wrong, and driver objects are created with
execution level passive, or somehow they inherit from the parent they are
not supposed to have (a framework default or something else). -
The documentation is incomplete, and should mention that
WdfExecutionLevelInheritFromParent for driver objects means the same as
WdfExecutionLevelPassive. -
I don’t get it, in which case I would appreciate it if someone can
point me to the flaw in my logic.
Any ideas?
Kind regards,
Bruno.