Ronald G Minnich wrote:

>I'm wrong. Sorry.
>
>I misinterpreted a problem we're having in Plan 9, but now I see that I do
>correctly enable most things -- except the Bus Master Enable bit. Some
>times I do, but on some interfaces I don't so I have to see what's going
>on.
>
>Also, Etherboot gets upset when Bus Master is not set.
>
>I have to see if I understand the rules for turning on Bus Master, which I
>thought I did, but obviously do not.
>

A few notes, blindly enabling IO and MEM for all devices is bad... 
recall that video devices for example try to decode the same VGA region 
at the same time.  Disabling the IO decode bit in PCI config space for 
VGA devices is the only generic way to avoid this.

WRT to bus mastering, it is very very evil to blindly enable 
busmastering.  Tulips and probably most other typical devices lock the 
entire system, if (a) initialization occurs in some fashion that 
initiates DMA, and (b) the busmaster bit is enabled.  There were some 
lockup fixes put into Linux kernel device drivers, that basically moved 
the pci_set_master() function after some chip-specific quiescing code.

To sum, most devices you can enable IO and MEM bits, but not all.
Only enable busmaster bit on devices you are confident about.  The OS 
should take care of the rest, i.e. enabling busmastering when it needs it.

    Jeff




Reply via email to