[Cbe-oss-dev] Call/return from PPE to SPE functions

Arnd Bergmann arnd at arndb.de
Tue May 29 17:15:21 EST 2007


On Tuesday 29 May 2007, Brian Watt wrote:
> However, this can be only done when the entry point is equal to
> spe->base_private->entry, and not just any LS address. What I need is any
> entry address to be specified. In addition I need to allow setting a
> variable number of SPE registers (from 3 up to 75), and then upon
> completion it needs to return an updated register 3. What does the mailing
> list think about such a capability and the modifications required in
> LIBSPE2 to accomplish this?

You could do it in theory, but it would be horribly inefficient. The only
time that you can set SPE general purpose registers is when the context
is saved in kernel memory. Making a function call to the SPU this way
basically means having more overhead than starting the program in the
first place.

I'd recommend that you define a parameter area in local store for
your program and pass the arguments by writing in there before you
call spe_context_run().

	Arnd <><



More information about the cbe-oss-dev mailing list