[U-Boot-Users] [rfc] warning about overlapping regions when booting with bootm

Mike Frysinger vapier at gentoo.org
Sun Feb 17 00:19:21 CET 2008


On Saturday 16 February 2008, Wolfgang Denk wrote:
> In message <200802160259.32371.vapier at gentoo.org> you wrote:
> > we semi-frequently get users who try to boot an image on top of itself
> > and when when things crash, dont realize why.  i put together this quick
> > little warning, but i'm guessing that Wolfgang's answer is "don't bloat
> > the code for stupid people" ...
>
> Indeed I reject the patch as is, but not because I think it would be
> not useful, but rather because it is IMHO not correct.
>
> The thing is that images *may* overlap, at least a bit. When the  de-
> compressor is running, it starts from the beginning of the compressed
> image  and progrsses towards the end. The already preocessed parts of
> the image are not neede dany longer - if they later  get  overwritten
> by  umcompressed  code  this does no hard. Problems arise only if the
> write pointer catches up with the read pointer.

right ... it isnt a big deal for us on Blackfin as people tend to have a ton 
of RAM compared to many boards, so the decompression areas need not overlap.

> Unfortunaltely I don't know of an  intelligent  way  to  handle  this
> situation.  I  think  I  remember that RMK claims that the ARM kernel
> uncompressor was really clever in this respect, but never found  time
> to check it.

it'd be better moved to the actual decompression routines rather than top of 
bootm.  and either check it before decompressing each chunk, or have a good 
heuristic to estimate things ...
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20080216/538eb9c7/attachment.pgp 


More information about the U-Boot mailing list