From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Roese Date: Thu, 1 Dec 2011 09:57:38 +0100 Subject: [U-Boot] [PATCH 2/2] image: Don't detect XIP images as overlapping. In-Reply-To: <1320956274-16597-2-git-send-email-swarren@nvidia.com> References: <1320956274-16597-1-git-send-email-swarren@nvidia.com> <1320956274-16597-2-git-send-email-swarren@nvidia.com> Message-ID: <201112010957.38935.sr@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 On Thursday 10 November 2011 21:17:54 Stephen Warren wrote: > bootm_load_os() detects when it writes the decompressed image over > the top of the compressed image. If this happens, the original image > is corrupted. When the original image is a multi-component legacy image, > or a (potentially multi-component) FIT image, this implies that other > components may be corrupted. In turn, this means that booting is unlikely > to be successful. > > However, in the case of no image compresssion coupled with an image with > load address equal to where the image is already located (e.g. an XIP > kernel, or IH_TYPE_KERNEL_ANYLOAD), there has been no copy and hence no > corruption, no matter whether it's a single-component legacy image, a > multi-component legacy image, or a FIT image. In this case, disable the > overlap detection, and allow boot to continue. > > Without this change, when booting a single-component legacy image that > contains an IH_TYPE_KERNEL_ANYLOAD, bootm_load_os() would have returned > BOOTM_ERR_OVERLAP, but the caller ignores this, and boot continues and > succeeds. Now, the false error is no longer even returned. > > Without this change, when booting a FIT image that contains an > IH_TYPE_KERNEL_ANYLOAD, bootm_load_os() would have returned > BOOTM_ERR_OVERLAP, which would then cause the caller to reset the board. > Now, the false error is no longer returned, and boot succeeds. > > Signed-off-by: Stephen Warren Applied (after fixing a small merge conflict) to u-boot-staging/sr at denx.de. Thanks. Best regards, Stefan -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de