From: Reuben Dowle <reuben.dowle@4rf.com>
To: u-boot@lists.denx.de
Subject: [PATCH] Revert "Fix data abort caused by mis-aligning FIT data"
Date: Mon, 19 Oct 2020 21:50:51 +0000 [thread overview]
Message-ID: <669974501aec485c9263fe5127c4ccb5@4rf.com> (raw)
In-Reply-To: <20201019214026.888876-1-marex@denx.de>
The alignment of 8 bytes would also work if code was expecting 4 byte alignment. So the explanation you give for reverting this does not make sense to me.
The version I use in production uses 4 byte alignment, but on advice of Tom Rini I extended to 8 bytes. Maybe we could switch to just forcing 4 bytes, although I can't see why 8 byte would not work?
Note also that I was getting SPL data abort crashes on my arm32 target when image size was not 4 byte aligned. So reverting this patch will break my platform.
-----Original Message-----
From: Marek Vasut <marex@denx.de>
Sent: Tuesday, 20 October 2020 10:40 am
To: u-boot at lists.denx.de
Cc: Marek Vasut <marex@denx.de>; Reuben Dowle <reuben.dowle@4rf.com>; Tom Rini <trini@konsulko.com>
Subject: [PATCH] Revert "Fix data abort caused by mis-aligning FIT data"
This reverts commit eb39d8ba5f0d1468b01b89a2a464d18612d3ea76.
The commit breaks booting of fitImage by SPL, the system simply hangs.
This is because on arm32, the fitImage and all of its content can be aligned to 4 bytes and U-Boot expects just that.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Reuben Dowle <reuben.dowle@4rf.com>
Cc: Tom Rini <trini@konsulko.com>
---
common/spl/spl_fit.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c index 0e27ad1d6a..a90d821c82 100644
--- a/common/spl/spl_fit.c
+++ b/common/spl/spl_fit.c
@@ -349,12 +349,9 @@ static int spl_fit_append_fdt(struct spl_image_info *spl_image,
/*
* Use the address following the image as target address for the
- * device tree. Load address is aligned to 8 bytes to match the required
- * alignment specified for linux arm [1] and arm 64 [2] booting
- * [1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/arm/booting.rst#n126
- * [2]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/arm64/booting.rst#n45
+ * device tree.
*/
- image_info.load_addr = ALIGN(spl_image->load_addr + spl_image->size, 8);
+ image_info.load_addr = spl_image->load_addr + spl_image->size;
/* Figure out which device tree the board wants to use */
node = spl_fit_get_image_node(fit, images, FIT_FDT_PROP, index++);
--
2.28.0
next prev parent reply other threads:[~2020-10-19 21:50 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-19 21:40 [PATCH] Revert "Fix data abort caused by mis-aligning FIT data" Marek Vasut
2020-10-19 21:50 ` Reuben Dowle [this message]
2020-10-19 21:59 ` Marek Vasut
2020-10-19 22:17 ` Reuben Dowle
2020-10-19 22:46 ` Marek Vasut
2020-10-19 22:45 ` Tom Rini
2020-10-19 22:54 ` Marek Vasut
2020-10-19 22:58 ` Tom Rini
2020-10-19 23:02 ` Marek Vasut
2020-10-19 23:09 ` Alex G.
2020-10-19 23:13 ` Reuben Dowle
2020-10-20 0:31 ` Alex G.
2020-10-19 23:02 ` Reuben Dowle
2020-10-19 23:11 ` Marek Vasut
2020-10-20 0:27 ` Reuben Dowle
2020-10-20 9:05 ` Marek Vasut
2020-10-20 14:07 ` Tom Rini
2020-10-20 14:29 ` Marek Vasut
2020-10-20 14:32 ` Tom Rini
2020-10-20 14:38 ` Alex G.
2020-10-20 15:54 ` Tom Rini
2020-10-20 17:01 ` Alex G.
2020-10-20 18:10 ` Tom Rini
2020-10-21 17:11 ` Alex G.
2020-10-20 14:42 ` Marek Vasut
2020-10-21 23:12 ` Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=669974501aec485c9263fe5127c4ccb5@4rf.com \
--to=reuben.dowle@4rf.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.