
On 02/04/13 13:39, Nikita Kiryanov wrote:
When configuring U-Boot to display a splash image, the user is free to designate whatever address they see fit as the in-memory location of BMP file. Unfortunately, this makes it easy to place the BMP header fields in unaligned addresses, which will cause a data abort on architectures which can't handle unaligned memory accesses. What's worse, addresses which are supposed to be issue free (32 bit aligned addresses) actually don't work because of the structure of the BMP header file (the header starts with 2 chars, followed by __u32 fields. The two chars offset the 32 bit fields away from proper alignment).
As a result, it is very easy to brick the board that U-Boot runs on with certain architectures. Once a bad address for splash image is selected and the board restarted, U-Boot never reaches command line, and yet the only way to prevent the data aborts from happening is to clear or change the environment variable splashimage.
While it is possible to fix the problem by compiling all relevant files with $(PLATFORM_NO_UNALIGNED), it is possible to handle it with finer granularity by creating an API for header accesses, and compiling only that with $(PLATFORM_NO_UNALIGNED).
This patchset creates such an API, and makes use of it wherever an in-memory BMP header is probed for data.
Further information can be found in this discussion: http://lists.denx.de/pipermail/u-boot/2013-January/144666.html
Nikita Kiryanov (5): Add bmp_layout module for accessing BMP header data lcd: use bmp_layout API cmd_bmp: use bmp_layout API video/cfb_console: use bmp_layout API video/bus_vcxk: use bmp_layout API
In 5 above patches, Nikita has accidentally added my s-o-b, without me being participating in the patch development or delivery process. Nikita, please, don't do so in the future.
Thanks.