Re: MTRR & NVTNT

Gerd Knorr (kraxel@goldbach.in-berlin.de)
Fri, 12 Mar 1999 22:03:25 +0100


> > And secondly I noticed when I use the VESA fb console, it
> > works fine, however when it tries to automatically set the MTRR at
> > the 0xe6000000 base address it incorrectly tries to use size
> > 0xff0000 like I was doing before and gets the same error. This
> > would appear to be a bug. I know you didn't write this part of the
> > kernel, but since I'm carboning this to the kernel list I figured
> > I'd mention it in case it was significant.
>
> Which makes it look likely that you really do have a 0xff0000 byte
> framebuffer. If the other 64KB is an MMIO area, write-combining it
> could lead to problems.

Ack, the 0xff0000 comes from the vesa bios, and it probably knows
how much video memory it has...

[ ... ]

> # echo "base=0xe6000000 size=0x1000000 type=write-combining" >! /proc/mtrr
> # echo "base=0xe6ff0000 size=0x10000 type=uncachable" >! /proc/mtrr
>
> It would be nice if something did this automatically. Working out the
> minimum number of regions needed to cover a range of any size is a
> tractable problem, but would require quite a bit of code.

100% agree. Would be nice if the mtrr code could handle this automatically
and hide the implementation details, so this has to be implemented only once.
And if the power-of-two-size limit goes away in the future, only the mtrr
code must be adjusted, not all applications/drivers which are using this
interface.

Gerd

-
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.tux.org/lkml/