Re: How to use SPE on MPC8541
From: Andy Fleming <hidden>
Date: 2005-09-27 15:56:34
On Sep 27, 2005, at 10:30, G=E9rard Gu=E9vel wrote:
Hi, I am running a Linux 2.6.9 on a MPC8541 custom board. I would like to run a user application which contains some SPE code extracted from a freescale library. I compiled the kernel with the CONFIG_SPE set to yes. The application also compiles and I can run it on the board. But it seems the SPE bit from the MSR register is not set when the process runs. I tried to use a call to the enable_kernel_spe function to force the bit, but it is always erased by the kernel (??) when scheduling task and never set again. Must I compile the application with some special flags to instruct the kernel I want to use SPE ?
You say the application runs, right? So what made you check the SPE =20 bit state? The kernel keeps SPE disabled by default so it doesn't =20 have to save the upper 32 bits of the registers every context =20 switch. When a process uses SPE for the first time, an exception is =20 triggered, the kernel enables SPE for that process, and then that =20 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 =20 application not executing the SPE instructions? Andy