diff mbox series

[U-Boot,v2,04/10] bloblist: Reserve an aligned base

Message ID 20191021232652.132164-5-sjg@chromium.org
State Accepted
Commit 5074a8a3c0d0d1e11a1d51a7fb0ce8746668046f
Delegated to: Simon Glass
Headers show
Series bootstage: TPL and SPL improvements | expand

Commit Message

Simon Glass Oct. 21, 2019, 11:26 p.m. UTC
Make sure that the bloblist starts on an aligned boundary. This protects
against one of the early allocating causing the alignment to be lost.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v2: None

 common/board_f.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Simon Glass Oct. 29, 2019, 11:21 p.m. UTC | #1
Make sure that the bloblist starts on an aligned boundary. This protects
against one of the early allocating causing the alignment to be lost.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v2: None

 common/board_f.c | 1 +
 1 file changed, 1 insertion(+)

Applied to u-boot-dm, thanks!
diff mbox series

Patch

diff --git a/common/board_f.c b/common/board_f.c
index 591f18f391e..4852a3b0d84 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -588,6 +588,7 @@  static int reserve_stacks(void)
 static int reserve_bloblist(void)
 {
 #ifdef CONFIG_BLOBLIST
+	gd->start_addr_sp &= ~0xf;
 	gd->start_addr_sp -= CONFIG_BLOBLIST_SIZE;
 	gd->new_bloblist = map_sysmem(gd->start_addr_sp, CONFIG_BLOBLIST_SIZE);
 #endif