[Top] [All Lists]

Re: Disabling lwc0 instruction

To: mansoor <>
Subject: Re: Disabling lwc0 instruction
From: Ralf Baechle <>
Date: Tue, 9 Nov 2004 14:24:18 +0100
In-reply-to: <04e601c4c65c$2fdc15a0$8c00a8c0@mansoor>
Original-recipient: rfc822;
References: <04e601c4c65c$2fdc15a0$8c00a8c0@mansoor>
User-agent: Mutt/1.4.1i
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.


<Prev in Thread] Current Thread [Next in Thread>