layer23 on GTA02 AP and ARM unaligned memory access

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/baseband-devel@lists.osmocom.org/.

Alex Badea vamposdecampos at gmail.com
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

Cheers,
Alex

[1] http://lxr.linux.no/#linux+v3.7.1/Documentation/arm/mem_alignment




More information about the baseband-devel mailing list