[U-Boot-Users] [PATCH] Fix the condition to detect if an image is already in its place

Uwe Kleine-König ukleinek at informatik.uni-freiburg.de
Fri Mar 16 10:02:13 CET 2007

Hello Wolfgang,

Wolfgang Denk wrote:
> In message <20070315223514.GA51 at informatik.uni-freiburg.de> you wrote:
> > 
> > Do you admit that the first branch of the if I changed asserts the
> > header to start at ih_load and the other asserts the data to start at
> > ih_load?  So if you have an XIP image in RAM starting at a wrong
> > address, booting will fail.
> XIP = eXecute In Place, i. e. the image is run directly from flash /
> ROM, without loading it to RAM at all.
That's clear, yes.  I recognize that my example is notional.  But the
other way round makes more sense.  If you have a non-XIP image then it
is not moved if it was loaded to ih_load or (ih_load - 0x40).

This implies that do_bootm_linux is called either with the data
starting at addr or addr + sizeof(image_header_t).  Then the ugly fix is
to check if (image_header_t)addr->ih_magic == IH_MAGIC and if so move
the image there.  In my eyes this is unneeded code duplication.

Would you think the fix being correct if that xip patch were not relying
on that behaviour?  If so, not taking the patch because of this IMHO is
a poor policy.

> > BTW: I couldn't find this config item "Make a XIP (eXecute in Place)
> > kernel", neither in Linus nor in your tree:
> If you had read the page I referred you to, you should have seen the
> link at the end, which indicates pretty clearly which tree was used.
caught guilty, sorry.

Best regards

Uwe Kleine-König


More information about the U-Boot mailing list