[U-Boot] [PATCH] MPC512x: workaround data corruption forunaligned local bus accesses

Joakim Tjernlund joakim.tjernlund at transmode.se
Tue Jun 29 23:47:59 CEST 2010


Wolfgang Denk <wd at denx.de> wrote on 2010/06/29 21:24:03:
>
> Dear "Steve Deiters",
>
> In message <181804936ABC2349BE503168465576460F272CE9 at exchserver.basler.com> you wrote:
> >
> > I just posted a patch on the linuxppc-dev list that simply uses a
> > slightly modified version of memcpy to always keep the source address
> > aligned.  I had conditionals in that one so it only used it for MPC512x
> > or MPC52xx but you should be able to replace the regular memcpy with
> > this version.  This way you can avoid the wrappers and extra checks. It
> > is a simple enough change in that case:
>
> Thanks. I'll keep this queued and try to run some tests with it on
> different architectures - I don't know which side effects might be
> caused by changing the alignment from target to source address, so I
> will not introduce such a change at this point in the release cycle,
> literally minutes before a release.

Try the C memcpy I sent. It will/should compile into the same
assembler(it did when I wrote it). It is far more generic and
is easier to understand.

 Jocke



More information about the U-Boot mailing list