Re: [U-Boot] [PATCH] lcd: align bmp header when uncopmressing image

2013-06-03 Thread Wolfgang Denk
Dear Piotr Wilczek, In message <000b01ce6064$b52a7de0$1f7f79a0$%wilc...@samsung.com> you wrote: > > > Oops??? Initial alignment has NOTHING to do with writing over the > > allocated end of memory! > > No, I meant only that malloc allocates memory in at least 4-byte resolution. Does it? I see no

Re: [U-Boot] [PATCH] lcd: align bmp header when uncopmressing image

2013-06-03 Thread Piotr Wilczek
Dear Wolfgang Denk, > -Original Message- > From: Wolfgang Denk [mailto:w...@denx.de] > Sent: Monday, June 03, 2013 1:16 PM > To: Piotr Wilczek > Cc: u-boot@lists.denx.de; 'Minkyu Kang'; 'Kyungmin Park'; Lukasz > Majewski; 'Anatolij Gustschin' > Subject: Re: [PATCH] lcd: align bmp header wh

Re: [U-Boot] [PATCH] lcd: align bmp header when uncopmressing image

2013-06-03 Thread Wolfgang Denk
Dear Piotr Wilczek, In message <000701ce6025$173886c0$45a99440$%wilc...@samsung.com> you wrote: > > > > + /* align to 32-bit-aligned-address + 2 */ > > > + if ((unsigned int)bmp % 0x04 != 0x02) > > > + bmp = (bmp_image_t *)(((unsigned int)dst + 0x02) & ~0x01); > > > > This is wrong. Suppo

Re: [U-Boot] [PATCH] lcd: align bmp header when uncopmressing image

2013-06-03 Thread Wolfgang Denk
Dear Piotr Wilczek, In message <000601ce6021$fcb8f490$f62addb0$%wilc...@samsung.com> you wrote: > > > If you do this, you must also account for the up to 2 additional bytes > > needed in the allocated buffer. > > > > Otherwise you might write over the end of the buffer... > > > Because 8-byte a

Re: [U-Boot] [PATCH] lcd: align bmp header when uncopmressing image

2013-06-02 Thread Piotr Wilczek
Hello Nikita, > -Original Message- > From: Nikita Kiryanov [mailto:nik...@compulab.co.il] > Sent: Sunday, June 02, 2013 1:06 PM > To: Piotr Wilczek > Cc: u-boot@lists.denx.de; Kyungmin Park > Subject: Re: [U-Boot] [PATCH] lcd: align bmp header when uncopmressing > i

Re: [U-Boot] [PATCH] lcd: align bmp header when uncopmressing image

2013-06-02 Thread Piotr Wilczek
Dear Wolfgang Denk, > -Original Message- > From: Wolfgang Denk [mailto:w...@denx.de] > Sent: Friday, May 31, 2013 4:23 PM > To: Piotr Wilczek > Cc: u-boot@lists.denx.de; Minkyu Kang; Kyungmin Park; Lukasz Majewski; > Anatolij Gustschin > Subject: Re: [PATCH] lcd: align bmp header when unco

Re: [U-Boot] [PATCH] lcd: align bmp header when uncopmressing image

2013-06-02 Thread Nikita Kiryanov
Hello Piotr, On 05/31/2013 02:26 PM, Piotr Wilczek wrote: -bmp_image_t *gunzip_bmp(unsigned long addr, unsigned long *lenp) +bmp_image_t *gunzip_bmp(unsigned long addr, unsigned long *lenp, + void **alloc_addr) { void *dst; unsigned long len; @@ -60,7 +65,

Re: [U-Boot] [PATCH] lcd: align bmp header when uncopmressing image

2013-05-31 Thread Wolfgang Denk
Dear Piotr Wilczek, In message <136573-15449-1-git-send-email-p.wilc...@samsung.com> you wrote: > When compressed image is loaded, it must be decompressed > to an aligned address + 2 to avoid unaligned access exception > on some ARM platforms. If you do this, you must also account for the up

[U-Boot] [PATCH] lcd: align bmp header when uncopmressing image

2013-05-31 Thread Piotr Wilczek
When compressed image is loaded, it must be decompressed to an aligned address + 2 to avoid unaligned access exception on some ARM platforms. Signed-off-by: Piotr Wilczek Signed-off-by: Kyungmin Park CC: Anatolij Gustschin CC: Wolfgang Denk: --- common/cmd_bmp.c | 40 +++