WDM IRPs and WDF Event Callback Functions
Kernel-Mode Driver Framework (KMDF) and User-Mode Driver Framework (UMDF) support a subset of Windows IRPs. The following table lists the major WDM IRP types and the corresponding framework event callback functions. Unless otherwise specified, the callbacks apply to both KMDF and UMDF.
KMDF Callbacks for IRP_MJ_PNP
The following table lists, in order of execution, the KMDF callbacks that correspond to the minor IRP codes for IRP_MJ_PNP. The arrows indicate whether a WDM FDO handles the IRP as it travels up or down the stack.
Note In a KMDF driver, Plug and Play and power management are integrated operations and the driver does not receive the individual minor IRP_MJ_PNP or IRP_MJ_POWER requests. Instead, the framework calls a core set of callbacks at power up and a corresponding set at power down, and calls additional callbacks before and after this core set as appropriate for each individual Plug and Play request. For comprehensive diagrams that show the power-up and power-down sequences, see Porting PnP and Power Management Functionality.
KMDF Callbacks for IRP_MJ_POWER
The following table lists, in order of execution, the KMDF callbacks that correspond to the minor IRP codes for IRP_MJ_POWER. The arrows indicate whether a WDM FDO handles the IRP as it travels up or down the stack.
Note Note: In a KMDF driver, Plug and Play and power management are integrated operations and the driver does not receive the individual minor IRP_MJ_PNP or IRP_MJ_POWER requests. Instead, the framework calls a core set of callbacks at power up and a corresponding set at power down, and calls additional callbacks before and after this core set as appropriate for each individual Plug and Play request. For comprehensive diagrams that show the power-up and power-down sequences, see Porting PnP and Power Management Functionality.
IRP_MJ_POWER minor code | Framework callbacks |
---|---|
↓IRP_MN_SET_POWER for D1, D2, or D3 (power down) | EvtDeviceSelfManagedIoSuspend EvtIoStop (WdfRequestStopActionSuspend flag) EvtDeviceArmWakeFromS0 or EvtDeviceArmWakeFromSx EvtDmaEnablerSelfManagedIoStop (KMDF only) EvtDmaEnablerDisable (KMDF only) EvtDmaEnablerFlush (KMDF only) EvtDeviceD0ExitPreInterruptsDisabled EvtInterruptDisable EvtDeviceD0Exit |
↑IRP_MN_SET_POWER for D0 (power up) | EvtDeviceD0Entry EvtInterruptEnable EvtDeviceD0EntryPostInterruptsEnabled EvtDmaEnablerFill (KMDF only) EvtDmaEnablerEnable (KMDF only) EvtDmaEnablerSelfManagedIoStart (KMDF only) EvtIoResume EvtDeviceSelfManagedIoRestart |
↓IRP_MN_SET_POWER for Sx | None |
↑IRP_MN_SET_POWER for Sx | None |
IRP_MN_POWER_SEQUENCE | None |
↓IRP_MN_WAIT_WAKE | EvtDeviceEnableWakeAtBus (KMDF only) |
↑IRP_MN_WAIT_WAKE | EvtDeviceDisableWakeAtBus (KMDF only) |