linux-mips
[Top] [All Lists]

Re: R5000 support (specifically two-way set-associative cache...)

To: Jun Sun <jsun@mvista.com>
Subject: Re: R5000 support (specifically two-way set-associative cache...)
From: Dominic Sweetman <dom@algor.co.uk>
Date: Tue, 20 Jun 2000 21:59:32 +0100 (BST)
Cc: Dominic Sweetman <dom@algor.co.uk>, linux-mips@fnet.fr, linux@cthulhu.engr.sgi.com, nigel@algor.co.uk
In-reply-to: <394FBF91.76AE6FD0@mvista.com>
References: <394EA5A0.B882F66A@mvista.com> <200006200947.KAA08574@mudchute.algor.co.uk> <394FBAC6.3D29C4A7@mvista.com> <394FBF91.76AE6FD0@mvista.com>
Sender: owner-linux-mips@oss.sgi.com
Jun Sun (jsun@mvista.com) writes:

> I meant to talk about Vr5000 but I was looking at the Vr5432 manual!
> 1. both CPUs have two-way set-associative caches
> 2. Vr5432 uses vAddr:0 to select the way

The Vr5432 is indeed different, compelling you to be aware of the
number of sets.

> 3. I am not 100% sure about Vr5000.

It uses a high-order bit, just like R4600.

> > Can someone familiar with R4600 tell us more about how R4600 cache
> > is setup to hide two-wayness?  Thanks.

Fundamentally:

o "index" operations just go first through one set, then the other.
  So long as initialisation routines are applied to each possible
  index in turn, both sets get initialised.

o "hit" operations "just work".

So long as initialisation is done carefully (basic rule: perform one
stage to the whole cache before going on to the next), run-time cache
maintenance can and should be done with "hit" instructions, and you
don't need to worry whether the CPU is direct mapped, 2- or 4-way set
associative.

(it's all explained in my book, "See MIPS Run", of course...)

Even with the Vr5432 you only have to know the difference when first
setting up the CPU.

Dominic Sweetman
Algorithmics Ltd
dom@algor.co.uk

<Prev in Thread] Current Thread [Next in Thread>