Skip to content
Commit a6651086 authored by Patrice Chotard's avatar Patrice Chotard Committed by Tom Rini
Browse files

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: ac9cd480 ("bootstage: Correct relocation algorithm")

Signed-off-by: default avatarPatrice Chotard <patrice.chotard@st.com>
Reviewed-by: default avatarVikas MANOCHA <vikas.manocha@st.com>
Reviewed-by: default avatarPatrick Delaunay <patrick.delaunay@st.com>
Tested-by: default avatarPatrick Delaunay <patrick.delaunay@st.com>
Signed-off-by: default avatarPatrick Delaunay <patrick.delaunay@st.com>
parent 9d82cbd3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment