[U-Boot] [PATCH 01/10] Fix IP alignement problem

Olav Morken olavmrk at gmail.com
Fri Oct 10 20:56:56 CEST 2008


On Fri, Oct 10, 2008 at 7:01 PM, Ben Warren <biggerbadderben at gmail.com> wrote:
> Olav Morken wrote:
>>
>> This patch removes volatile from:
>> volatile IP_t *ip = (IP_t *)xip;
>>
>> Due to a bug, avr32-gcc will assume that ip is aligned on a word boundary
>> when
>> using volatile, which causes an exception since xip isn't aligned on a
>> word
>> boundary.
>>
>
> What other architectures have you tried this on?

None, as we don't have any other boards to test on. I do however believe
that this change should have no side-effects. If any architectures
relied on this function working as some sort of memory/io barrier, they
would have problems with other functions such as ArpRequest, which
doesn't have anything that will work as a memory/io barrier before the
eth_send function.

Of course, I could be wrong. I would certainly not suggest including
this change without some more testing.

The bug which causes this problem is in avr32-gcc, which makes
assumptions about the alignement of IP_t when using volatile, and this
change shouldn't be necessary once that bug is fixed. Until that bug
is fixed, this change is needed for anyone trying to run U-Boot on
this microcontroller.

-- 
Olav Morken


More information about the U-Boot mailing list