First try at SPE APU context switch: idle task returns and panics with ERROR 6
dufault at hda.com
Tue Oct 13 22:24:00 UTC 2009
I implemented what I sketched out this AM, in a slightly simpler
manner in that I put the storage for the SPE context in the same
structure as the other context for now. It almost works.
I have two tasks running, the idle task and a compute task that's
using the SPE. If I set breakpoints I can see it nicely going back
and forth and doing what it should, saving and restoring the SPE
context for the compute task but not the idle task, and the
computations appear correct.
The fly in the ointment is that if I just break into the debugger with
^C and wind up in the idle task, and then continue, the system always
"rtems-126.96.36.199(PowerPC/Generic (no FPU)/mpc5554evb) PANIC ERROR 6"
which I believe is the idle task returning.
Now if I just happen to not ^C in the idle task (which happens roughly
1 time in 12 due to timing), or if I've set breakpoints ahead of time,
everything seems to work OK. It's just interrupting the idle task
through the remote debugger that seems to screw things up.
For a debugger I'm using a Macraigor USB "wiggler". The ^C I'm
talking about is hitting ^C in gdb talking to the board through the
It happens exactly the same way even if I set neither task to save the
context and take out the floating point, in which case all that should
be happening is the context switching code doing a few tests and
jumping around the new pieces that save and restore things, OTHER than
the fact that the SPE APU is now disabled (it was enabled before).
I've removed the few pieces of code in the BSP that were using the SPE
Any ideas? I didn't do anything to the interrupt or exception code
since I didn't think I had to.
More information about the users