Create an API for safely accessing BMP header fields
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest0 of 5 patches 0 repliesNew
Patches in v1 No applies recorded yet
None of the 5 patches the cover letter announces are in this archive.
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [U-Boot] [PATCH 0/5] Create an API for safely accessing BMP header fields
Quoted 27 lines · Nikita Kiryanov
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
__u32fields. 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
Quoted 6 lines
Nikita Kiryanov (5):
Addbmp_layoutmodule for accessing BMP header data
lcd: usebmp_layoutAPI
cmd_bmp: usebmp_layoutAPI video/cfb_console: usebmp_layoutAPI video/bus_vcxk: usebmp_layoutAPI
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.
Signature · 2 lines
Regards, Igor.