Subject: Re: sh4 pmap bug? (Re: port-dreamcast/34243)
To: None <port-sh3@NetBSD.org>
From: Valeriy E. Ushakov <uwe@ptc.spbu.ru>
List: port-sh3
Date: 08/24/2006 04:24:55
On Thu, Aug 24, 2006 at 09:02:58 +0900, Izumi Tsutsui wrote:

> uwe@ptc.spbu.ru wrote:
> 
> > > Maybe we should check virtual cache index in pmap_pv_enter() and
> > > allow multiple mappings if VA pages being mapped have the same
> > > virtual indexes like mips pmap?
> > 
> > My reading of Schimmel's book sections 2.2.5 and 3.3.6 is that for
> > that to work the cache must use write-allocate so that if we write via
> > one alias, we cause the line to be loaded into the cache so that
> > references via the other alias pick up the change.
> 
> AFAIK, SH4 use virtual indexed cache with physical tags,
> so you should refer the section 5.2.6, not 3.3.6.
> I.e. no alias could happen if all mapped pages have the same
> virtual indexes (colors).

Right, but 5.2.6 says:

    "...  The case of a single process attaching the same shared
    memory region two or more times within its own address space is
    the same as described in the previous chapters (see Section
    3.3.6)."

SY, Uwe
-- 
uwe@ptc.spbu.ru                         |       Zu Grunde kommen
http://snark.ptc.spbu.ru/~uwe/          |       Ist zu Grunde gehen