Re: PPro/PII MTRR support in Linux 2.1.x

Kendall Bennett (KendallB@scitechsoft.com)
Sat, 18 Jul 1998 13:25:50 -0800


Richard Gooch <Richard.Gooch@atnf.CSIRO.AU> writes:

He, a fellow Aussie!! How's life down under these days mate!

> > 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?
>
> The kernel exports an interface that may be used by userspace
> programmes (by frobbing /proc/mtrr) or by kernel modules calling
> mtrr_*() functions. The MTRR interface doesn't decide what regions
> should be set: that's someone else's job.

Excellent - that is the way it should be. Now all I need to do is
figure out how I can call these functions from our user space
programs to correctly program the MTRR's. You mentioned there is some
documentation on this; forgive my ignorance but where would I find
this?

> FYI: XFree86 4.0 should automatically use this interface.

Cool! I should take a look at the XFree86 sources to figure out how
they do it.

> No problem. The MTRR support allows you to "overlay" an uncachable
> region over a write-combining region. This was done specifically to
> suppot the situation you describe. I should get around to updating the
> documentation to make this clear. It's been on my ToDo list for months
> now :-(

Interesting. Does this provide a performance benefit over just not
enabling write combining for the MMIO registers? How specifically do
you go about doing this (I have written the code we use for MTRR
support in Win95, but it is rather simple compared to what you have
done ;-).

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