[U-Boot] [PATCH 0/5] Create an API for safely accessing BMP header fields

Igor Grinberg grinberg at compulab.co.il
Tue Feb 5 08:39:41 CET 2013


On 02/04/13 23:02, Jeroen Hofstee wrote:
> Hello Wolfgang,
> 
> On 02/04/2013 09:35 PM, Wolfgang Denk wrote:
>> Dear Nikita Kiryanov,
>>
>> In message <510FAB72.3050901 at compulab.co.il> you wrote:
>>> I did mention that I consider that fix as temporary. I believe this fix
>>> is better because it addresses the issue everywhere and does so in a
>>> more maintainable way (does not require the address fix to be duplicated
>>> everywhere there is a problem).
>> Can you please explain (again) what exactly you consider the problem?
>>
>> That I can load a BMP image to anodd address, and that this will
>> result in odd results?
>>
> If you use eldk 5.3, a board will be bricked if you set the load address
> to not (an aligned address _+ 2_). So anyone who didn't know the +2
> requirement, has a bricked board (and can't recover). So this is
> really a different then md trapping, since resetting the board won't
> help... it is broken / kaput.

Agreed totally, by anyone we mean any _user_ that don't even need to care
about the bmp header structure and uses the perfectly 32 bit aligned address.

> 
> That said, I am not really in favor of this solution. But I do think it needs
> to be fixed.

I actually like the approach as it gives an abstraction for:
1) different compilers and their default options,
2) architecture specific "problems" like weather it can deal with unaligned accesses


-- 
Regards,
Igor.


More information about the U-Boot mailing list