[PATCH v4 1/4] board_f.c: Ensure gd->new_bootstage alignment

Tom Rini trini at konsulko.com
Fri Apr 17 23:08:30 CEST 2020


On Tue, Mar 10, 2020 at 10:15:02AM +0100, Patrick Delaunay wrote:

> From: Patrice Chotard <patrice.chotard at st.com>
> 
> In reserve_bootstage(), in case size is odd, gd->new_bootstage
> is not aligned. In bootstage_relocate(), the platform hangs when
> getting access to data->record[i].name.
> To avoid this issue, make gd->new_bootstage 16 byte aligned.
> 
> To ensure that new_bootstage is 16 byte aligned (at least needed for
> x86_64 and ARMv8) and new_bootstage starts down to get enough space,
> ALIGN_DOWN macro is used.
> 
> Fixes: ac9cd4805c8b ("bootstage: Correct relocation algorithm")
> 
> Signed-off-by: Patrice Chotard <patrice.chotard at st.com>
> Reviewed-by: Vikas MANOCHA <vikas.manocha at st.com>
> Reviewed-by: Patrick Delaunay <patrick.delaunay at st.com>
> Tested-by: Patrick Delaunay <patrick.delaunay at st.com>
> Signed-off-by: Patrick Delaunay <patrick.delaunay at st.com>

Applied to u-boot/master, thanks!

-- 
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/20200417/6bf3b720/attachment.sig>


More information about the U-Boot mailing list