Subject: Re: R4000 cache lines
To: Warner Losh <imp@village.org>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: port-mips
Date: 06/02/1998 21:44:43
On Tue, 02 Jun 1998 22:38:56 -0600 
 Warner Losh <imp@village.org> wrote:

 > In message <199806030420.VAA13465@lestat.nas.nasa.gov> Jason Thorpe writes:
 > : Are the R4000 virtually indexed cache entries tagges with ASIDs?
 > 
 > They seem to be PTag.  The Cache chapter in the MIPS R4000 user's
 > manual says that they are indexed via physical bits 32:12 or 32:17
 > depending on the cache involved.  I don't think they take virtual
 > addressing into account at all.

"What manual are _you_ reading?"

>From _MIPS RISC Architecture_ (Kane and Heinrich)...

Page 5-6:

R3000 Caches

The R3000 instruction and data caches are:

	* write-through

	* direct-mapped

	* indexed with a physical address

	* checked with a physical tag

	* organized with 1-word (4-byte) cache line

	* refilled selectably with data blocks of either 4 words (16 bytes),
	  8 words (32 bytes), 16 words (64 bytes), or 32 words (128 bytes)
	  on a cache miss.


In contrast:

Page 5-8:

R4000 Primary Data Cache

The R4000 primary data cache is:

	* write-back

	* direct-mapped

	* indexed with a virtual address

	* checked with a physical tag

	* organized with either a 4-word (16-byte) or 8-word (32-byte)
	  cache line

	* refilled selectably with data blocks of either 4 words (16 bytes)
	  or 8 words (32 bytes) on a cache miss.

...and on 5-10:

R4000 Secondary Data Cache

The R4000 secondary data cache is:

	* write-back

	* direct-mapped

	* indexed with a physical address

	* checked with a physical tag

	* organized with either a 4-word (16-byte), 8-word (32-byte),
	  16-word (64-byte), or 32-word (128-byte) cache line

	* refilled selectably with data blocks of either 4 words (16 bytes),
	  8 words (32 bytes), 16 words (64 bytes), or 32 words (128 bytes)
	  on a cache miss.

In other words, the R4000 primary data cache _certainly is_ indexed
with a virtual address (yes, it is _physically tagged_, but that has
no bearing on what I'm trying to do).

Jason R. Thorpe                                       thorpej@nas.nasa.gov
NASA Ames Research Center                            Home: +1 408 866 1912
NAS: M/S 258-5                                       Work: +1 650 604 0935
Moffett Field, CA 94035                             Pager: +1 650 428 6939