diff mbox series

[1/9] configs: meson64: permit redefining SYS_MALLOC_LEN

Message ID 20210805151728.422329-2-mkorpershoek@baylibre.com
State Accepted, archived
Commit d5d0296861a9a546e6636fa335b693eb60fd8d59
Delegated to: Neil Armstrong
Headers show
Series meson64_android: Android boot flow using abootimg | expand

Commit Message

Mattijs Korpershoek Aug. 5, 2021, 3:17 p.m. UTC
Permit redefining SYS_MALLOC_LEN for board specific configs.
This is especially useful for Android with AVB, which requires a malloc
length of 128M.

Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
---
 include/configs/meson64.h | 2 ++
 1 file changed, 2 insertions(+)

Comments

Neil Armstrong Aug. 5, 2021, 4:20 p.m. UTC | #1
On 05/08/2021 17:17, Mattijs Korpershoek wrote:
> Permit redefining SYS_MALLOC_LEN for board specific configs.
> This is especially useful for Android with AVB, which requires a malloc
> length of 128M.
> 
> Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
> Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
> ---
>  include/configs/meson64.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/include/configs/meson64.h b/include/configs/meson64.h
> index fb7f16d148..f9bb0240d2 100644
> --- a/include/configs/meson64.h
> +++ b/include/configs/meson64.h
> @@ -32,7 +32,9 @@
>  #define CONFIG_CPU_ARMV8
>  #define CONFIG_REMAKE_ELF
>  #define CONFIG_SYS_MAXARGS		32
> +#ifndef CONFIG_SYS_MALLOC_LEN
>  #define CONFIG_SYS_MALLOC_LEN		(32 << 20)
> +#endif
>  #define CONFIG_SYS_CBSIZE		1024
>  
>  #define CONFIG_SYS_SDRAM_BASE		0
> 

Acked-by: Neil Armstrong <narmstrong@baylibre.com>
Tom Rini Aug. 5, 2021, 5:16 p.m. UTC | #2
On Thu, Aug 05, 2021 at 06:20:53PM +0200, Neil Armstrong wrote:
> On 05/08/2021 17:17, Mattijs Korpershoek wrote:
> > Permit redefining SYS_MALLOC_LEN for board specific configs.
> > This is especially useful for Android with AVB, which requires a malloc
> > length of 128M.
> > 
> > Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
> > Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
> > ---
> >  include/configs/meson64.h | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/include/configs/meson64.h b/include/configs/meson64.h
> > index fb7f16d148..f9bb0240d2 100644
> > --- a/include/configs/meson64.h
> > +++ b/include/configs/meson64.h
> > @@ -32,7 +32,9 @@
> >  #define CONFIG_CPU_ARMV8
> >  #define CONFIG_REMAKE_ELF
> >  #define CONFIG_SYS_MAXARGS		32
> > +#ifndef CONFIG_SYS_MALLOC_LEN
> >  #define CONFIG_SYS_MALLOC_LEN		(32 << 20)
> > +#endif
> >  #define CONFIG_SYS_CBSIZE		1024
> >  
> >  #define CONFIG_SYS_SDRAM_BASE		0
> > 
> 
> Acked-by: Neil Armstrong <narmstrong@baylibre.com>

I prefer to see these as SZ_xxx, but also what's the minimum DRAM you're
going to see on a meson64 platform?  And if it's 1GB or more, why not
just use 128MB for everyone?
Neil Armstrong Aug. 6, 2021, 7:54 a.m. UTC | #3
On 05/08/2021 19:16, Tom Rini wrote:
> On Thu, Aug 05, 2021 at 06:20:53PM +0200, Neil Armstrong wrote:
>> On 05/08/2021 17:17, Mattijs Korpershoek wrote:
>>> Permit redefining SYS_MALLOC_LEN for board specific configs.
>>> This is especially useful for Android with AVB, which requires a malloc
>>> length of 128M.
>>>
>>> Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
>>> Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
>>> ---
>>>  include/configs/meson64.h | 2 ++
>>>  1 file changed, 2 insertions(+)
>>>
>>> diff --git a/include/configs/meson64.h b/include/configs/meson64.h
>>> index fb7f16d148..f9bb0240d2 100644
>>> --- a/include/configs/meson64.h
>>> +++ b/include/configs/meson64.h
>>> @@ -32,7 +32,9 @@
>>>  #define CONFIG_CPU_ARMV8
>>>  #define CONFIG_REMAKE_ELF
>>>  #define CONFIG_SYS_MAXARGS		32
>>> +#ifndef CONFIG_SYS_MALLOC_LEN
>>>  #define CONFIG_SYS_MALLOC_LEN		(32 << 20)
>>> +#endif
>>>  #define CONFIG_SYS_CBSIZE		1024
>>>  
>>>  #define CONFIG_SYS_SDRAM_BASE		0
>>>
>>
>> Acked-by: Neil Armstrong <narmstrong@baylibre.com>
> 
> I prefer to see these as SZ_xxx, but also what's the minimum DRAM you're
> going to see on a meson64 platform?  And if it's 1GB or more, why not
> just use 128MB for everyone?
> 

We can get down to 256MiB DRAM (very rare), but 512MiB is used on La Frite.

Neil
Mattijs Korpershoek Aug. 6, 2021, 9:24 a.m. UTC | #4
Hi Tom, Neil,

Neil Armstrong <narmstrong@baylibre.com> writes:

> On 05/08/2021 19:16, Tom Rini wrote:
>> On Thu, Aug 05, 2021 at 06:20:53PM +0200, Neil Armstrong wrote:
>>> On 05/08/2021 17:17, Mattijs Korpershoek wrote:
>>>> Permit redefining SYS_MALLOC_LEN for board specific configs.
>>>> This is especially useful for Android with AVB, which requires a malloc
>>>> length of 128M.
>>>>
>>>> Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
>>>> Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
>>>> ---
>>>>  include/configs/meson64.h | 2 ++
>>>>  1 file changed, 2 insertions(+)
>>>>
>>>> diff --git a/include/configs/meson64.h b/include/configs/meson64.h
>>>> index fb7f16d148..f9bb0240d2 100644
>>>> --- a/include/configs/meson64.h
>>>> +++ b/include/configs/meson64.h
>>>> @@ -32,7 +32,9 @@
>>>>  #define CONFIG_CPU_ARMV8
>>>>  #define CONFIG_REMAKE_ELF
>>>>  #define CONFIG_SYS_MAXARGS		32
>>>> +#ifndef CONFIG_SYS_MALLOC_LEN
>>>>  #define CONFIG_SYS_MALLOC_LEN		(32 << 20)
>>>> +#endif
>>>>  #define CONFIG_SYS_CBSIZE		1024
>>>>  
>>>>  #define CONFIG_SYS_SDRAM_BASE		0
>>>>
>>>
>>> Acked-by: Neil Armstrong <narmstrong@baylibre.com>
>> 
>> I prefer to see these as SZ_xxx, but also what's the minimum DRAM you're
>> going to see on a meson64 platform?  And if it's 1GB or more, why not
>> just use 128MB for everyone?
>> 
>
> We can get down to 256MiB DRAM (very rare), but 512MiB is used on La Frite.
In that case, I think it's more reasonable to keep the change as-is.
I'll send a v2 replacing (32 << 20) by SZ_32M

Do you agree ?

Mattijs

>
> Neil
Tom Rini Aug. 6, 2021, 12:46 p.m. UTC | #5
On Fri, Aug 06, 2021 at 09:54:10AM +0200, Neil Armstrong wrote:
> On 05/08/2021 19:16, Tom Rini wrote:
> > On Thu, Aug 05, 2021 at 06:20:53PM +0200, Neil Armstrong wrote:
> >> On 05/08/2021 17:17, Mattijs Korpershoek wrote:
> >>> Permit redefining SYS_MALLOC_LEN for board specific configs.
> >>> This is especially useful for Android with AVB, which requires a malloc
> >>> length of 128M.
> >>>
> >>> Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
> >>> Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
> >>> ---
> >>>  include/configs/meson64.h | 2 ++
> >>>  1 file changed, 2 insertions(+)
> >>>
> >>> diff --git a/include/configs/meson64.h b/include/configs/meson64.h
> >>> index fb7f16d148..f9bb0240d2 100644
> >>> --- a/include/configs/meson64.h
> >>> +++ b/include/configs/meson64.h
> >>> @@ -32,7 +32,9 @@
> >>>  #define CONFIG_CPU_ARMV8
> >>>  #define CONFIG_REMAKE_ELF
> >>>  #define CONFIG_SYS_MAXARGS		32
> >>> +#ifndef CONFIG_SYS_MALLOC_LEN
> >>>  #define CONFIG_SYS_MALLOC_LEN		(32 << 20)
> >>> +#endif
> >>>  #define CONFIG_SYS_CBSIZE		1024
> >>>  
> >>>  #define CONFIG_SYS_SDRAM_BASE		0
> >>>
> >>
> >> Acked-by: Neil Armstrong <narmstrong@baylibre.com>
> > 
> > I prefer to see these as SZ_xxx, but also what's the minimum DRAM you're
> > going to see on a meson64 platform?  And if it's 1GB or more, why not
> > just use 128MB for everyone?
> > 
> 
> We can get down to 256MiB DRAM (very rare), but 512MiB is used on La Frite.

OK, thanks.
Tom Rini Aug. 6, 2021, 12:47 p.m. UTC | #6
On Fri, Aug 06, 2021 at 11:24:54AM +0200, Mattijs Korpershoek wrote:
> Hi Tom, Neil,
> 
> Neil Armstrong <narmstrong@baylibre.com> writes:
> 
> > On 05/08/2021 19:16, Tom Rini wrote:
> >> On Thu, Aug 05, 2021 at 06:20:53PM +0200, Neil Armstrong wrote:
> >>> On 05/08/2021 17:17, Mattijs Korpershoek wrote:
> >>>> Permit redefining SYS_MALLOC_LEN for board specific configs.
> >>>> This is especially useful for Android with AVB, which requires a malloc
> >>>> length of 128M.
> >>>>
> >>>> Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
> >>>> Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
> >>>> ---
> >>>>  include/configs/meson64.h | 2 ++
> >>>>  1 file changed, 2 insertions(+)
> >>>>
> >>>> diff --git a/include/configs/meson64.h b/include/configs/meson64.h
> >>>> index fb7f16d148..f9bb0240d2 100644
> >>>> --- a/include/configs/meson64.h
> >>>> +++ b/include/configs/meson64.h
> >>>> @@ -32,7 +32,9 @@
> >>>>  #define CONFIG_CPU_ARMV8
> >>>>  #define CONFIG_REMAKE_ELF
> >>>>  #define CONFIG_SYS_MAXARGS		32
> >>>> +#ifndef CONFIG_SYS_MALLOC_LEN
> >>>>  #define CONFIG_SYS_MALLOC_LEN		(32 << 20)
> >>>> +#endif
> >>>>  #define CONFIG_SYS_CBSIZE		1024
> >>>>  
> >>>>  #define CONFIG_SYS_SDRAM_BASE		0
> >>>>
> >>>
> >>> Acked-by: Neil Armstrong <narmstrong@baylibre.com>
> >> 
> >> I prefer to see these as SZ_xxx, but also what's the minimum DRAM you're
> >> going to see on a meson64 platform?  And if it's 1GB or more, why not
> >> just use 128MB for everyone?
> >> 
> >
> > We can get down to 256MiB DRAM (very rare), but 512MiB is used on La Frite.
> In that case, I think it's more reasonable to keep the change as-is.
> I'll send a v2 replacing (32 << 20) by SZ_32M

tbh, using SZ_xxx isn't a big enough issue to v2 things over.
diff mbox series

Patch

diff --git a/include/configs/meson64.h b/include/configs/meson64.h
index fb7f16d148..f9bb0240d2 100644
--- a/include/configs/meson64.h
+++ b/include/configs/meson64.h
@@ -32,7 +32,9 @@ 
 #define CONFIG_CPU_ARMV8
 #define CONFIG_REMAKE_ELF
 #define CONFIG_SYS_MAXARGS		32
+#ifndef CONFIG_SYS_MALLOC_LEN
 #define CONFIG_SYS_MALLOC_LEN		(32 << 20)
+#endif
 #define CONFIG_SYS_CBSIZE		1024
 
 #define CONFIG_SYS_SDRAM_BASE		0