PPC Exceptions question

Valette Eric eric.valette at free.fr
Mon Nov 18 22:34:27 UTC 2002

ahuitzot at mindspring.com wrote:

> 1. since the mpc555 does not have a cache (actually I do not think any of the
> mpc5xx MPU's have a cache) will I need this function, and if so how do I need
> to modify it?

probably memcopy would be OK. The basic problem is that you copy code 
through the data cache, so before being able to execute it, you should 
place it correctly to be visible and effectively accessed via the 
instruction cache...

> 2. I will most likely have Flash located where the vectors are stored (unless
> I relocate them some how) on this board, so how do I get around that? 
> Obviously you cannot move code from x->flash...  Will I even need the codemove
> function in that case?  If not how do I set up the vectors?

At least on mpc8xx, the code was modified to be able to run from flash. 
In that case using the ld command, you can immediately locate your 
exceptions at the right address.

> Another general question I have is this (I hope it does not get me into
> trouble;) I noticed that atleast 3 of the 5 directories in libcpu (the mpc6xx,
> mpc8xx, and mpc8260) all seem to have very similar exception handling code.

Yes because not all exception are handled right now. For each cpu, the 
exception set is different and proper handling may also differ. Of 
course as many things are shared among 32 bits PPC they look the same. 
But if you try to merge the codes, it will end by having ifdefs everywhere.

> Would it not be better for that code to be placed in shared?  I think it would
> be the same for almost every powerpc CPU...  But maybe I am wrong?

Yes you are.

   /  `                   	Eric Valette
  /--   __  o _.          	6 rue Paul Le Flem
(___, / (_(_(__         	35740 Pace

Tel: +33 (0)2 99 85 26 76	Fax: +33 (0)2 99 85 26 76
E-mail: valette at free.fr

More information about the users mailing list