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
On Sun, Jan 06, 2013 at 12:34:06PM +0200, Alex Badea wrote:
Hi list,
Hi,
The easy and inefficient workaround for this is to ask the kernel[1] to fix up these accesses:
echo 3 > /proc/cpu/alignment
we have a pragmatic approach for this. There are several new tlv methods to access data unaligned (using memcpy). We use them once we get alignment warnings from the kernel.
holger
baseband-devel@lists.osmocom.org