From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lukasz Majewski Date: Tue, 28 Jan 2020 09:09:06 +0100 Subject: [PATCH v2 01/21] spl: fix entry_point equal to load_addr In-Reply-To: <20200110144711.81938-2-giulio.benetti@benettiengineering.com> References: <20200110144711.81938-1-giulio.benetti@benettiengineering.com> <20200110144711.81938-2-giulio.benetti@benettiengineering.com> Message-ID: <20200128090906.7091b2ad@jawa> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Giulio, > At the moment entry_point is set to image_get_load(header) that sets > it to "load address" instead of "entry point", assuming entry_point is > equal to load_addr, but it's not true. Then load_addr is set to > "entry_point - header_size", but this is wrong too since load_addr is > not an entry point. > > So use image_get_ep() for entry_point assignment and image_get_load() > for load_addr assignment. > > Signed-off-by: Giulio Benetti > --- > common/spl/spl.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/common/spl/spl.c b/common/spl/spl.c > index c1fce62b91..19085ad270 100644 > --- a/common/spl/spl.c > +++ b/common/spl/spl.c > @@ -284,9 +284,9 @@ int spl_parse_image_header(struct spl_image_info > *spl_image, spl_image->entry_point = image_get_ep(header); > spl_image->size = > image_get_data_size(header); } else { > - spl_image->entry_point = > image_get_load(header); > + spl_image->entry_point = > image_get_ep(header); /* Load including the header */ > - spl_image->load_addr = > spl_image->entry_point - > + spl_image->load_addr = > image_get_load(header) - header_size; > spl_image->size = > image_get_data_size(header) + header_size; I'm concerned, that this change will silently break several boards - the problem is with assumption that entry point is equal to load_addr. It would be best to pull this change ASAP, so we would have a chance to fix this by next release. Best regards, Lukasz Majewski -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 488 bytes Desc: OpenPGP digital signature URL: