From: Patrick Delaunay <patrick.delau...@foss.st.com>

Since SYS_MALLOC_F_LEN increasing to 0x2100000 on STM32MP13, the
pre-console buffer is overlapped by stack (0xC0400000 + 0x2100000),
so the this buffer must be moved just before the bootstage to avoid issue.

After this patch the pre-relocation memory mapping for STM32MP13x is:

C3000000        = Bootstage     CONFIG_BOOTSTAGE_STASH_ADDR
C2FFF000        = PreConsole    CONFIG_PRE_CON_BUF_ADDR
           with size CONFIG_PRE_CON_BUF_SZ = 4096
C0400000        = start for stack       with CONFIG_CUSTOM_SYS_INIT_SP_ADDR
           including CONFIG_SYS_MALLOC_F_LEN
C0000000        = Load Address of U-Boot        with CONFIG_TEXT_BASE

Fixes: 93c962c7af7e ("configs: stm32mp13: increase SYS_MALLOC_F_LEN to 
0x210000")
Signed-off-by: Patrick Delaunay <patrick.delau...@foss.st.com>
Signed-off-by: Patrice Chotard <patrice.chot...@foss.st.com>
---

 arch/arm/mach-stm32mp/Kconfig.13x | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-stm32mp/Kconfig.13x 
b/arch/arm/mach-stm32mp/Kconfig.13x
index bc8b3f8cf77..fe323307e47 100644
--- a/arch/arm/mach-stm32mp/Kconfig.13x
+++ b/arch/arm/mach-stm32mp/Kconfig.13x
@@ -23,7 +23,7 @@ config TEXT_BASE
        default 0xC0000000
 
 config PRE_CON_BUF_ADDR
-       default 0xC0800000
+       default 0xC2FFF000
 
 config PRE_CON_BUF_SZ
        default 4096
-- 
2.25.1

base-commit: 1cd94edf3005c851a6b487be6e35dd6c3205f916
branch: fix_PRE_CON_ADDR

Reply via email to