[PATCH] imx8m{m,n}_venice: update env memory layout

Tim Harvey tharvey at gateworks.com
Sat Feb 26 22:37:03 CET 2022


On Sat, Feb 26, 2022 at 5:15 AM Fabio Estevam <festevam at gmail.com> wrote:
>
> Hi Tim,
>
> On Fri, Feb 18, 2022 at 8:20 PM Tim Harvey <tharvey at gateworks.com> wrote:
> >
> > Update distro config env memory layout:
> >  - loadaddr=0x48200000 allows for 130MB area for uncompressing (ie FIT
> >    images, kernel_comp_addr_r)
> >  - fdt_addr_r = loadaddr + 128MB - allows for 128MB kernel
> >  - scriptaddr = fdt_addr_r + 512KB - allows for 512KB fdt
> >  - ramdisk_addr_r = scriptaddr + 512KB - allows for 512KB script
> >
> > Signed-off-by: Tim Harvey <tharvey at gateworks.com>
>
> What about following the suggestion from Heiko at:
> https://patchwork.ozlabs.org/project/uboot/patch/20220216122514.1659879-2-heiko.thiery@gmail.com/

Fabio,

I don't understand why include/configs/ti_armv7_common.h is always
recommended when it comes to address maps. The comment there doesn't
read that well and there are several addresses that I believe are
outdated or uncommon (fdtaddr,rdaddr are outdated and it seems
loadaddr could be used for dtboaddr)

In my opinion what is relevant when choosing an addressing scheme is
how much space you want to allow for kernel, fdt, scripts, ramdisk.

ti_armv7_common.h allows for
kernel/loadaddr:96M (too small in my opinion on modern boards)
fdt:512M (makes sense)
script:32M (excessive, and I don't understand why this is below
loadaddr vs stacked on top of loadaddr like fdt)
ramdisk: depends on mem size as its the highest addr (makes sense)

For my more modern boards with typically 1-4GiB of dram, I wanted to
allow for more than 96M for a kernel (kernel+ramdisk, fit image etc)
as I commonly exceed 96M when using a buildroot kernel+rootfs that has
something like gstreamer support for imx6/imx8 which is why I came up
with a different scheme which I document well in the commit log as
 - loadaddr=0x48200000 allows for 130MB area for uncompressing (ie FIT
   images, kernel_comp_addr_r)
 - fdt_addr_r = loadaddr + 128MB - allows for 128MB kernel
 - scriptaddr = fdt_addr_r + 512KB - allows for 512KB fdt
 - ramdisk_addr_r = scriptaddr + 512KB - allows for 512KB script

I must admit I'm not clear what the best choice of
CONFIG_SYS_LOAD_ADDR is for IMX8MM which is what all these addresses
should stack on top of.

I also will admit that defining them as hard coded addresses makes it
difficult to see the sizes of each. It would be better if we had a way
to define them referencing a size and what they stack on top of but
I'm not clear how to do this with the C pre-processor.

Best Regards,

Tim


More information about the U-Boot mailing list