Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019 
<== Date ==> <== Thread ==>

Subject: Re: Newport XPS-Q8 and Motor Record - armv5teb architecture
From: Stephen Beckwith <embeddedsteve@gmail.com>
To: "J. Lewis Muir" <jlmuir@imca-cat.org>
Cc: Tonia Batten <Tonia.Batten@lightsource.ca>, "Tech-talk@aps.anl.gov" <Tech-talk@aps.anl.gov>
Date: Tue, 6 May 2014 11:15:00 -0400
Tonia,
   Yes, as J. Lewis Muir said:  if you move the order the fields in the structure, might shed some light on things.
Remember, ARM is MUCH more restrictive in alignment than Intel. 

From the ARM Reference Manual:  (A2.8)
Prior to ARMv6, doubleword (
LDRD
/
STRD
) accesses to memory, where the a
ddress is not doubleword-aligned,
are
UNPREDICTABLE
. Also, data accesses to non-aligned word an
d halfword data are treated as aligned from
the memory interface perspective. That is:
• the address is treated as truncat
ed, with address bits[1:0] treate
d as zero for word accesses, and
address bit[0] treated as
zero for halfword accesses.
• load single word ARM instructions
are architecturally defined to ro
tate right the wo
rd-aligned data
transferred by a non word-aligned address one, two
or three bytes depending on the value of the two
least significant address bits.
• alignment checking is defined fo
r implementations supporting a Syst
em Control coprocessor using
the A bit in CP15 register 1

As previously suggested, printout the "thing" being pointed to (message) at point A (where correct) then again at point B (where incorrect) and look for differences.
The Linux 2.6.10 is a very old kernel.  Might be some library/kernel issue as well. . .

Is this structure "statically" allocated (i.e. not on the stack)?
Also, check the compiler directives w.r.t. alignment issues.

Your idea of a test program is also very good. 

Regards,
Stephen Beckwith



On Tue, May 6, 2014 at 10:53 AM, J. Lewis Muir <jlmuir@imca-cat.org> wrote:
On 5/6/14, 9:41 AM, Tonia Batten wrote:
> What do you mean by "What happens if you move the double and int?"  Do
> you mean casting or copying the value?  I am wondering about setting
> up a simple c program just to verify that the value is correct when
> casting to different types.

I would guess he means change the order of the fields in the struct.

Lewis


References:
RE: Newport XPS-Q8 and Motor Record - armv5teb architecture Mark Rivers
Re: Newport XPS-Q8 and Motor Record - armv5teb architecture J. Lewis Muir
Re: Newport XPS-Q8 and Motor Record - armv5teb architecture Stephen Beckwith
RE: Newport XPS-Q8 and Motor Record - armv5teb architecture Tonia Batten
Re: Newport XPS-Q8 and Motor Record - armv5teb architecture J. Lewis Muir

Navigate by Date:
Prev: Re: Newport XPS-Q8 and Motor Record - armv5teb architecture J. Lewis Muir
Next: Trouble with OID name using devsnmp. Nicoletta Petrella
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019 
Navigate by Thread:
Prev: Re: Newport XPS-Q8 and Motor Record - armv5teb architecture J. Lewis Muir
Next: Re: Newport XPS-Q8 and Motor Record - armv5teb architecture Torsten Bögershausen
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019 
ANJ, 17 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·