layer23 on GTA02 AP and ARM unaligned memory access

Alex Badea vamposdecampos at
Sun Jan 6 10:34:06 UTC 2013

Hi list,

I'm running layer23 apps on the Application Processor of the OpenMoko
GTA02, which is also an ARM.  I noticed that some parts of code try to
access words in memory which are not naturally aligned.

[ The first symptom was "Err from socket: Bad address" given by
osmocon.  This is because a bogus length header read from the L2 unix
socket was overflowing a static 4K buffer.  The bogus length was due
to an unaligned uint16_t write in osmo_send_l1() -- for an
L1CTL_DATA_REQ I think. ]

The easy and inefficient workaround for this is to ask the kernel[1]
to fix up these accesses:

    echo 3 > /proc/cpu/alignment



More information about the baseband-devel mailing list