Subject: Re: Instruction cache, data cache invalidation
To: Soju_Varghese <Soju_Varghese@Satyam.com>
From: Adam <adam@albedo.art.pl>
List: port-macppc
Date: 12/11/2003 08:49:56
> Hi,
> 	I am doing a benchmarking code for ppc assembly instruction set.
> This code is  executed n number of times for finding out the time 
> taken for
> the execution. I was able to done it successfully. But after each 
> execution
> my requirement is to inavlidate the instruction cache and data cache, 
> the
> assembly instruction "icbi " for instruction cache flush and "dcbf" 
> for data
> cache block can be used according to the documentation. These 
> instruction
> requires the address of the instruction cache and data cache 
> respectively.
> How can we find the instruction cache address and data cache that 
> particular
> program. Is there any sample code available. I am running the program 
> from
> the user mode and not the kernel mode. My ppc is using MPC7450. can u 
> please
> help me in any manner.


Soju,

You don't the address of the instruction/data cache, but the memory 
address you want to invalidate/flush.

Have you read "PowerPC Programming Environments Manual"?
You can download the PDF here: 
http://e-www.motorola.com/webapp/DocLibServlet

Kind regards

	- Adam