]> git.baikalelectronics.ru Git - uboot.git/commit
board_f.c: Ensure gd->new_bootstage alignment
authorPatrice Chotard <patrice.chotard@st.com>
Tue, 10 Mar 2020 09:15:02 +0000 (10:15 +0100)
committerTom Rini <trini@konsulko.com>
Fri, 17 Apr 2020 03:06:54 +0000 (23:06 -0400)
commitf686c073d331f321c3362a9c64ed9467927e2614
tree4577c34b863f1d20f654c8b2b784e929415695ea
parentbb4882dc405482490aa7f7789593501c4a13c3dc
board_f.c: Ensure gd->new_bootstage alignment

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: bbda42c94fe9 ("bootstage: Correct relocation algorithm")
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Vikas MANOCHA <vikas.manocha@st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@st.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
common/board_f.c