Re: How to use SPE on MPC8541
From: Andy Fleming <hidden>
Date: 2005-09-27 18:50:41
On Sep 27, 2005, at 12:36, G=E9rard Gu=E9vel wrote:
quoted
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? AndyYes the application runs. I wrote a mini driver with an ioctl which performs a mfmsr() call and returns the value to the user =20 application. I called this ioctl at several times before and after executing SPE =20=
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 =20 this time but disappears later.
Your driver runs in kernel space. The kernel has the SPE bit off. =20 The MSR state is process-specific. If the code executes, the MSR bit =20= is set. Why do you want to see if the bit is set?