From: Wolfgang Denk Date: Sun, 17 Feb 2008 00:06:00 +0100 Subject: [U-Boot-Users] [rfc] warning about overlapping regions when booting with bootm In-Reply-To: Your message of "Sat, 16 Feb 2008 02:59:32 EST." <200802160259.32371.vapier@gentoo.org> Message-ID: <20080216230600.1BFCA24D10@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de In message <200802160259.32371.vapier@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. 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. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de "I haven't lost my mind - it's backed up on tape somewhere."