Tim, that really depends on the machine. A write to MMIO space that was
backed by a BAR until the device went to D3 will generate a fatal error in
some machines. It all depends on what level of error checking the BIOS
decides to enable.
Now, with that said, the machine that tend to enable this sort of error
checking tend not to have audio. (You couldn’t hear it over the fans, even
it you wanted to.)
Oh, and you’d be guessing wrong if you thought that the audio team sync’s up
with power management at all. They assume that devices only leave the D0
state when the system is leaving S0, and that all audio playback will have
ceased by then.
Jake Oshins
Windows Kernel Team
The message offers no warranties and confers no rights.
“Tim Roberts” wrote in message news:xxxxx@ntdev…
Pavel A. wrote:
But will bad things happen when power management
processing isn’t synchronized with access from usermode:
for example, consider when a PCI device does to D3
or PCIe link down state, while usermode app keeps
banging thru a BAR mapping on it?
Well, it becomes a no-op. The writes go into empty space.
And providing sync between the app and driver will
add complexity, overhead, and even then won’t be 100% reliable.
What do you think?
The Vista Audio Engine now has about 7 years under its belt and has
proven to be extremely reliable. There may be issues with the direct
mapping concept in the general case, but I’m guessing the audio team was
sufficiently aware of the problems to build in whatever hooks were
necessary to participate in the power process.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.