diff mbox series

[2/3] configs: stm32mp1: Remove misleading CONFIG_SPL_BSS_START_ADDR

Message ID 20210322132001.1637567-2-mr.nuke.me@gmail.com
State Accepted
Commit bbe10c70a2f4f055410c857c5a54625bf53ce70c
Delegated to: Patrice Chotard
Headers show
Series [1/3] configs: stm32mp1: stm32mp1: Increase SPL malloc() size | expand

Commit Message

Alexandru Gagniuc March 22, 2021, 1:20 p.m. UTC
CONFIG_SPL_BSS_START_ADDR is only used on a few mach- linker scripts.
stm32mp1 uses the generic script under arch/arm/cpu/u-boot-spl.lds,
which does not make use of this definition.

The SPL BSS starts in SRAM, right after .text, .rodata, .data, and
.u_boot_list. A very short version of the STM32MP1 memory map is:
  * SYSRAM: 2ffc0000 - 30000000     <- all of SPL is here
  * DRAM:   c0000000+

0xC0200000 is a DRAM address, and has nothing to do with SPL. It is
just very misleading to have it next to CONFIG_SPL_BSS_MAX_SIZE, or to
have it at all.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
---
 include/configs/stm32mp1.h | 1 -
 1 file changed, 1 deletion(-)

Comments

Patrice CHOTARD March 26, 2021, 3:13 p.m. UTC | #1
Hi Alexandru

On 3/22/21 2:20 PM, Alexandru Gagniuc wrote:
> CONFIG_SPL_BSS_START_ADDR is only used on a few mach- linker scripts.
> stm32mp1 uses the generic script under arch/arm/cpu/u-boot-spl.lds,
> which does not make use of this definition.
> 
> The SPL BSS starts in SRAM, right after .text, .rodata, .data, and
> .u_boot_list. A very short version of the STM32MP1 memory map is:
>   * SYSRAM: 2ffc0000 - 30000000     <- all of SPL is here
>   * DRAM:   c0000000+
> 
> 0xC0200000 is a DRAM address, and has nothing to do with SPL. It is
> just very misleading to have it next to CONFIG_SPL_BSS_MAX_SIZE, or to
> have it at all.
> 
> Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
> ---
>  include/configs/stm32mp1.h | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/include/configs/stm32mp1.h b/include/configs/stm32mp1.h
> index 7fdb3ffce4..56a70cb584 100644
> --- a/include/configs/stm32mp1.h
> +++ b/include/configs/stm32mp1.h
> @@ -50,7 +50,6 @@
>  /* SPL support */
>  #ifdef CONFIG_SPL
>  /* SPL use DDR */
> -#define CONFIG_SPL_BSS_START_ADDR	0xC0200000
>  #define CONFIG_SPL_BSS_MAX_SIZE		0x00100000
>  #define CONFIG_SYS_SPL_MALLOC_START	0xC0300000
>  #define CONFIG_SYS_SPL_MALLOC_SIZE	0x01D00000
> 


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

Thanks
Patrice
Patrick Delaunay April 7, 2021, 9:22 a.m. UTC | #2
Hi,

On 3/22/21 2:20 PM, Alexandru Gagniuc wrote:
> CONFIG_SPL_BSS_START_ADDR is only used on a few mach- linker scripts.
> stm32mp1 uses the generic script under arch/arm/cpu/u-boot-spl.lds,
> which does not make use of this definition.
>
> The SPL BSS starts in SRAM, right after .text, .rodata, .data, and
> .u_boot_list. A very short version of the STM32MP1 memory map is:
>    * SYSRAM: 2ffc0000 - 30000000     <- all of SPL is here
>    * DRAM:   c0000000+
>
> 0xC0200000 is a DRAM address, and has nothing to do with SPL. It is
> just very misleading to have it next to CONFIG_SPL_BSS_MAX_SIZE, or to
> have it at all.
>
> Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
> ---
>   include/configs/stm32mp1.h | 1 -
>   1 file changed, 1 deletion(-)
>
> diff --git a/include/configs/stm32mp1.h b/include/configs/stm32mp1.h
> index 7fdb3ffce4..56a70cb584 100644
> --- a/include/configs/stm32mp1.h
> +++ b/include/configs/stm32mp1.h
> @@ -50,7 +50,6 @@
>   /* SPL support */
>   #ifdef CONFIG_SPL
>   /* SPL use DDR */
> -#define CONFIG_SPL_BSS_START_ADDR	0xC0200000
>   #define CONFIG_SPL_BSS_MAX_SIZE		0x00100000
>   #define CONFIG_SYS_SPL_MALLOC_START	0xC0300000
>   #define CONFIG_SYS_SPL_MALLOC_SIZE	0x01D00000


Strange but agree and CONFIG_SPL_BSS_MAX_SIZE

can be also removed with previous patch.


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

Thanks
Patrick
Patrice CHOTARD April 9, 2021, 9:59 a.m. UTC | #3
Hi Alexandru

On 3/22/21 2:20 PM, Alexandru Gagniuc wrote:
> CONFIG_SPL_BSS_START_ADDR is only used on a few mach- linker scripts.
> stm32mp1 uses the generic script under arch/arm/cpu/u-boot-spl.lds,
> which does not make use of this definition.
> 
> The SPL BSS starts in SRAM, right after .text, .rodata, .data, and
> .u_boot_list. A very short version of the STM32MP1 memory map is:
>   * SYSRAM: 2ffc0000 - 30000000     <- all of SPL is here
>   * DRAM:   c0000000+
> 
> 0xC0200000 is a DRAM address, and has nothing to do with SPL. It is
> just very misleading to have it next to CONFIG_SPL_BSS_MAX_SIZE, or to
> have it at all.
> 
> Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
> ---
>  include/configs/stm32mp1.h | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/include/configs/stm32mp1.h b/include/configs/stm32mp1.h
> index 7fdb3ffce4..56a70cb584 100644
> --- a/include/configs/stm32mp1.h
> +++ b/include/configs/stm32mp1.h
> @@ -50,7 +50,6 @@
>  /* SPL support */
>  #ifdef CONFIG_SPL
>  /* SPL use DDR */
> -#define CONFIG_SPL_BSS_START_ADDR	0xC0200000
>  #define CONFIG_SPL_BSS_MAX_SIZE		0x00100000
>  #define CONFIG_SYS_SPL_MALLOC_START	0xC0300000
>  #define CONFIG_SYS_SPL_MALLOC_SIZE	0x01D00000
> 
Applied to u-boot-stm/master

Thanks
Patrice
diff mbox series

Patch

diff --git a/include/configs/stm32mp1.h b/include/configs/stm32mp1.h
index 7fdb3ffce4..56a70cb584 100644
--- a/include/configs/stm32mp1.h
+++ b/include/configs/stm32mp1.h
@@ -50,7 +50,6 @@ 
 /* SPL support */
 #ifdef CONFIG_SPL
 /* SPL use DDR */
-#define CONFIG_SPL_BSS_START_ADDR	0xC0200000
 #define CONFIG_SPL_BSS_MAX_SIZE		0x00100000
 #define CONFIG_SYS_SPL_MALLOC_START	0xC0300000
 #define CONFIG_SYS_SPL_MALLOC_SIZE	0x01D00000