diff mbox series

[v2,2/7] configs: stm32f769-disco: Fix SPL boot

Message ID 20220920160436.117811-3-patrice.chotard@foss.st.com
State Accepted
Commit c8b577ce829191ec61a785f816453de184253635
Delegated to: Patrick Delaunay
Headers show
Series SPL fixes for STM32F7 MCUs | expand

Commit Message

Patrice CHOTARD Sept. 20, 2022, 4:04 p.m. UTC
Commit 'b4b9a00ed593 ("Convert CONFIG_SYS_SPL_ARGS_ADDR to Kconfig")'
replaces CONFIG_SYS_FDT_BASE by CONFIG_SYS_SPL_ARGS_ADDR.
As CONFIG_SYS_SPL_ARGS_ADDR enables additional code when enable, it
increases SPL size over the initial 0x8000 limit.
Increase the SPL size to 0x9000 to fix SPL boot.
Set SPL_SIZE_LIMIT to 0x9000 to avoid similar issue in the future.

Fixes 'b4b9a00ed593 ("Convert CONFIG_SYS_SPL_ARGS_ADDR to Kconfig")'

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
---

(no changes since v1)

 configs/stm32f769-disco_spl_defconfig | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

Comments

Patrick Delaunay Sept. 26, 2022, 12:57 p.m. UTC | #1
Hi,

On 9/20/22 18:04, Patrice Chotard wrote:
> Commit 'b4b9a00ed593 ("Convert CONFIG_SYS_SPL_ARGS_ADDR to Kconfig")'
> replaces CONFIG_SYS_FDT_BASE by CONFIG_SYS_SPL_ARGS_ADDR.
> As CONFIG_SYS_SPL_ARGS_ADDR enables additional code when enable, it
> increases SPL size over the initial 0x8000 limit.
> Increase the SPL size to 0x9000 to fix SPL boot.
> Set SPL_SIZE_LIMIT to 0x9000 to avoid similar issue in the future.
>
> Fixes 'b4b9a00ed593 ("Convert CONFIG_SYS_SPL_ARGS_ADDR to Kconfig")'
>
> Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
> ---
>
> (no changes since v1)
>
>   configs/stm32f769-disco_spl_defconfig | 7 ++++---
>   1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/configs/stm32f769-disco_spl_defconfig b/configs/stm32f769-disco_spl_defconfig
> index 19d2c24abb..b56d88f9f6 100644
> --- a/configs/stm32f769-disco_spl_defconfig
> +++ b/configs/stm32f769-disco_spl_defconfig
> @@ -1,6 +1,6 @@
>   CONFIG_ARM=y
>   CONFIG_ARCH_STM32=y
> -CONFIG_SYS_TEXT_BASE=0x08008000
> +CONFIG_SYS_TEXT_BASE=0x08009000
>   CONFIG_SYS_MALLOC_LEN=0x100000
>   CONFIG_SYS_MALLOC_F_LEN=0xE00
>   CONFIG_SPL_GPIO=y
> @@ -13,10 +13,11 @@ CONFIG_SPL_TEXT_BASE=0x8000000
>   CONFIG_SYS_PROMPT="U-Boot > "
>   CONFIG_SPL_SERIAL=y
>   CONFIG_SPL_DRIVERS_MISC=y
> +CONFIG_SPL_SIZE_LIMIT=0x9000
>   CONFIG_STM32F7=y
>   CONFIG_TARGET_STM32F746_DISCO=y
>   CONFIG_SPL=y
> -CONFIG_SYS_LOAD_ADDR=0x8008000
> +CONFIG_SYS_LOAD_ADDR=0x8009000
>   CONFIG_BUILD_TARGET="u-boot-with-spl.bin"
>   CONFIG_DISTRO_DEFAULTS=y
>   CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
> @@ -28,7 +29,7 @@ CONFIG_AUTOBOOT_STOP_STR=" "
>   CONFIG_USE_BOOTARGS=y
>   CONFIG_BOOTARGS="console=ttyS0,115200 earlyprintk consoleblank=0 ignore_loglevel"
>   # CONFIG_DISPLAY_CPUINFO is not set
> -CONFIG_SPL_PAD_TO=0x8000
> +CONFIG_SPL_PAD_TO=0x9000
>   CONFIG_SPL_NO_BSS_LIMIT=y
>   CONFIG_SPL_BOARD_INIT=y
>   CONFIG_SPL_SYS_MALLOC_SIMPLE=y


Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>

Thanks
Patrick
Patrice CHOTARD Sept. 26, 2022, 3:56 p.m. UTC | #2
On 9/26/22 14:57, Patrick DELAUNAY wrote:
> Hi,
> 
> On 9/20/22 18:04, Patrice Chotard wrote:
>> Commit 'b4b9a00ed593 ("Convert CONFIG_SYS_SPL_ARGS_ADDR to Kconfig")'
>> replaces CONFIG_SYS_FDT_BASE by CONFIG_SYS_SPL_ARGS_ADDR.
>> As CONFIG_SYS_SPL_ARGS_ADDR enables additional code when enable, it
>> increases SPL size over the initial 0x8000 limit.
>> Increase the SPL size to 0x9000 to fix SPL boot.
>> Set SPL_SIZE_LIMIT to 0x9000 to avoid similar issue in the future.
>>
>> Fixes 'b4b9a00ed593 ("Convert CONFIG_SYS_SPL_ARGS_ADDR to Kconfig")'
>>
>> Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
>> ---
>>
>> (no changes since v1)
>>
>>   configs/stm32f769-disco_spl_defconfig | 7 ++++---
>>   1 file changed, 4 insertions(+), 3 deletions(-)
>>
>> diff --git a/configs/stm32f769-disco_spl_defconfig b/configs/stm32f769-disco_spl_defconfig
>> index 19d2c24abb..b56d88f9f6 100644
>> --- a/configs/stm32f769-disco_spl_defconfig
>> +++ b/configs/stm32f769-disco_spl_defconfig
>> @@ -1,6 +1,6 @@
>>   CONFIG_ARM=y
>>   CONFIG_ARCH_STM32=y
>> -CONFIG_SYS_TEXT_BASE=0x08008000
>> +CONFIG_SYS_TEXT_BASE=0x08009000
>>   CONFIG_SYS_MALLOC_LEN=0x100000
>>   CONFIG_SYS_MALLOC_F_LEN=0xE00
>>   CONFIG_SPL_GPIO=y
>> @@ -13,10 +13,11 @@ CONFIG_SPL_TEXT_BASE=0x8000000
>>   CONFIG_SYS_PROMPT="U-Boot > "
>>   CONFIG_SPL_SERIAL=y
>>   CONFIG_SPL_DRIVERS_MISC=y
>> +CONFIG_SPL_SIZE_LIMIT=0x9000
>>   CONFIG_STM32F7=y
>>   CONFIG_TARGET_STM32F746_DISCO=y
>>   CONFIG_SPL=y
>> -CONFIG_SYS_LOAD_ADDR=0x8008000
>> +CONFIG_SYS_LOAD_ADDR=0x8009000
>>   CONFIG_BUILD_TARGET="u-boot-with-spl.bin"
>>   CONFIG_DISTRO_DEFAULTS=y
>>   CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
>> @@ -28,7 +29,7 @@ CONFIG_AUTOBOOT_STOP_STR=" "
>>   CONFIG_USE_BOOTARGS=y
>>   CONFIG_BOOTARGS="console=ttyS0,115200 earlyprintk consoleblank=0 ignore_loglevel"
>>   # CONFIG_DISPLAY_CPUINFO is not set
>> -CONFIG_SPL_PAD_TO=0x8000
>> +CONFIG_SPL_PAD_TO=0x9000
>>   CONFIG_SPL_NO_BSS_LIMIT=y
>>   CONFIG_SPL_BOARD_INIT=y
>>   CONFIG_SPL_SYS_MALLOC_SIMPLE=y
> 
> 
> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
> 
> Thanks
> Patrick
> 
Applied to u-boot-stm32/next

Thanks
diff mbox series

Patch

diff --git a/configs/stm32f769-disco_spl_defconfig b/configs/stm32f769-disco_spl_defconfig
index 19d2c24abb..b56d88f9f6 100644
--- a/configs/stm32f769-disco_spl_defconfig
+++ b/configs/stm32f769-disco_spl_defconfig
@@ -1,6 +1,6 @@ 
 CONFIG_ARM=y
 CONFIG_ARCH_STM32=y
-CONFIG_SYS_TEXT_BASE=0x08008000
+CONFIG_SYS_TEXT_BASE=0x08009000
 CONFIG_SYS_MALLOC_LEN=0x100000
 CONFIG_SYS_MALLOC_F_LEN=0xE00
 CONFIG_SPL_GPIO=y
@@ -13,10 +13,11 @@  CONFIG_SPL_TEXT_BASE=0x8000000
 CONFIG_SYS_PROMPT="U-Boot > "
 CONFIG_SPL_SERIAL=y
 CONFIG_SPL_DRIVERS_MISC=y
+CONFIG_SPL_SIZE_LIMIT=0x9000
 CONFIG_STM32F7=y
 CONFIG_TARGET_STM32F746_DISCO=y
 CONFIG_SPL=y
-CONFIG_SYS_LOAD_ADDR=0x8008000
+CONFIG_SYS_LOAD_ADDR=0x8009000
 CONFIG_BUILD_TARGET="u-boot-with-spl.bin"
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
@@ -28,7 +29,7 @@  CONFIG_AUTOBOOT_STOP_STR=" "
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="console=ttyS0,115200 earlyprintk consoleblank=0 ignore_loglevel"
 # CONFIG_DISPLAY_CPUINFO is not set
-CONFIG_SPL_PAD_TO=0x8000
+CONFIG_SPL_PAD_TO=0x9000
 CONFIG_SPL_NO_BSS_LIMIT=y
 CONFIG_SPL_BOARD_INIT=y
 CONFIG_SPL_SYS_MALLOC_SIMPLE=y