* [U-Boot] [PATCH v2] imx: Use a convenient default value for SYS_MALLOC_F_LEN
@ 2019-05-03 17:05 Fabio Estevam
2019-05-03 17:19 ` Pierre-Jean Texier
` (6 more replies)
0 siblings, 7 replies; 9+ messages in thread
From: Fabio Estevam @ 2019-05-03 17:05 UTC (permalink / raw)
To: u-boot
Commit 3a7c45f6a772 ("simple-bus: add DM_FLAG_PRE_RELOC flag to
simple-bus driver") causes some i.MX boards that were converted
to DM, such as warp7, to fail to boot.
As explained by Lukas Auer:
"With the patch, U-Boot probes the drivers for devices under simple-bus
device tree nodes in the pre-relocation device model. The default value
of CONFIG_SYS_MALLOC_F_LEN (0x400) leaves U-Boot with not enough memory to
do this, causing it to hang."
Fix this problem by providing a convenient default value for
CONFIG_SYS_MALLOC_F_LEN.
Reported-by: Pierre-Jean Texier <pjtexier@koncepto.io>
Suggested-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
Changes since v1:
- Move the default setting to the main Kconfig and make it depend
on i.MX
Kconfig | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Kconfig b/Kconfig
index 7a5491bd67..fd4ff42c17 100644
--- a/Kconfig
+++ b/Kconfig
@@ -138,6 +138,8 @@ config SYS_MALLOC_F_LEN
depends on SYS_MALLOC_F
default 0x1000 if AM33XX
default 0x2800 if SANDBOX
+ default 0x2000 if (ARCH_IMX8 || ARCH_IMX8M || ARCH_MX7 || \
+ ARCH_MX7ULP || ARCH_MX6 || ARCH_MX5)
default 0x400
help
Before relocation, memory is very limited on many platforms. Still,
--
2.17.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH v2] imx: Use a convenient default value for SYS_MALLOC_F_LEN
2019-05-03 17:05 [U-Boot] [PATCH v2] imx: Use a convenient default value for SYS_MALLOC_F_LEN Fabio Estevam
@ 2019-05-03 17:19 ` Pierre-Jean Texier
2019-05-03 17:27 ` Joris OFFOUGA
2019-05-03 17:28 ` Joris OFFOUGA
` (5 subsequent siblings)
6 siblings, 1 reply; 9+ messages in thread
From: Pierre-Jean Texier @ 2019-05-03 17:19 UTC (permalink / raw)
To: u-boot
Hi Fabio,
Le 03/05/2019 à 19:05, Fabio Estevam a écrit :
> Commit 3a7c45f6a772 ("simple-bus: add DM_FLAG_PRE_RELOC flag to
> simple-bus driver") causes some i.MX boards that were converted
> to DM, such as warp7, to fail to boot.
>
> As explained by Lukas Auer:
>
> "With the patch, U-Boot probes the drivers for devices under simple-bus
> device tree nodes in the pre-relocation device model. The default value
> of CONFIG_SYS_MALLOC_F_LEN (0x400) leaves U-Boot with not enough memory to
> do this, causing it to hang."
>
> Fix this problem by providing a convenient default value for
> CONFIG_SYS_MALLOC_F_LEN.
>
> Reported-by: Pierre-Jean Texier <pjtexier@koncepto.io>
> Suggested-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
> ---
> Changes since v1:
> - Move the default setting to the main Kconfig and make it depend
> on i.MX
>
> Kconfig | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/Kconfig b/Kconfig
> index 7a5491bd67..fd4ff42c17 100644
> --- a/Kconfig
> +++ b/Kconfig
> @@ -138,6 +138,8 @@ config SYS_MALLOC_F_LEN
> depends on SYS_MALLOC_F
> default 0x1000 if AM33XX
> default 0x2800 if SANDBOX
> + default 0x2000 if (ARCH_IMX8 || ARCH_IMX8M || ARCH_MX7 || \
> + ARCH_MX7ULP || ARCH_MX6 || ARCH_MX5)
> default 0x400
> help
> Before relocation, memory is very limited on many platforms. Still,
Tested-by: Pierre-Jean Texier <pjtexier@koncepto.io>
Thanks
Pierre-Jean
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH v2] imx: Use a convenient default value for SYS_MALLOC_F_LEN
2019-05-03 17:19 ` Pierre-Jean Texier
@ 2019-05-03 17:27 ` Joris OFFOUGA
0 siblings, 0 replies; 9+ messages in thread
From: Joris OFFOUGA @ 2019-05-03 17:27 UTC (permalink / raw)
To: u-boot
Hi Fabio,
Tested-by Joris Offouga <offougajoris@gmail.com>
BR,
Joris
Le ven. 3 mai 2019 à 19:20, Pierre-Jean Texier <pjtexier@koncepto.io> a
écrit :
> Hi Fabio,
>
> Le 03/05/2019 à 19:05, Fabio Estevam a écrit :
> > Commit 3a7c45f6a772 ("simple-bus: add DM_FLAG_PRE_RELOC flag to
> > simple-bus driver") causes some i.MX boards that were converted
> > to DM, such as warp7, to fail to boot.
> >
> > As explained by Lukas Auer:
> >
> > "With the patch, U-Boot probes the drivers for devices under simple-bus
> > device tree nodes in the pre-relocation device model. The default value
> > of CONFIG_SYS_MALLOC_F_LEN (0x400) leaves U-Boot with not enough memory
> to
> > do this, causing it to hang."
> >
> > Fix this problem by providing a convenient default value for
> > CONFIG_SYS_MALLOC_F_LEN.
> >
> > Reported-by: Pierre-Jean Texier <pjtexier@koncepto.io>
> > Suggested-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
> > Signed-off-by: Fabio Estevam <festevam@gmail.com>
> > ---
> > Changes since v1:
> > - Move the default setting to the main Kconfig and make it depend
> > on i.MX
> >
> > Kconfig | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/Kconfig b/Kconfig
> > index 7a5491bd67..fd4ff42c17 100644
> > --- a/Kconfig
> > +++ b/Kconfig
> > @@ -138,6 +138,8 @@ config SYS_MALLOC_F_LEN
> > depends on SYS_MALLOC_F
> > default 0x1000 if AM33XX
> > default 0x2800 if SANDBOX
> > + default 0x2000 if (ARCH_IMX8 || ARCH_IMX8M || ARCH_MX7 || \
> > + ARCH_MX7ULP || ARCH_MX6 || ARCH_MX5)
> > default 0x400
> > help
> > Before relocation, memory is very limited on many platforms.
> Still,
>
>
> Tested-by: Pierre-Jean Texier <pjtexier@koncepto.io>
>
>
> Thanks
>
> Pierre-Jean
>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH v2] imx: Use a convenient default value for SYS_MALLOC_F_LEN
2019-05-03 17:05 [U-Boot] [PATCH v2] imx: Use a convenient default value for SYS_MALLOC_F_LEN Fabio Estevam
2019-05-03 17:19 ` Pierre-Jean Texier
@ 2019-05-03 17:28 ` Joris OFFOUGA
2019-05-03 18:09 ` Bryan O'Donoghue
` (4 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Joris OFFOUGA @ 2019-05-03 17:28 UTC (permalink / raw)
To: u-boot
Hi Fabio
Tested-by Joris Offouga <offougajoris@gmail.com >
BR
Joris
Le ven. 3 mai 2019 à 19:05, Fabio Estevam <festevam@gmail.com> a écrit :
> Commit 3a7c45f6a772 ("simple-bus: add DM_FLAG_PRE_RELOC flag to
> simple-bus driver") causes some i.MX boards that were converted
> to DM, such as warp7, to fail to boot.
>
> As explained by Lukas Auer:
>
> "With the patch, U-Boot probes the drivers for devices under simple-bus
> device tree nodes in the pre-relocation device model. The default value
> of CONFIG_SYS_MALLOC_F_LEN (0x400) leaves U-Boot with not enough memory to
> do this, causing it to hang."
>
> Fix this problem by providing a convenient default value for
> CONFIG_SYS_MALLOC_F_LEN.
>
> Reported-by: Pierre-Jean Texier <pjtexier@koncepto.io>
> Suggested-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
> ---
> Changes since v1:
> - Move the default setting to the main Kconfig and make it depend
> on i.MX
>
> Kconfig | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/Kconfig b/Kconfig
> index 7a5491bd67..fd4ff42c17 100644
> --- a/Kconfig
> +++ b/Kconfig
> @@ -138,6 +138,8 @@ config SYS_MALLOC_F_LEN
> depends on SYS_MALLOC_F
> default 0x1000 if AM33XX
> default 0x2800 if SANDBOX
> + default 0x2000 if (ARCH_IMX8 || ARCH_IMX8M || ARCH_MX7 || \
> + ARCH_MX7ULP || ARCH_MX6 || ARCH_MX5)
> default 0x400
> help
> Before relocation, memory is very limited on many platforms.
> Still,
> --
> 2.17.1
>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH v2] imx: Use a convenient default value for SYS_MALLOC_F_LEN
2019-05-03 17:05 [U-Boot] [PATCH v2] imx: Use a convenient default value for SYS_MALLOC_F_LEN Fabio Estevam
2019-05-03 17:19 ` Pierre-Jean Texier
2019-05-03 17:28 ` Joris OFFOUGA
@ 2019-05-03 18:09 ` Bryan O'Donoghue
2019-05-03 21:52 ` Auer, Lukas
` (3 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Bryan O'Donoghue @ 2019-05-03 18:09 UTC (permalink / raw)
To: u-boot
On 03/05/2019 18:05, Fabio Estevam wrote:
> Commit 3a7c45f6a772 ("simple-bus: add DM_FLAG_PRE_RELOC flag to
> simple-bus driver") causes some i.MX boards that were converted
> to DM, such as warp7, to fail to boot.
>
> As explained by Lukas Auer:
>
> "With the patch, U-Boot probes the drivers for devices under simple-bus
> device tree nodes in the pre-relocation device model. The default value
> of CONFIG_SYS_MALLOC_F_LEN (0x400) leaves U-Boot with not enough memory to
> do this, causing it to hang."
>
> Fix this problem by providing a convenient default value for
> CONFIG_SYS_MALLOC_F_LEN.
>
> Reported-by: Pierre-Jean Texier <pjtexier@koncepto.io>
> Suggested-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
Good work.
Tested: warp7_bl33, warp7
Tested-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH v2] imx: Use a convenient default value for SYS_MALLOC_F_LEN
2019-05-03 17:05 [U-Boot] [PATCH v2] imx: Use a convenient default value for SYS_MALLOC_F_LEN Fabio Estevam
` (2 preceding siblings ...)
2019-05-03 18:09 ` Bryan O'Donoghue
@ 2019-05-03 21:52 ` Auer, Lukas
2019-05-05 4:12 ` Peng Fan
` (2 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Auer, Lukas @ 2019-05-03 21:52 UTC (permalink / raw)
To: u-boot
On Fri, 2019-05-03 at 14:05 -0300, Fabio Estevam wrote:
> Commit 3a7c45f6a772 ("simple-bus: add DM_FLAG_PRE_RELOC flag to
> simple-bus driver") causes some i.MX boards that were converted
> to DM, such as warp7, to fail to boot.
>
> As explained by Lukas Auer:
>
> "With the patch, U-Boot probes the drivers for devices under simple-bus
> device tree nodes in the pre-relocation device model. The default value
> of CONFIG_SYS_MALLOC_F_LEN (0x400) leaves U-Boot with not enough memory to
> do this, causing it to hang."
>
> Fix this problem by providing a convenient default value for
> CONFIG_SYS_MALLOC_F_LEN.
>
> Reported-by: Pierre-Jean Texier <pjtexier@koncepto.io>
> Suggested-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
> ---
> Changes since v1:
> - Move the default setting to the main Kconfig and make it depend
> on i.MX
>
> Kconfig | 2 ++
> 1 file changed, 2 insertions(+)
>
Thank you for sending the patch!
Reviewed-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH v2] imx: Use a convenient default value for SYS_MALLOC_F_LEN
2019-05-03 17:05 [U-Boot] [PATCH v2] imx: Use a convenient default value for SYS_MALLOC_F_LEN Fabio Estevam
` (3 preceding siblings ...)
2019-05-03 21:52 ` Auer, Lukas
@ 2019-05-05 4:12 ` Peng Fan
2019-05-06 12:55 ` Heiko Schocher
2019-06-10 9:49 ` [U-Boot] [PATCH v2] imx: Use a convenient default value for sbabic at denx.de
6 siblings, 0 replies; 9+ messages in thread
From: Peng Fan @ 2019-05-05 4:12 UTC (permalink / raw)
To: u-boot
> -----Original Message-----
> From: Fabio Estevam [mailto:festevam at gmail.com]
> Sent: 2019年5月4日 1:05
> To: sbabic at denx.de
> Cc: dl-uboot-imx <uboot-imx@nxp.com>; u-boot at lists.denx.de;
> pjtexier at koncepto.io; lukas.auer at aisec.fraunhofer.de;
> offougajoris at gmail.com; trini at konsulko.com; Fabio Estevam
> <festevam@gmail.com>
> Subject: [PATCH v2] imx: Use a convenient default value for
> SYS_MALLOC_F_LEN
>
> Commit 3a7c45f6a772 ("simple-bus: add DM_FLAG_PRE_RELOC flag to
> simple-bus driver") causes some i.MX boards that were converted to DM, such
> as warp7, to fail to boot.
>
> As explained by Lukas Auer:
>
> "With the patch, U-Boot probes the drivers for devices under simple-bus
> device tree nodes in the pre-relocation device model. The default value of
> CONFIG_SYS_MALLOC_F_LEN (0x400) leaves U-Boot with not enough
> memory to do this, causing it to hang."
>
> Fix this problem by providing a convenient default value for
> CONFIG_SYS_MALLOC_F_LEN.
>
> Reported-by: Pierre-Jean Texier <pjtexier@koncepto.io>
> Suggested-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
> ---
> Changes since v1:
> - Move the default setting to the main Kconfig and make it depend on i.MX
>
> Kconfig | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/Kconfig b/Kconfig
> index 7a5491bd67..fd4ff42c17 100644
> --- a/Kconfig
> +++ b/Kconfig
> @@ -138,6 +138,8 @@ config SYS_MALLOC_F_LEN
> depends on SYS_MALLOC_F
> default 0x1000 if AM33XX
> default 0x2800 if SANDBOX
> + default 0x2000 if (ARCH_IMX8 || ARCH_IMX8M || ARCH_MX7 || \
> + ARCH_MX7ULP || ARCH_MX6 || ARCH_MX5)
> default 0x400
> help
> Before relocation, memory is very limited on many platforms. Still,
Reviewed-by: Peng Fan <peng.fan@nxp.com>
> --
> 2.17.1
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH v2] imx: Use a convenient default value for SYS_MALLOC_F_LEN
2019-05-03 17:05 [U-Boot] [PATCH v2] imx: Use a convenient default value for SYS_MALLOC_F_LEN Fabio Estevam
` (4 preceding siblings ...)
2019-05-05 4:12 ` Peng Fan
@ 2019-05-06 12:55 ` Heiko Schocher
2019-06-10 9:49 ` [U-Boot] [PATCH v2] imx: Use a convenient default value for sbabic at denx.de
6 siblings, 0 replies; 9+ messages in thread
From: Heiko Schocher @ 2019-05-06 12:55 UTC (permalink / raw)
To: u-boot
Hello Fabio,
Am 03.05.2019 um 19:05 schrieb Fabio Estevam:
> Commit 3a7c45f6a772 ("simple-bus: add DM_FLAG_PRE_RELOC flag to
> simple-bus driver") causes some i.MX boards that were converted
> to DM, such as warp7, to fail to boot.
>
> As explained by Lukas Auer:
>
> "With the patch, U-Boot probes the drivers for devices under simple-bus
> device tree nodes in the pre-relocation device model. The default value
> of CONFIG_SYS_MALLOC_F_LEN (0x400) leaves U-Boot with not enough memory to
> do this, causing it to hang."
>
> Fix this problem by providing a convenient default value for
> CONFIG_SYS_MALLOC_F_LEN.
>
> Reported-by: Pierre-Jean Texier <pjtexier@koncepto.io>
> Suggested-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
> ---
> Changes since v1:
> - Move the default setting to the main Kconfig and make it depend
> on i.MX
>
> Kconfig | 2 ++
> 1 file changed, 2 insertions(+)
Thanks for this fix! This solves my issue with patch
[PATCH] simple-bus: add DM_FLAG_PRE_RELOC flag to simple-bus driver
on a not yet mainlined imx6ull based board.
Tested-by: Heiko Schocher <hs@denx.de>
bye,
Heiko
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: hs at denx.de
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH v2] imx: Use a convenient default value for
2019-05-03 17:05 [U-Boot] [PATCH v2] imx: Use a convenient default value for SYS_MALLOC_F_LEN Fabio Estevam
` (5 preceding siblings ...)
2019-05-06 12:55 ` Heiko Schocher
@ 2019-06-10 9:49 ` sbabic at denx.de
6 siblings, 0 replies; 9+ messages in thread
From: sbabic at denx.de @ 2019-06-10 9:49 UTC (permalink / raw)
To: u-boot
> Commit 3a7c45f6a772 ("simple-bus: add DM_FLAG_PRE_RELOC flag to
> simple-bus driver") causes some i.MX boards that were converted
> to DM, such as warp7, to fail to boot.
> As explained by Lukas Auer:
> "With the patch, U-Boot probes the drivers for devices under simple-bus
> device tree nodes in the pre-relocation device model. The default value
> of CONFIG_SYS_MALLOC_F_LEN (0x400) leaves U-Boot with not enough memory to
> do this, causing it to hang."
> Fix this problem by providing a convenient default value for
> CONFIG_SYS_MALLOC_F_LEN.
> Reported-by: Pierre-Jean Texier <pjtexier@koncepto.io>
> Suggested-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
> Tested-by: Pierre-Jean Texier <pjtexier@koncepto.io>
> Tested-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> Reviewed-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
> Reviewed-by: Peng Fan <peng.fan@nxp.com>
> Tested-by: Heiko Schocher <hs@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 at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2019-06-10 9:49 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-03 17:05 [U-Boot] [PATCH v2] imx: Use a convenient default value for SYS_MALLOC_F_LEN Fabio Estevam
2019-05-03 17:19 ` Pierre-Jean Texier
2019-05-03 17:27 ` Joris OFFOUGA
2019-05-03 17:28 ` Joris OFFOUGA
2019-05-03 18:09 ` Bryan O'Donoghue
2019-05-03 21:52 ` Auer, Lukas
2019-05-05 4:12 ` Peng Fan
2019-05-06 12:55 ` Heiko Schocher
2019-06-10 9:49 ` [U-Boot] [PATCH v2] imx: Use a convenient default value for sbabic at denx.de
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox