On Tue, 12 Dec 2000, Michel Dänzer wrote:
> Gareth Hughes wrote:
> > I'd like to be able to mark a scattered list of pages write-combining
> > for use with the r128 PCI GART, or for that matter any card that can do
> > scatter-gather DMA from system memory. My understanding is that the
> > only way to do this is with MTRRs, as even though you can change the
> > behaviour using the PCD and PWT settings, they still depend on a
> > write-combining or write-protected MTRR being set (table 9-5 on page
> > 9-14 of the System Programming manual).
> > If this is true, we're basically stuck unless we grab a block of memory
> > at boot time (ie. what the Utah drivers do).
> As we don't have such problems on PPC, would it be possible to implement PCI
> GART without (proper) MTRR support first and then worry about it? :)
> Grabbing a block of memory at boot time should only happen if the user
> explicitly wants it IMHO.
Besides, Pentium and Pentium MMX doesn't have MTRR support, so we DO need
a fallback for these systems. OTOH, there appears to be SMP initialisation
code selected when MTRR is selected in the kernel config, so you will be
likely to find MTRR selected even on machines without MTRR.
My suggestion: Make an option to enable MTRR support for GART dependant on
having the MTRR option in the CPU config section enabled, but test for the
mtrr flag on the CPU and automagically fail over with a printk warning if
it is not there.
I would be happy to test pci GART but I have a 3D rage pro and a
millenium II, and not a rage 128.