diff mbox series

[1/8] board: colibri_vf: synchronize/improve memory options

Message ID 20210722154943.127775-2-oleksandr.suvorov@toradex.com
State Changes Requested
Delegated to: Stefano Babic
Headers show
Series Patches for Toradex boards | expand

Commit Message

Oleksandr Suvorov July 22, 2021, 3:49 p.m. UTC
From: Stefan Agner <stefan.agner@toradex.com>

Synchronize initramfs related configuration options and improve
memory layout. The memory layout with an offset of 16MiB allows
to boot bigger kernels. With AUTO_ZRELADDR, which is pretty much
the standard nowadays, the kernel relacates itself to PC masked
with 0xf8000000 plus a text offset of 0x8000 (hence 0x80008000 for
Vybrid). With a 16MiB offset from the start of memory and a 16MiB
distance to the device-tree, we allow kernel up to ~16MiB.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
---

 include/configs/colibri_vf.h | 2 ++
 1 file changed, 2 insertions(+)

Comments

Tom Rini July 22, 2021, 5:40 p.m. UTC | #1
On Thu, Jul 22, 2021 at 06:49:36PM +0300, Oleksandr Suvorov wrote:

> From: Stefan Agner <stefan.agner@toradex.com>
> 
> Synchronize initramfs related configuration options and improve
> memory layout. The memory layout with an offset of 16MiB allows
> to boot bigger kernels. With AUTO_ZRELADDR, which is pretty much
> the standard nowadays, the kernel relacates itself to PC masked
> with 0xf8000000 plus a text offset of 0x8000 (hence 0x80008000 for
> Vybrid). With a 16MiB offset from the start of memory and a 16MiB
> distance to the device-tree, we allow kernel up to ~16MiB.
> 
> Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
> Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
> ---
> 
>  include/configs/colibri_vf.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/include/configs/colibri_vf.h b/include/configs/colibri_vf.h
> index 5bd440f1db..7fb54a442e 100644
> --- a/include/configs/colibri_vf.h
> +++ b/include/configs/colibri_vf.h
> @@ -47,6 +47,8 @@
>  #define MEM_LAYOUT_ENV_SETTINGS \
>  	"bootm_size=0x10000000\0" \
>  	"fdt_addr_r=0x82000000\0" \
> +	"fdt_high=0xfffffff0\0" \
> +	"initrd_high=0xfffffff0\0" \
>  	"kernel_addr_r=0x81000000\0" \
>  	"pxefile_addr_r=0x87100000\0" \
>  	"ramdisk_addr_r=0x82100000\0" \

NAK.  You cannot disable device tree relocation by default.  You're
already setting bootm_size, which is good.  I don't like disabling
initrd, but that's at least an easier to debug problem, and also much
more performance sensitive.
Oleksandr Suvorov July 23, 2021, 6:09 a.m. UTC | #2
Hello Tom,

On Thu, Jul 22, 2021 at 8:41 PM Tom Rini <trini@konsulko.com> wrote:
>
> On Thu, Jul 22, 2021 at 06:49:36PM +0300, Oleksandr Suvorov wrote:
>
> > From: Stefan Agner <stefan.agner@toradex.com>
> >
> > Synchronize initramfs related configuration options and improve
> > memory layout. The memory layout with an offset of 16MiB allows
> > to boot bigger kernels. With AUTO_ZRELADDR, which is pretty much
> > the standard nowadays, the kernel relacates itself to PC masked
> > with 0xf8000000 plus a text offset of 0x8000 (hence 0x80008000 for
> > Vybrid). With a 16MiB offset from the start of memory and a 16MiB
> > distance to the device-tree, we allow kernel up to ~16MiB.
> >
> > Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
> > Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
> > ---
> >
> >  include/configs/colibri_vf.h | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/include/configs/colibri_vf.h b/include/configs/colibri_vf.h
> > index 5bd440f1db..7fb54a442e 100644
> > --- a/include/configs/colibri_vf.h
> > +++ b/include/configs/colibri_vf.h
> > @@ -47,6 +47,8 @@
> >  #define MEM_LAYOUT_ENV_SETTINGS \
> >       "bootm_size=0x10000000\0" \
> >       "fdt_addr_r=0x82000000\0" \
> > +     "fdt_high=0xfffffff0\0" \
> > +     "initrd_high=0xfffffff0\0" \
> >       "kernel_addr_r=0x81000000\0" \
> >       "pxefile_addr_r=0x87100000\0" \
> >       "ramdisk_addr_r=0x82100000\0" \
>
> NAK.  You cannot disable device tree relocation by default.  You're
> already setting bootm_size, which is good. I don't like disabling
> initrd, but that's at least an easier to debug problem, and also much
> more performance sensitive.

Thanks for your notes! I'll remove this patch from the next patchset
version and think over how to rework
it later.

>
> --
> Tom

Best regards
Oleksandr Suvorov

Toradex AG
Ebenaustrasse 10 | 6048 Horw | Switzerland | T: +41 41 500 48 00
diff mbox series

Patch

diff --git a/include/configs/colibri_vf.h b/include/configs/colibri_vf.h
index 5bd440f1db..7fb54a442e 100644
--- a/include/configs/colibri_vf.h
+++ b/include/configs/colibri_vf.h
@@ -47,6 +47,8 @@ 
 #define MEM_LAYOUT_ENV_SETTINGS \
 	"bootm_size=0x10000000\0" \
 	"fdt_addr_r=0x82000000\0" \
+	"fdt_high=0xfffffff0\0" \
+	"initrd_high=0xfffffff0\0" \
 	"kernel_addr_r=0x81000000\0" \
 	"pxefile_addr_r=0x87100000\0" \
 	"ramdisk_addr_r=0x82100000\0" \