Re: [U-Boot] [PATCH 1/5] Add bmp_layout module for accessing BMP header data

2013-02-05 Thread Igor Grinberg
On 02/05/13 01:11, Wolfgang Denk wrote: Dear Albert ARIBAUD, In message 20130204222628.545da91e@lilith you wrote: The point about md not checking alignment is indeed valid: one should know that a md.l requires a 4-byte-aligned address or it will abort. Or, one might do this

Re: [U-Boot] [PATCH 1/5] Add bmp_layout module for accessing BMP header data

2013-02-05 Thread Wolfgang Denk
Dear Nikita, In message 5110ac16.9000...@compulab.co.il you wrote: That's true, but when md traps you simply restart the board and everything's fine. If displaying a splash screen traps- you're stuck. In such a case you have forgotten to test your settings before activation these as default,

Re: [U-Boot] [PATCH 1/5] Add bmp_layout module for accessing BMP header data

2013-02-05 Thread Wolfgang Denk
Dear Igor Grinberg, In message 5110bdb2.8040...@compulab.co.il you wrote: Yes, struct bmp_header is a packed array with non-natural order of entries; see also section Bitmap file header at [1]; we may consider this a really stupid thing to do, but we have to live with this fact. It was

Re: [U-Boot] [PATCH 1/5] Add bmp_layout module for accessing BMP header data

2013-02-05 Thread Igor Grinberg
On 02/05/13 11:57, Wolfgang Denk wrote: Dear Igor Grinberg, In message 5110bdb2.8040...@compulab.co.il you wrote: Yes, struct bmp_header is a packed array with non-natural order of entries; see also section Bitmap file header at [1]; we may consider this a really stupid thing to do, but we

Re: [U-Boot] [PATCH 1/5] Add bmp_layout module for accessing BMP header data

2013-02-05 Thread Wolfgang Denk
Dear Igor, In message 5110ef4f.3080...@compulab.co.il you wrote: Why should we? Who tells that this is not perfectly legal on the running system? It might be perfectly legal, but we also consider a tons of work explaining why and how this should be done (needless to mention the amount

Re: [U-Boot] [PATCH 1/5] Add bmp_layout module for accessing BMP header data

2013-02-05 Thread Igor Grinberg
On 02/05/13 15:20, Wolfgang Denk wrote: Dear Igor, In message 5110ef4f.3080...@compulab.co.il you wrote: Why should we? Who tells that this is not perfectly legal on the running system? It might be perfectly legal, but we also consider a tons of work explaining why and how this should

Re: [U-Boot] [PATCH 1/5] Add bmp_layout module for accessing BMP header data

2013-02-05 Thread Wolfgang Denk
Dear Igor, In message 5c0f.60...@compulab.co.il you wrote: This is a relatively new default setting for the compiler, and I think this is the reason why you (still) haven't heard about it. Also, do you really expect that whoever gets the board bricked will go complaining to the mailing

[U-Boot] [PATCH 1/5] Add bmp_layout module for accessing BMP header data

2013-02-04 Thread Nikita Kiryanov
Currently code that displays BMP files does two things: * assume that any address is a valid load address for a BMP * access in-memory BMP header fields directly Since some BMP header fields are 32 bit wide, this has a potential for causing data aborts when these fields are placed in unaligned

Re: [U-Boot] [PATCH 1/5] Add bmp_layout module for accessing BMP header data

2013-02-04 Thread Wolfgang Denk
Dear Nikita Kiryanov, In message 1359977979-28585-2-git-send-email-nik...@compulab.co.il you wrote: Currently code that displays BMP files does two things: * assume that any address is a valid load address for a BMP * access in-memory BMP header fields directly Since some BMP header fields

Re: [U-Boot] [PATCH 1/5] Add bmp_layout module for accessing BMP header data

2013-02-04 Thread Albert ARIBAUD
Hi Wolfgang, On Mon, 04 Feb 2013 20:26:18 +0100, Wolfgang Denk w...@denx.de wrote: Dear Nikita Kiryanov, In message 1359977979-28585-2-git-send-email-nik...@compulab.co.il you wrote: Currently code that displays BMP files does two things: * assume that any address is a valid load

Re: [U-Boot] [PATCH 1/5] Add bmp_layout module for accessing BMP header data

2013-02-04 Thread Wolfgang Denk
Dear Albert ARIBAUD, In message 20130204222628.545da91e@lilith you wrote: The point about md not checking alignment is indeed valid: one should know that a md.l requires a 4-byte-aligned address or it will abort. Or, one might do this _intentionally_ for some testing purposes. For me it is

Re: [U-Boot] [PATCH 1/5] Add bmp_layout module for accessing BMP header data

2013-02-04 Thread Nikita Kiryanov
Dear Wolfgang Denk, On 02/04/2013 09:26 PM, Wolfgang Denk wrote: Dear Nikita Kiryanov, In message 1359977979-28585-2-git-send-email-nik...@compulab.co.il you wrote: Currently code that displays BMP files does two things: * assume that any address is a valid load address for a BMP * access