Re: [PATCH 1/3] configs: stm32mp1: stm32mp1: Increase SPL malloc() size

2021-04-09 Thread Patrice CHOTARD
Hi Alexandru

On 3/22/21 2:19 PM, Alexandru Gagniuc wrote:
> Since commit 03f1f78a9b44 ("spl: fit: Prefer a malloc()'d buffer for
> loading images"), FIT images must be malloc()'d before being loaded.
> The old size of 1 MiB is suitable for FIT images with u-boot and an
> FDT, but something containing a linux kernel is almost sure to fail.
> 
> It's safe to extend malloc all the way to 0xc200, but no further.
> Linux likes to be loaded at 0xc200, so we use that as our cutoff
> point. This gives us 29 MiB of malloc() space, which suited for more
> complex FIT images including several DTBs, kernel, and OP-TEE images.
> 
> Signed-off-by: Alexandru Gagniuc 
> ---
>  include/configs/stm32mp1.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/configs/stm32mp1.h b/include/configs/stm32mp1.h
> index db2117a3d7..7fdb3ffce4 100644
> --- a/include/configs/stm32mp1.h
> +++ b/include/configs/stm32mp1.h
> @@ -53,7 +53,7 @@
>  #define CONFIG_SPL_BSS_START_ADDR0xC020
>  #define CONFIG_SPL_BSS_MAX_SIZE  0x0010
>  #define CONFIG_SYS_SPL_MALLOC_START  0xC030
> -#define CONFIG_SYS_SPL_MALLOC_SIZE   0x0010
> +#define CONFIG_SYS_SPL_MALLOC_SIZE   0x01D0
>  
>  /* limit SYSRAM usage to first 128 KB */
>  #define CONFIG_SPL_MAX_SIZE  0x0002
> 

Applied to u-boot-stm/master

Thanks
Patrice


Re: [PATCH 1/3] configs: stm32mp1: stm32mp1: Increase SPL malloc() size

2021-04-07 Thread Patrick DELAUNAY

Hi,

On 3/22/21 2:19 PM, Alexandru Gagniuc wrote:

Since commit 03f1f78a9b44 ("spl: fit: Prefer a malloc()'d buffer for
loading images"), FIT images must be malloc()'d before being loaded.
The old size of 1 MiB is suitable for FIT images with u-boot and an
FDT, but something containing a linux kernel is almost sure to fail.

It's safe to extend malloc all the way to 0xc200, but no further.
Linux likes to be loaded at 0xc200, so we use that as our cutoff
point. This gives us 29 MiB of malloc() space, which suited for more
complex FIT images including several DTBs, kernel, and OP-TEE images.

Signed-off-by: Alexandru Gagniuc 
---
  include/configs/stm32mp1.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/configs/stm32mp1.h b/include/configs/stm32mp1.h
index db2117a3d7..7fdb3ffce4 100644
--- a/include/configs/stm32mp1.h
+++ b/include/configs/stm32mp1.h
@@ -53,7 +53,7 @@
  #define CONFIG_SPL_BSS_START_ADDR 0xC020
  #define CONFIG_SPL_BSS_MAX_SIZE   0x0010
  #define CONFIG_SYS_SPL_MALLOC_START   0xC030
-#define CONFIG_SYS_SPL_MALLOC_SIZE 0x0010
+#define CONFIG_SYS_SPL_MALLOC_SIZE 0x01D0
  
  /* limit SYSRAM usage to first 128 KB */

  #define CONFIG_SPL_MAX_SIZE   0x0002



Reviewed-by: Patrick Delaunay 

Thanks
Patrick



Re: [PATCH 1/3] configs: stm32mp1: stm32mp1: Increase SPL malloc() size

2021-03-26 Thread Patrice CHOTARD
Hi Alexandru

On 3/22/21 2:19 PM, Alexandru Gagniuc wrote:
> Since commit 03f1f78a9b44 ("spl: fit: Prefer a malloc()'d buffer for
> loading images"), FIT images must be malloc()'d before being loaded.
> The old size of 1 MiB is suitable for FIT images with u-boot and an
> FDT, but something containing a linux kernel is almost sure to fail.
> 
> It's safe to extend malloc all the way to 0xc200, but no further.
> Linux likes to be loaded at 0xc200, so we use that as our cutoff
> point. This gives us 29 MiB of malloc() space, which suited for more
> complex FIT images including several DTBs, kernel, and OP-TEE images.
> 
> Signed-off-by: Alexandru Gagniuc 
> ---
>  include/configs/stm32mp1.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/configs/stm32mp1.h b/include/configs/stm32mp1.h
> index db2117a3d7..7fdb3ffce4 100644
> --- a/include/configs/stm32mp1.h
> +++ b/include/configs/stm32mp1.h
> @@ -53,7 +53,7 @@
>  #define CONFIG_SPL_BSS_START_ADDR0xC020
>  #define CONFIG_SPL_BSS_MAX_SIZE  0x0010
>  #define CONFIG_SYS_SPL_MALLOC_START  0xC030
> -#define CONFIG_SYS_SPL_MALLOC_SIZE   0x0010
> +#define CONFIG_SYS_SPL_MALLOC_SIZE   0x01D0
>  
>  /* limit SYSRAM usage to first 128 KB */
>  #define CONFIG_SPL_MAX_SIZE  0x0002
> 

Reviewed-by: Patrice Chotard 

Thanks
Patrice


[PATCH 1/3] configs: stm32mp1: stm32mp1: Increase SPL malloc() size

2021-03-22 Thread Alexandru Gagniuc
Since commit 03f1f78a9b44 ("spl: fit: Prefer a malloc()'d buffer for
loading images"), FIT images must be malloc()'d before being loaded.
The old size of 1 MiB is suitable for FIT images with u-boot and an
FDT, but something containing a linux kernel is almost sure to fail.

It's safe to extend malloc all the way to 0xc200, but no further.
Linux likes to be loaded at 0xc200, so we use that as our cutoff
point. This gives us 29 MiB of malloc() space, which suited for more
complex FIT images including several DTBs, kernel, and OP-TEE images.

Signed-off-by: Alexandru Gagniuc 
---
 include/configs/stm32mp1.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/configs/stm32mp1.h b/include/configs/stm32mp1.h
index db2117a3d7..7fdb3ffce4 100644
--- a/include/configs/stm32mp1.h
+++ b/include/configs/stm32mp1.h
@@ -53,7 +53,7 @@
 #define CONFIG_SPL_BSS_START_ADDR  0xC020
 #define CONFIG_SPL_BSS_MAX_SIZE0x0010
 #define CONFIG_SYS_SPL_MALLOC_START0xC030
-#define CONFIG_SYS_SPL_MALLOC_SIZE 0x0010
+#define CONFIG_SYS_SPL_MALLOC_SIZE 0x01D0
 
 /* limit SYSRAM usage to first 128 KB */
 #define CONFIG_SPL_MAX_SIZE0x0002
-- 
2.26.2