On Tue, Nov 09, 2004 at 06:31:11PM +0530, mansoor wrote:
> Iam working on lx4189. This core doesnt support
> "lwc0" instruction but my tool chain generates
> this instruction.
>
> So when I run some applications it throws
> "unknown instruction" exception.
>
> How can solve this issue ?
>
> I have few solutions but I dont know
> whether its correct.
>
>
> 1) Re-build the toolchain with this instruction
> disbaled. But how to do this ?.
> 2) Write an exception handler to handle this
> instruction. The exact replacement would be
> "mfc0". how to do this ?
No. lwc0 is ll, load linked. In 2.6 define cpu_has_llsc to return 0 in
your system's cpu-feature-override.h. In 2.4 disable CONFIG_CPU_HAS_LLSC.
The kernel actually has an emulation for ll/sc in applications which
enables running of application code using ll/sc on ll/sc-less processors.
You should try to find why this seems to fail for you. Maybe this Lexra
kernel is simply super-ancient? If it's as old as it seems you should
replace it as it has various exploitable security holes.
Ralf
|