[U-Boot-Users] 32 bit alignment
Wolfgang Denk
wd at denx.de
Tue Feb 4 16:46:37 CET 2003
In message <Pine.LNX.4.52.0302041515420.2901 at mag.devdep.sysgo.de> you wrote:
>
> > address. The result is that I get the value from the address _before_
> > the marked address (which belongs to the same 32 bit aligned dword).
> > This makes the whole network code break which assumes that it can lay
> > arbitrary data structures over the piece of memory.
>
> This is standard behaviour on ARMs, if the alignment exception is
> configured to be ignored. The EA is internally simply anded with ~3.
> There are 2 ways to handle this:
>
> 1) Implement an alignment exception handler (have fun)
> 2) Don't access unaligned data. Use byte accesses instead.
And 2) is what's being used in U-Boot so far. Obviously Robert
stumbles over a piece of code that escaped me so far...
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd at denx.de
Command, n.:
Statement presented by a human and accepted by a computer
in such a manner as to make the human feel as if he is in control.
More information about the U-Boot
mailing list