public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH V2] Kconfig: enlarge CONFIG_SYS_MALLOC_F_LEN
@ 2022-09-15  1:38 Peng Fan (OSS)
  2022-09-15  5:44 ` Heiko Thiery
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Peng Fan (OSS) @ 2022-09-15  1:38 UTC (permalink / raw)
  To: sbabic, festevam, heiko.thiery, trini; +Cc: u-boot, Peng Fan

From: Peng Fan <peng.fan@nxp.com>

"alloc space exhausted" happens in very early stage, which could be seen
with DEBUG_UART options enabled and leeds to an non-functional board.

kontron_pitx_imx8m:
CONFIG_DEBUG_UART_BASE=0x30880000   # for serial3
CONFIG_DEBUG_UART_CLOCK=24000000

imx8mqevk:
CONFIG_DEBUG_UART_BASE=0x30860000      # for uart1
CONFIG_DEBUG_UART_CLOCK=24000000

It is because CONFIG_SYS_MALLOC_F_LEN is too small and still leave
CONFIG_SPL_SYS_MALLOC_F_LEN as 0x2000.

Reported-by: Heiko Thiery <heiko.thiery@gmail.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---

V2:
 set for all i.MX8MQ

 Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Kconfig b/Kconfig
index 991b260182e..c8c22555a94 100644
--- a/Kconfig
+++ b/Kconfig
@@ -299,7 +299,7 @@ config SYS_MALLOC_F_LEN
 	default 0x4000 if SANDBOX || RISCV || ARCH_APPLE || ROCKCHIP_RK3368 || \
 			  ROCKCHIP_RK3399
 	default 0x8000 if RCAR_GEN3
-	default 0x10000 if ARCH_IMX8 || (ARCH_IMX8M && !IMX8MQ)
+	default 0x10000 if ARCH_IMX8 || ARCH_IMX8M
 	default 0x2000
 	help
 	  Before relocation, memory is very limited on many platforms. Still,
@@ -325,6 +325,7 @@ config SPL_SYS_MALLOC_F_LEN
 	depends on SYS_MALLOC_F && SPL
 	default 0 if !SPL_FRAMEWORK
 	default 0x2800 if RCAR_GEN3
+	default 0x2000 if IMX8MQ
 	default SYS_MALLOC_F_LEN
 	help
 	  In SPL memory is very limited on many platforms. Still,
-- 
2.36.0


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

* Re: [PATCH V2] Kconfig: enlarge CONFIG_SYS_MALLOC_F_LEN
  2022-09-15  1:38 [PATCH V2] Kconfig: enlarge CONFIG_SYS_MALLOC_F_LEN Peng Fan (OSS)
@ 2022-09-15  5:44 ` Heiko Thiery
  2022-09-15  9:38 ` Fabio Estevam
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Heiko Thiery @ 2022-09-15  5:44 UTC (permalink / raw)
  To: Peng Fan (OSS); +Cc: sbabic, festevam, trini, u-boot, Peng Fan

Hi,

Am Do., 15. Sept. 2022 um 02:53 Uhr schrieb Peng Fan (OSS)
<peng.fan@oss.nxp.com>:
>
> From: Peng Fan <peng.fan@nxp.com>
>
> "alloc space exhausted" happens in very early stage, which could be seen
> with DEBUG_UART options enabled and leeds to an non-functional board.
>
> kontron_pitx_imx8m:
> CONFIG_DEBUG_UART_BASE=0x30880000   # for serial3
> CONFIG_DEBUG_UART_CLOCK=24000000
>
> imx8mqevk:
> CONFIG_DEBUG_UART_BASE=0x30860000      # for uart1
> CONFIG_DEBUG_UART_CLOCK=24000000
>
> It is because CONFIG_SYS_MALLOC_F_LEN is too small and still leave
> CONFIG_SPL_SYS_MALLOC_F_LEN as 0x2000.
>
> Reported-by: Heiko Thiery <heiko.thiery@gmail.com>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>

Reviewed-by: Heiko Thiery <heiko.thiery@gmail.com>
Tested-by: Heiko Thiery <heiko.thiery@gmail.com>

Tested on:
- kontron-pitx-imx8m
- imx8mq_evk

> ---
>
> V2:
>  set for all i.MX8MQ
>
>  Kconfig | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/Kconfig b/Kconfig
> index 991b260182e..c8c22555a94 100644
> --- a/Kconfig
> +++ b/Kconfig
> @@ -299,7 +299,7 @@ config SYS_MALLOC_F_LEN
>         default 0x4000 if SANDBOX || RISCV || ARCH_APPLE || ROCKCHIP_RK3368 || \
>                           ROCKCHIP_RK3399
>         default 0x8000 if RCAR_GEN3
> -       default 0x10000 if ARCH_IMX8 || (ARCH_IMX8M && !IMX8MQ)
> +       default 0x10000 if ARCH_IMX8 || ARCH_IMX8M
>         default 0x2000
>         help
>           Before relocation, memory is very limited on many platforms. Still,
> @@ -325,6 +325,7 @@ config SPL_SYS_MALLOC_F_LEN
>         depends on SYS_MALLOC_F && SPL
>         default 0 if !SPL_FRAMEWORK
>         default 0x2800 if RCAR_GEN3
> +       default 0x2000 if IMX8MQ
>         default SYS_MALLOC_F_LEN
>         help
>           In SPL memory is very limited on many platforms. Still,
> --
> 2.36.0
>

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

* Re: [PATCH V2] Kconfig: enlarge CONFIG_SYS_MALLOC_F_LEN
  2022-09-15  1:38 [PATCH V2] Kconfig: enlarge CONFIG_SYS_MALLOC_F_LEN Peng Fan (OSS)
  2022-09-15  5:44 ` Heiko Thiery
@ 2022-09-15  9:38 ` Fabio Estevam
  2022-09-17 19:02 ` Heiko Thiery
  2022-09-18 20:41 ` sbabic
  3 siblings, 0 replies; 5+ messages in thread
From: Fabio Estevam @ 2022-09-15  9:38 UTC (permalink / raw)
  To: Peng Fan (OSS); +Cc: sbabic, heiko.thiery, trini, u-boot, Peng Fan

Hi Peng,

On Wed, Sep 14, 2022 at 9:53 PM Peng Fan (OSS) <peng.fan@oss.nxp.com> wrote:
>
> From: Peng Fan <peng.fan@nxp.com>
>
> "alloc space exhausted" happens in very early stage, which could be seen
> with DEBUG_UART options enabled and leeds to an non-functional board.
>
> kontron_pitx_imx8m:
> CONFIG_DEBUG_UART_BASE=0x30880000   # for serial3
> CONFIG_DEBUG_UART_CLOCK=24000000
>
> imx8mqevk:
> CONFIG_DEBUG_UART_BASE=0x30860000      # for uart1
> CONFIG_DEBUG_UART_CLOCK=24000000
>
> It is because CONFIG_SYS_MALLOC_F_LEN is too small and still leave
> CONFIG_SPL_SYS_MALLOC_F_LEN as 0x2000.
>
> Reported-by: Heiko Thiery <heiko.thiery@gmail.com>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>

Thanks for addressing this issue at an SoC level:

Reviewed-by: Fabio Estevam <festevam@denx.de>

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

* Re: [PATCH V2] Kconfig: enlarge CONFIG_SYS_MALLOC_F_LEN
  2022-09-15  1:38 [PATCH V2] Kconfig: enlarge CONFIG_SYS_MALLOC_F_LEN Peng Fan (OSS)
  2022-09-15  5:44 ` Heiko Thiery
  2022-09-15  9:38 ` Fabio Estevam
@ 2022-09-17 19:02 ` Heiko Thiery
  2022-09-18 20:41 ` sbabic
  3 siblings, 0 replies; 5+ messages in thread
From: Heiko Thiery @ 2022-09-17 19:02 UTC (permalink / raw)
  To: Peng Fan (OSS); +Cc: sbabic, festevam, trini, u-boot, Peng Fan

Hi Stefano, Hi Tom,

Am Do., 15. Sept. 2022 um 02:53 Uhr schrieb Peng Fan (OSS)
<peng.fan@oss.nxp.com>:
>
> From: Peng Fan <peng.fan@nxp.com>
>
> "alloc space exhausted" happens in very early stage, which could be seen
> with DEBUG_UART options enabled and leeds to an non-functional board.
>
> kontron_pitx_imx8m:
> CONFIG_DEBUG_UART_BASE=0x30880000   # for serial3
> CONFIG_DEBUG_UART_CLOCK=24000000
>
> imx8mqevk:
> CONFIG_DEBUG_UART_BASE=0x30860000      # for uart1
> CONFIG_DEBUG_UART_CLOCK=24000000
>
> It is because CONFIG_SYS_MALLOC_F_LEN is too small and still leave
> CONFIG_SPL_SYS_MALLOC_F_LEN as 0x2000.
>
> Reported-by: Heiko Thiery <heiko.thiery@gmail.com>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
>
> V2:
>  set for all i.MX8MQ
>
>  Kconfig | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/Kconfig b/Kconfig
> index 991b260182e..c8c22555a94 100644
> --- a/Kconfig
> +++ b/Kconfig
> @@ -299,7 +299,7 @@ config SYS_MALLOC_F_LEN
>         default 0x4000 if SANDBOX || RISCV || ARCH_APPLE || ROCKCHIP_RK3368 || \
>                           ROCKCHIP_RK3399
>         default 0x8000 if RCAR_GEN3
> -       default 0x10000 if ARCH_IMX8 || (ARCH_IMX8M && !IMX8MQ)
> +       default 0x10000 if ARCH_IMX8 || ARCH_IMX8M
>         default 0x2000
>         help
>           Before relocation, memory is very limited on many platforms. Still,
> @@ -325,6 +325,7 @@ config SPL_SYS_MALLOC_F_LEN
>         depends on SYS_MALLOC_F && SPL
>         default 0 if !SPL_FRAMEWORK
>         default 0x2800 if RCAR_GEN3
> +       default 0x2000 if IMX8MQ
>         default SYS_MALLOC_F_LEN
>         help
>           In SPL memory is very limited on many platforms. Still,
> --
> 2.36.0
>

Any chance to get this in the next RC?

Thanks
-- 
Heiko

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

* [PATCH V2] Kconfig: enlarge CONFIG_SYS_MALLOC_F_LEN
  2022-09-15  1:38 [PATCH V2] Kconfig: enlarge CONFIG_SYS_MALLOC_F_LEN Peng Fan (OSS)
                   ` (2 preceding siblings ...)
  2022-09-17 19:02 ` Heiko Thiery
@ 2022-09-18 20:41 ` sbabic
  3 siblings, 0 replies; 5+ messages in thread
From: sbabic @ 2022-09-18 20:41 UTC (permalink / raw)
  To: Peng Fan (OSS), u-boot

> From: Peng Fan <peng.fan@nxp.com>
> "alloc space exhausted" happens in very early stage, which could be seen
> with DEBUG_UART options enabled and leeds to an non-functional board.
> kontron_pitx_imx8m:
> CONFIG_DEBUG_UART_BASE=0x30880000   # for serial3
> CONFIG_DEBUG_UART_CLOCK=24000000
> imx8mqevk:
> CONFIG_DEBUG_UART_BASE=0x30860000      # for uart1
> CONFIG_DEBUG_UART_CLOCK=24000000
> It is because CONFIG_SYS_MALLOC_F_LEN is too small and still leave
> CONFIG_SPL_SYS_MALLOC_F_LEN as 0x2000.
> Reported-by: Heiko Thiery <heiko.thiery@gmail.com>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> Reviewed-by: Heiko Thiery <heiko.thiery@gmail.com>
> Tested-by: Heiko Thiery <heiko.thiery@gmail.com>
> Reviewed-by: Fabio Estevam <festevam@denx.de>
Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de
=====================================================================

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

end of thread, other threads:[~2022-09-18 20:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-15  1:38 [PATCH V2] Kconfig: enlarge CONFIG_SYS_MALLOC_F_LEN Peng Fan (OSS)
2022-09-15  5:44 ` Heiko Thiery
2022-09-15  9:38 ` Fabio Estevam
2022-09-17 19:02 ` Heiko Thiery
2022-09-18 20:41 ` sbabic

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