Subject: Re: flushing write buffer
To: None <simonb@NetBSD.ORG>
From: Toru Nishimura <nisimura@itc.aist-nara.ac.jp>
List: port-mips
Date: 04/17/2000 03:28:59
On mar 28 2000 17:10:52, <nisimura@itc.aist-nara.ac.jp> writes:
>So, isn't it ok to provide generic but possibly less-optimal default;
>
> LEAF(mips1_wbflush)
> lui v0, 0x8000
> lw v0, 0(v0)
> j ra
> nop
> END(mips1_wbflush)
>
To get kseg1, shouldn't the high-order address be 0xA000?.
Otherwise: nearly. But there cannot be a generic mips1
mips1_wbflush(), since the hardware for r2000 is different from
r2000a/r3000, which is in turn different from r3000a and later.
the function aboce is really a mips_r3000a_wbflush().
Similarly, the function currently called mips1_wbflush() should be
called mips_r2000a_wbflush(), since that's the approved way to flush
r3000s (NB: r2000a is basically an r3000 core in r2000-pin-compatible
package). That's why I put that code in arch/mips, instead of
arch/pmax. Then the names got muddled up when we changed from
{r2000,r4000}_xxx to {mips1,mips3}_xxx.
For pre-r2000A (i.e., real r2000s), you're stuck with going to
motherboard-specific hacks like the pmax kn210_wbflush, as far as I know.