On 10/28/07, Stefan Reinauer stepan@coresystems.de wrote:
- ron minnich rminnich@gmail.com [071027 19:15]:
one thing though. We can NEVER put a patch in that sets bus master. Any BIOS that does this is broken, and any OS that requires it is broken.
Which standard says this?
none. But this is a frequent discussion on this list over the years. It's very dangerous to enable bus mastering on a device and enable it as well. You are inviting the device to do I/O to your memory at that point. If it is after a reset, or some other unclean shutdown (e.g. panic) and the device is in an intermediate state, anything can happen. That is why (e.g.) several kernels (including LInux) had to be re-engineered a bit to properly shut down PCI devices on modunload. This problem became particularly important when kexec came along.
Our conclusion from a few years back is that we could and would (and should) let the OS enable bus master.
ron