Книга: Writing Windows WDM Device Drivers
Testing Wdm2 Power Capabilities
Testing Wdm2 Power Capabilities
You can investigate some of Wdm2's power capabilities by inspecting the checked build DebugPrint output using the DebugPrint Monitor. Make sure that you have installed the DebugPrint driver and the checked build of the Wdm2 driver.
Under W2000, the idle detection process can be seen working. After 60 seconds on my AC powered desktop system, the Power Manager sends a Set device Power IRP to power down the device to D3. If you then run the Wdm2Test Win32 application, the first read or write powers the Wdm2 device back up to D0.
On the same computer running Windows 98, no idle Set device Power IRPs were seen. This must be another manifestation of the bug described earlier. I changed the code so that Wdm2 started in a powered off state. When Wdm2Test was run, the Set device Power IRP (to power the device up) completed successfully, but the driver was not sent the Power IRP. This is why SendDeviceSetPower shown in Listing 10.5 checks that the device has really changed power state, and forces the change if necessary.
I cannot explain why Set Power IRPs are not received by the Wdm2 driver in Windows 98. Perhaps the idle detection process is working, but the Set device IRP is simply not seen by the driver.
If your system can sleep or hibernate then use the Wdm2Power application to test these features.
- Testing the Project
- За пределами PowerPoint
- Глава 1. POWERPOINT – ЗЛО?
- Testing Samba with the testparm Command
- Creating a File System for Testing
- PowerPC-Based Linux Distributions
- 3.2.1. PowerPC
- 3.2.2. AMCC PowerPC
- 3.2.3. Freescale PowerPC
- Cross-Platform and WDM INF Files
- 1.3.15 Power-on Reset
- 1.3.16 Low-Power Operation