Message ID | 20200310091505.24862-2-patrick.delaunay@st.com |
---|---|
State | New |
Headers | show |
Series | Ensure 16 alignment of reserved memory in board_f.c | expand |
diff --git a/common/board_f.c b/common/board_f.c index 82a164752a..0427b7b096 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -564,6 +564,11 @@ static int reserve_bootstage(void) int size = bootstage_get_size(); gd->start_addr_sp -= size; + /* + * Ensure that start_addr_sp is aligned down to reserve enough + * space for new_bootstage + */ + gd->start_addr_sp = ALIGN_DOWN(gd->start_addr_sp, 16); gd->new_bootstage = map_sysmem(gd->start_addr_sp, size); debug("Reserving %#x Bytes for bootstage at: %08lx\n", size, gd->start_addr_sp);