Stateful changes to devices

I’ve seen a lot of posts here in the last month or so that amounted to
attempts to change the state of a device without the cooperation of the
device driver which owns that device. Some of the various ways included:

  • Writing to registers in memory mapped I/O space pointed to by the device’s
    Base Address Register
  • Evaluating ACPI methods underneath the device
  • Sending power or PnP IRPs to the device stack

Let me ask you all, within the driver writing community, how many times
you’ve worked on a driver where randomly changing the state of the device
would result in the driver correctly doing its job.

I’ll be some of you will be able to tell stories about drivers that you’ve
worked on that were hardened to deal with hardware, or perhaps even
software, failure. But really, how many of those would have functioned
while another driver was actively changing the device’s state?

Jake Oshins
Windows Kernel Team

This message offers no warranties and confers no rights.