[arm-gnu] undefined instruction
Carlos O'Donell
carlos_odonell at mentor.com
Thu May 17 14:25:18 UTC 2012
On 5/16/2012 5:27 PM, Carlo Caione wrote:
> Ok, I think I have spotted the bug. And actually the problem seems to
> me related to qemu-linaro (yes, I'm emulating a Cortex-A8 with qemu)
> and not to CodeSourcery.
> In fact in the code an exact point does exist in which the strlen
> routine gets corrupted.
...
> 0x402000f0 in __mmu_cache_flush ()
> (gdb) disassemble strlen
> Dump of assembler code for function strlen:
> 0x40205c84 <+0>: beq 0x40205d18 <memcpy>
> 0x40205c88 <+4>: ; <UNDEFINED> instruction: 0xf03fe03a
> 0x40205c8c <+8>: andeq r0, r0, r6
> 0x40205c90 <+12>: andeq r0, r0, r4
> 0x40205c94 <+16>: andeq r0, r0, r7
> 0x40205c98 <+20>: andeq r0, r0, sp, lsl r0
> 0x40205c9c <+24>: ldrdmi r0, [r0], -r3
> 0x40205ca0 <+28>: ; <UNDEFINED> instruction: 0xffffffff
> End of assembler dump.
> (gdb)
>
> So, is this a qemu-linaro bug?
It is most likely either a bug in the cache handling routines or a bug in QEMU's MMU emulation for the Cortex-A8.
I would suggest you test upstream QEMU to see if this is fixed.
If it is then you can then track down the fix and ask Linaro to backport.
If it's not fixed you need to put together a test case for upstream QEMU and report the issue there.
Cheers,
Carlos.
--
Carlos O'Donell
Mentor Graphics / CodeSourcery
carlos_odonell at mentor.com
carlos at codesourcery.com
+1 (613) 963 1026
More information about the arm-gnu
mailing list