Re: MTRR control

Richard Gooch (rgooch@atnf.CSIRO.AU)
Sun, 14 Dec 1997 10:12:34 +1100


[SORRY: MY MOUSE FOULED UP AND I SENT THAT LAST MESSAGE UNCOMPLETED]
Alan Cox writes:
> > Another problem with proform-1.0 is that it states that it doesn't
> > work with SMP. Why is this so? Is it simply because the MTRRs of the
> > CPU which happened to run insmod are modified, but not those of the
>
> Yep
>
> > other CPU(s)? In that case all that is needed is some mechanism to run
> > this bit of code for all CPUs.
>
> Thats all there is too it. The x86 SMP code has some message passing it
> uses for sending certain inter CPU events, adding a "sync mtrr" message
> should do the trick.

OK, I'll have a look at that. Another question: I've been looking at
the sysctl interface, and I'm not so sure that it is really what I
want to use. It seems to be more tuned to fiddling kernel parameters
rather than hardware registers. So I'm thinking of simply adding a R/W
entry like /proc/mtrr which would yield something like:

reg00: base=0x00000000 ( 0MB), range= 128MB: write-back
reg01: base=0xf8000000 (3968MB), range= 4MB: write-combining

when reading and would require you to write the following to create an
entry:
0xf8000000 0x400000 write-combining

and the following to remove an entry:
0xf8000000 0x400000 remove

and /proc/mtrr would only exist on a PPro. Does this scheme sound
reasonable (read: clean enough)?

Regards,

Richard....