RE: How to use SPE on MPC8541
From: Gérard Guével <hidden>
Date: 2005-09-27 17:34:19
You say the application runs, right? So what made you check the SPE bit state? The kernel keeps SPE disabled by default so it doesn't have to save the upper 32 bits of the registers every context switch. When a process uses SPE for the first time, an exception is triggered, the kernel enables SPE for that process, and then that process should be able to use SPE every time it gets cpu time. How are you determining that the SPE bit is not set? Is your application not executing the SPE instructions? Andy
Yes the application runs. I wrote a mini driver with an ioctl which performs a mfmsr() call and returns the value to the user application. I called this ioctl at several times before and after executing SPE code. I already tried to manually force the SPE bit with another ioctl which performs a enable_kernel_spe() call. The bit SPE is right set at this time but disappears later. I don't know if using ioctls is a right way to check the bit. Any idea ? Thanks Gérard