* Question about unaligned memory access on ARMv7
@ 2011-11-18 20:32 Haohui Mai
2011-11-18 21:13 ` Måns Rullgård
0 siblings, 1 reply; 2+ messages in thread
From: Haohui Mai @ 2011-11-18 20:32 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
My linux kernel complained about the user space binaries doing unaligned
memory access.
Here is one of the log:
[ 1056.522396] Alignment trap: rsyslogd (1400) PC=0x4004450e
Instr=0xe8541f00 Address=0x409f84f5 FSR 0x001
$ echo "0xe8 0x54 0x1f 0x00"|/opt/local/ibos/bin/llvm-mc --disassemble
-triple=thumb-apple-darwin9
strb r0, [r5, r3]
movs r7, r3
I'm using the NVIDIA Harmony board, which has a Cortex-A9MP dual core
CPU. According to the specification, this instruction is legitimate and
shouldn't fault.
I checked in arch/arm/mm/alignment.c, the function
do_alignment_t32_to_handler will ignore this because the CPU should be
able to handle it.
I also checked with the newest version of arch/arm/mm/alignment and I
noticed no changes.
Am I missing some erratas that can possibly fix this bug?
PS: I'm using a sufficiently old (2.6.32.9) kernel and I'm unable to
update it because a bug in the bootloader. :-(
Any suggestions are appreciated.
Cheers,
Haohui
^ permalink raw reply [flat|nested] 2+ messages in thread
* Question about unaligned memory access on ARMv7
2011-11-18 20:32 Question about unaligned memory access on ARMv7 Haohui Mai
@ 2011-11-18 21:13 ` Måns Rullgård
0 siblings, 0 replies; 2+ messages in thread
From: Måns Rullgård @ 2011-11-18 21:13 UTC (permalink / raw)
To: linux-arm-kernel
Haohui Mai <haohui.mai@gmail.com> writes:
> Hi,
>
> My linux kernel complained about the user space binaries doing unaligned
> memory access.
>
> Here is one of the log:
>
> [ 1056.522396] Alignment trap: rsyslogd (1400) PC=0x4004450e
> Instr=0xe8541f00 Address=0x409f84f5 FSR 0x001
That is an LDREX instruction. It does not support unaligned addresses.
> $ echo "0xe8 0x54 0x1f 0x00"|/opt/local/ibos/bin/llvm-mc --disassemble
> -triple=thumb-apple-darwin9
> strb r0, [r5, r3]
> movs r7, r3
You got the byte order wrong there.
> Any suggestions are appreciated.
Fix your application.
--
M?ns Rullg?rd
mans at mansr.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-11-18 21:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-18 20:32 Question about unaligned memory access on ARMv7 Haohui Mai
2011-11-18 21:13 ` Måns Rullgård
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).