PPro/PII MTRR support in Linux 2.1.x

Kendall Bennett (KendallB@scitechsoft.com)
Fri, 17 Jul 1998 20:00:55 -0800


Hi all,

I noticed that in the latest development kernels there is support for
the MTRR registers, which allows you to enable write combining for
the linear framebuffer of a graphics card on PPro and PII systems. I
am curious about how this works. I took a quick look at the source
for this in the kernel, but the module was huge and went way over my
head (all the __SMP__ and other #defines make my head spin!).

Anyway, how does the kernel find out how to program the MTRR
registers for the framebuffer, or does is simply export services that
user land code can call the enable MTRR write combining for the LFB?
If it allows user land app (like our code!) to do this, what is the
system call for this and is there any documentation on it?

One of the reasons why I am curious is that it is vitally important
when you re-program the MTRR's for the hardware linear framebuffer of
the graphics device that you don't simply block enable it for the
entire amount of memory that the PCI device has mapped. The reason
for this is that many cards (ATI is one) map their MMIO registers at
the end of the framebuffer memory, and if you enable write combining
on the MMIO registers the acceleration code freaks out and does not
work properly. In order for this to work properly you can only enable
it up to the next 512Kb boundary before the MMIO registers (since the
MTRR's require a 512Kb aligned length to work properly).

Regards,

+--------------------------------------------------------------------------+
| SciTech Software - Building Truly Plug'n'Play Software! |
+--------------------------------------------------------------------------+
| Kendall Bennett | Email: KendallB@scitechsoft.com |
| Director of Engineering | Phone: (530) 894 8400 |
| SciTech Software, Inc. | Fax : (530) 894 9069 |
| 505 Wall Street | ftp : ftp.scitechsoft.com |
| Chico, CA 95928, USA | www : http://www.scitechsoft.com |
+--------------------------------------------------------------------------+

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html