Windows 7 Device Driver (Dmitriy Lekomtsev's Library) by Ronald D. Reeves Ph.D

Windows 7 Device Driver (Dmitriy Lekomtsev's Library) by Ronald D. Reeves Ph.D

Author:Ronald D. Reeves Ph.D.
Language: eng
Format: epub
Publisher: Addison-Wesley Professional
Published: 2010-09-14T04:00:00+00:00


7.2 Device Enumeration and Startup

To prepare the device for operation, KMDF calls the driver’s callback routines in a fixed sequence. The sequence varies somewhat depending on the driver’s role in the device stack.

7.2.1 Startup Sequence for a Function or Filter Device Object

The following example shows the callbacks for an FDO or filter DO that is involved in bringing a device to the fully operational state, starting from the Device Inserted state at the bottom of the figure.

The spaces between the entries in the preceding example mark the steps that are involved in starting a device. The column on the left side of the figure describes the step, and the column on the right lists the event callbacks that accomplish it.

At the bottom of the figure, the device is not present on the system. When the user inserts it, KMDF begins by calling the driver’s EvtDriverDeviceAdd callback so that the driver can create a device object to represent the device. KMDF continues calling the driver’s callback routines by progressing up through the sequence until the device is operational. Remember that KMDF invokes the event callbacks in bottom-up order as shown in the figure, so EvtDeviceFilterRemoveResourceRequirements is called before EvtDeviceFilterAddResourceRequirements, and so forth.

If the device was stopped to rebalance resources or was physically present but not in the working state, not all of the steps are required as the figure shows.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.