From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [PATCH] Revert "Fix data abort caused by mis-aligning FIT data"
Date: Mon, 19 Oct 2020 18:58:19 -0400 [thread overview]
Message-ID: <20201019225819.GS14816@bill-the-cat> (raw)
In-Reply-To: <4f9c0170-1c52-0f2d-c6f8-972ed082cd36@denx.de>
On Tue, Oct 20, 2020 at 12:54:35AM +0200, Marek Vasut wrote:
> On 10/20/20 12:45 AM, Tom Rini wrote:
> > On Mon, Oct 19, 2020 at 11:59:22PM +0200, Marek Vasut wrote:
> >> On 10/19/20 11:50 PM, Reuben Dowle wrote:
> >>> 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.
> >>
> >> Well, since U-Boot 2020.10-rc5, any STM32MP1 board does no longer boot
> >> and if I revert this patch, it works again (per git bisect). But this
> >> also applies to any other arm32 boards which load fitImage in SPL, all
> >> of those boards are broken in U-Boot 2020.10.
> >>
> >> It seems that the end of the U-Boot image is at 4-byte aligned offset on
> >> arm32, and that is where the DT is also loaded ; but your patch forces
> >> the alignment to 8-bytes, so suddenly the DT location is 4-bytes off.
> >
> > I think this needs some more investigation to figure out what's going
> > on and where the underlying bugs are. This section of the code is where
> > U-Boot is saying it will copy the device tree to. If we're using a
> > device tree in place that's NOT being copied (and someone else has
> > ensured 8 byte alignment of) we need to set the address of where the
> > device tree is, at that time.
>
> The problem is that the previous alignment was 4 byte, now it is 8 byte
> and that breaks all the other assumptions. So, this patch should be
> reverted to fix the platforms which used to work (or use ALIGN(...4),
> which is the same as reverting it really).
>
> And likely the signed image which caused the breakage should be
> generated with mkimage -E / -B 8, which would insure the alignment, so
> then there is no need to change anything in the code itself.
4 byte alignment is wrong.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20201019/fa5ad5c0/attachment.sig>
next prev parent reply other threads:[~2020-10-19 22:58 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
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 [this message]
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=20201019225819.GS14816@bill-the-cat \
--to=trini@konsulko.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.