summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikhil M Jain <n-jain1@ti.com>2023-07-18 14:27:27 +0530
committerTom Rini <trini@konsulko.com>2023-07-21 15:32:12 -0400
commit149fb05b8346e6ac37df594ef0427cecff09053c (patch)
treeb786a66c445064536d6ccfa1d966a36a975e3909
parentefda93c6b5aa57f06a8abda0626954cdc670320a (diff)
common: spl: spl: Update stack pointer address
At SPL stage when stack is relocated, the stack pointer needs to be updated, the stack pointer may point to stack in on chip memory even though stack is relocated. Signed-off-by: Nikhil M Jain <n-jain1@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
-rw-r--r--common/spl/spl.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/common/spl/spl.c b/common/spl/spl.c
index d74acec10b5..d45dd1c923e 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -992,6 +992,7 @@ ulong spl_relocate_stack_gd(void)
#endif
/* Get stack position: use 8-byte alignment for ABI compliance */
ptr = CONFIG_SPL_STACK_R_ADDR - roundup(sizeof(gd_t),16);
+ gd->start_addr_sp = ptr;
new_gd = (gd_t *)ptr;
memcpy(new_gd, (void *)gd, sizeof(gd_t));
#if CONFIG_IS_ENABLED(DM)