From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Mon, 10 Mar 2014 17:28:13 -0400 Subject: [U-Boot] [U-Boot, V3] cfb_console: align fields in gzipped .bmp files In-Reply-To: <1394290552-3702-1-git-send-email-eric.nelson@boundarydevices.com> References: <1394290552-3702-1-git-send-email-eric.nelson@boundarydevices.com> Message-ID: <20140310212813.GH16805@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Sat, Mar 08, 2014 at 07:55:52AM -0700, Eric Nelson wrote: > .bmp files contain 32-bit integers aligned at offsets of +2, +6, > et cetera within the bmp_header structure (see include/bmp_layout.h). > > Support for gzip-compressed .bmp files is present in the cfb_console > display subsystem by uncompressing them prior to use. > > This patch forces the in-memory header to be aligned properly > for these compressed images by extracting them to a 2-byte > offset in the memory returned by malloc. Since malloc will always > return a 4-byte aligned value, this forces the .bmp header > fields to be naturally aligned on 4-byte addresses. > > Refer to these files for more details: > doc/README.displaying-bmps > doc/README.arm-unaligned-accesses > > Signed-off-by: Eric Nelson Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: