U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] configs: versal: Fix initial stack pointer
@ 2025-04-07 13:45 Padmarao Begari
  2025-04-08  8:19 ` Michal Simek
  0 siblings, 1 reply; 2+ messages in thread
From: Padmarao Begari @ 2025-04-07 13:45 UTC (permalink / raw)
  To: u-boot; +Cc: git, michal.simek, venkatesh.abbarapu

The mini u-boot is getting exception because of an initial
stack pointer address is used at near the top of memory,
and while executing u-boot is assigned pre-malloc and
global_data memory after initial stack pointer and updated
the stack pointer. Serial driver is used pre-malloc area
for serial operations before relocation. But pre-malloc area
is cleared while doing BSS at relocation time. The u-boot is
called board_init() function and doing printf, relocation serial
driver is not initialized yet, so it is using before relocation
serial operations but it is cleared by BSS and got the exception.
To fix, change an initial stack pointer address from near the
top of memory to near the relocation memory.

Fixes: 685874939a5e ("configs: versal: update initial stack pointer")
Signed-off-by: Padmarao Begari <padmarao.begari@amd.com>
---
 configs/xilinx_versal_mini_ospi_defconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configs/xilinx_versal_mini_ospi_defconfig b/configs/xilinx_versal_mini_ospi_defconfig
index e1cdc186fb4..af9ce499169 100644
--- a/configs/xilinx_versal_mini_ospi_defconfig
+++ b/configs/xilinx_versal_mini_ospi_defconfig
@@ -7,7 +7,7 @@ CONFIG_SYS_MALLOC_LEN=0x2000
 CONFIG_SYS_MALLOC_F_LEN=0x500
 CONFIG_NR_DRAM_BANKS=1
 CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
-CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0xFFFFFE00
+CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0xFFFE1000
 CONFIG_SF_DEFAULT_SPEED=30000000
 CONFIG_ENV_SIZE=0x80
 # CONFIG_DM_GPIO is not set
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] configs: versal: Fix initial stack pointer
  2025-04-07 13:45 [PATCH] configs: versal: Fix initial stack pointer Padmarao Begari
@ 2025-04-08  8:19 ` Michal Simek
  0 siblings, 0 replies; 2+ messages in thread
From: Michal Simek @ 2025-04-08  8:19 UTC (permalink / raw)
  To: Padmarao Begari, u-boot; +Cc: git, venkatesh.abbarapu



On 4/7/25 15:45, Padmarao Begari wrote:
> The mini u-boot is getting exception because of an initial
> stack pointer address is used at near the top of memory,
> and while executing u-boot is assigned pre-malloc and
> global_data memory after initial stack pointer and updated
> the stack pointer. Serial driver is used pre-malloc area
> for serial operations before relocation. But pre-malloc area
> is cleared while doing BSS at relocation time. The u-boot is
> called board_init() function and doing printf, relocation serial
> driver is not initialized yet, so it is using before relocation
> serial operations but it is cleared by BSS and got the exception.
> To fix, change an initial stack pointer address from near the
> top of memory to near the relocation memory.
> 
> Fixes: 685874939a5e ("configs: versal: update initial stack pointer")
> Signed-off-by: Padmarao Begari <padmarao.begari@amd.com>
> ---
>   configs/xilinx_versal_mini_ospi_defconfig | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/configs/xilinx_versal_mini_ospi_defconfig b/configs/xilinx_versal_mini_ospi_defconfig
> index e1cdc186fb4..af9ce499169 100644
> --- a/configs/xilinx_versal_mini_ospi_defconfig
> +++ b/configs/xilinx_versal_mini_ospi_defconfig
> @@ -7,7 +7,7 @@ CONFIG_SYS_MALLOC_LEN=0x2000
>   CONFIG_SYS_MALLOC_F_LEN=0x500
>   CONFIG_NR_DRAM_BANKS=1
>   CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
> -CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0xFFFFFE00
> +CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0xFFFE1000
>   CONFIG_SF_DEFAULT_SPEED=30000000
>   CONFIG_ENV_SIZE=0x80
>   # CONFIG_DM_GPIO is not set

Applied.
M

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-04-08  8:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-07 13:45 [PATCH] configs: versal: Fix initial stack pointer Padmarao Begari
2025-04-08  8:19 ` Michal Simek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox