Subject: cpu functions
To: None <port-arm@netbsd.org>
From: Matt Thomas <matt@3am-software.com>
List: port-arm
Date: 08/26/2001 17:01:48
I'm writing the stuff in cpufunc_asm.S for xscale right now and
I have a few questions:

	What is the difference between clean, flush, and purge
	for the cache ops?  As far as I can tell, clean forces
	the data in the cache to memory.  (if so, what the hell
	goes cleaning the I cache do).  flush does a cache
	invalidation.  purge seems to be a clean followed by a
	flush.
	
	On the SA110, purge is identical to clean for purgeD.
	Why doesn't purgeD do a Dcache invalidation while
	purge purgeID does an Icache invalidation?

	Since the only difference between sa110_cache_cleanID
	and sa110_cache_purgeID, why not merge the two functions
	into the same code and do the Icache invalidation at
	start of sa110_cache_purgeID and then fall into
	sa110_cache_cleanID?  Since the processor will reload
	the Icache for the function, why does it matter where in
	the function it happens?

Assuming I'm right in the above, I'v committed a cpufunc_asm.S
which should work on XScale processors.
--
Matt Thomas               Internet:   matt@3am-software.com
3am Software Foundry      WWW URL:    http://www.3am-software.com/bio/matt/
Cupertino, CA             Disclaimer: I avow all knowledge of this message