How to use SPE on MPC8541

Andy Fleming afleming at freescale.com
Wed Sep 28 04:50:43 EST 2005


On Sep 27, 2005, at 12:36, Gérard Guével wrote:

>
>
>
>> 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.

Your driver runs in kernel space.  The kernel has the SPE bit off.   
The MSR state is process-specific.  If the code executes, the MSR bit  
is set.  Why do you want to see if the bit is set?



More information about the Linuxppc-embedded mailing list