All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] imx: imx8qm: enable relocation of fdt and initrd
@ 2020-02-05 15:51 Oliver Graute
  2020-02-05 16:05 ` Tom Rini
  0 siblings, 1 reply; 4+ messages in thread
From: Oliver Graute @ 2020-02-05 15:51 UTC (permalink / raw)
  To: u-boot

Remove 'fdt_high' and 'initrd_high' environment variables (set to 0xFFFFFFFF)
from default environment which prevents relocation of FDT and initrd.

Signed-off-by: Oliver Graute <oliver.graute@kococonnector.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Ye Li <ye.li@nxp.com>
Cc: uboot-imx <uboot-imx@nxp.com>
---
 include/configs/imx8qm_rom7720.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/include/configs/imx8qm_rom7720.h b/include/configs/imx8qm_rom7720.h
index 865863eb7c..8beb65e96b 100644
--- a/include/configs/imx8qm_rom7720.h
+++ b/include/configs/imx8qm_rom7720.h
@@ -63,11 +63,9 @@
 	"panel=NULL\0" \
 	"console=ttyLP0\0" \
 	"fdt_addr=0x83000000\0"			\
-	"fdt_high=0xffffffffffffffff\0"		\
 	"boot_fdt=try\0" \
 	"fdt_file=imx8qm-rom7720-a1.dtb\0" \
 	"initrd_addr=0x83800000\0"		\
-	"initrd_high=0xffffffffffffffff\0" \
 	"mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \
 	"mmcpart=" __stringify(CONFIG_SYS_MMC_IMG_LOAD_PART) "\0" \
 	"mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \
-- 
2.17.1

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

* [PATCH v1] imx: imx8qm: enable relocation of fdt and initrd
  2020-02-05 15:51 [PATCH v1] imx: imx8qm: enable relocation of fdt and initrd Oliver Graute
@ 2020-02-05 16:05 ` Tom Rini
  2020-02-07 10:46   ` Oliver Graute
  0 siblings, 1 reply; 4+ messages in thread
From: Tom Rini @ 2020-02-05 16:05 UTC (permalink / raw)
  To: u-boot

On Wed, Feb 05, 2020 at 03:51:42PM +0000, Oliver Graute wrote:

> Remove 'fdt_high' and 'initrd_high' environment variables (set to 0xFFFFFFFF)
> from default environment which prevents relocation of FDT and initrd.
> 
> Signed-off-by: Oliver Graute <oliver.graute@kococonnector.com>
> Cc: Stefano Babic <sbabic@denx.de>
> Cc: Fabio Estevam <festevam@gmail.com>
> Cc: Peng Fan <peng.fan@nxp.com>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Ye Li <ye.li@nxp.com>
> Cc: uboot-imx <uboot-imx@nxp.com>
> ---
>  include/configs/imx8qm_rom7720.h | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/include/configs/imx8qm_rom7720.h b/include/configs/imx8qm_rom7720.h
> index 865863eb7c..8beb65e96b 100644
> --- a/include/configs/imx8qm_rom7720.h
> +++ b/include/configs/imx8qm_rom7720.h
> @@ -63,11 +63,9 @@
>  	"panel=NULL\0" \
>  	"console=ttyLP0\0" \
>  	"fdt_addr=0x83000000\0"			\
> -	"fdt_high=0xffffffffffffffff\0"		\
>  	"boot_fdt=try\0" \
>  	"fdt_file=imx8qm-rom7720-a1.dtb\0" \
>  	"initrd_addr=0x83800000\0"		\
> -	"initrd_high=0xffffffffffffffff\0" \
>  	"mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \
>  	"mmcpart=" __stringify(CONFIG_SYS_MMC_IMG_LOAD_PART) "\0" \
>  	"mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \

Is bootm_size or CONFIG_SYS_BOOTMAPSZ already being set somewhere for
these platforms?  In Linux, Documentation/arm64/booting.rst does
describe limitations on where FDT/initrd can reside in memory so we need
to make sure they're obeyed.  That's best done by using bootm_size in
environment or CONFIG_SYS_BOOTMAPSZ at build time to ensure alignment
and non-overlap within those limits and not "don't move anything ever"
as fdt_high/initrd_high=0xff... does.  Thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200205/3ab0d9ec/attachment.sig>

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

* [PATCH v1] imx: imx8qm: enable relocation of fdt and initrd
  2020-02-05 16:05 ` Tom Rini
@ 2020-02-07 10:46   ` Oliver Graute
  2020-02-07 14:28     ` Tom Rini
  0 siblings, 1 reply; 4+ messages in thread
From: Oliver Graute @ 2020-02-07 10:46 UTC (permalink / raw)
  To: u-boot

On 05/02/20, Tom Rini wrote:
> On Wed, Feb 05, 2020 at 03:51:42PM +0000, Oliver Graute wrote:
> 
> > Remove 'fdt_high' and 'initrd_high' environment variables (set to 0xFFFFFFFF)
> > from default environment which prevents relocation of FDT and initrd.
> > 
> > Signed-off-by: Oliver Graute <oliver.graute@kococonnector.com>
> > Cc: Stefano Babic <sbabic@denx.de>
> > Cc: Fabio Estevam <festevam@gmail.com>
> > Cc: Peng Fan <peng.fan@nxp.com>
> > Cc: Simon Glass <sjg@chromium.org>
> > Cc: Ye Li <ye.li@nxp.com>
> > Cc: uboot-imx <uboot-imx@nxp.com>
> > ---
> >  include/configs/imx8qm_rom7720.h | 2 --
> >  1 file changed, 2 deletions(-)
> > 
> > diff --git a/include/configs/imx8qm_rom7720.h b/include/configs/imx8qm_rom7720.h
> > index 865863eb7c..8beb65e96b 100644
> > --- a/include/configs/imx8qm_rom7720.h
> > +++ b/include/configs/imx8qm_rom7720.h
> > @@ -63,11 +63,9 @@
> >  	"panel=NULL\0" \
> >  	"console=ttyLP0\0" \
> >  	"fdt_addr=0x83000000\0"			\
> > -	"fdt_high=0xffffffffffffffff\0"		\
> >  	"boot_fdt=try\0" \
> >  	"fdt_file=imx8qm-rom7720-a1.dtb\0" \
> >  	"initrd_addr=0x83800000\0"		\
> > -	"initrd_high=0xffffffffffffffff\0" \
> >  	"mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \
> >  	"mmcpart=" __stringify(CONFIG_SYS_MMC_IMG_LOAD_PART) "\0" \
> >  	"mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \
> 
> Is bootm_size or CONFIG_SYS_BOOTMAPSZ already being set somewhere for
> these platforms?  In Linux, Documentation/arm64/booting.rst does
> describe limitations on where FDT/initrd can reside in memory so we need
> to make sure they're obeyed.  That's best done by using bootm_size in
> environment or CONFIG_SYS_BOOTMAPSZ at build time to ensure alignment
> and non-overlap within those limits and not "don't move anything ever"
> as fdt_high/initrd_high=0xff... does.  Thanks!

No currently not. Because I do not know the exact value I have to set
for CONFIG_SYS_BOOTMAPSZ here. How do I find that out for my board?

Best Regards,

Oliver

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

* [PATCH v1] imx: imx8qm: enable relocation of fdt and initrd
  2020-02-07 10:46   ` Oliver Graute
@ 2020-02-07 14:28     ` Tom Rini
  0 siblings, 0 replies; 4+ messages in thread
From: Tom Rini @ 2020-02-07 14:28 UTC (permalink / raw)
  To: u-boot

On Fri, Feb 07, 2020 at 11:46:11AM +0100, Oliver Graute wrote:
> On 05/02/20, Tom Rini wrote:
> > On Wed, Feb 05, 2020 at 03:51:42PM +0000, Oliver Graute wrote:
> > 
> > > Remove 'fdt_high' and 'initrd_high' environment variables (set to 0xFFFFFFFF)
> > > from default environment which prevents relocation of FDT and initrd.
> > > 
> > > Signed-off-by: Oliver Graute <oliver.graute@kococonnector.com>
> > > Cc: Stefano Babic <sbabic@denx.de>
> > > Cc: Fabio Estevam <festevam@gmail.com>
> > > Cc: Peng Fan <peng.fan@nxp.com>
> > > Cc: Simon Glass <sjg@chromium.org>
> > > Cc: Ye Li <ye.li@nxp.com>
> > > Cc: uboot-imx <uboot-imx@nxp.com>
> > > ---
> > >  include/configs/imx8qm_rom7720.h | 2 --
> > >  1 file changed, 2 deletions(-)
> > > 
> > > diff --git a/include/configs/imx8qm_rom7720.h b/include/configs/imx8qm_rom7720.h
> > > index 865863eb7c..8beb65e96b 100644
> > > --- a/include/configs/imx8qm_rom7720.h
> > > +++ b/include/configs/imx8qm_rom7720.h
> > > @@ -63,11 +63,9 @@
> > >  	"panel=NULL\0" \
> > >  	"console=ttyLP0\0" \
> > >  	"fdt_addr=0x83000000\0"			\
> > > -	"fdt_high=0xffffffffffffffff\0"		\
> > >  	"boot_fdt=try\0" \
> > >  	"fdt_file=imx8qm-rom7720-a1.dtb\0" \
> > >  	"initrd_addr=0x83800000\0"		\
> > > -	"initrd_high=0xffffffffffffffff\0" \
> > >  	"mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \
> > >  	"mmcpart=" __stringify(CONFIG_SYS_MMC_IMG_LOAD_PART) "\0" \
> > >  	"mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \
> > 
> > Is bootm_size or CONFIG_SYS_BOOTMAPSZ already being set somewhere for
> > these platforms?  In Linux, Documentation/arm64/booting.rst does
> > describe limitations on where FDT/initrd can reside in memory so we need
> > to make sure they're obeyed.  That's best done by using bootm_size in
> > environment or CONFIG_SYS_BOOTMAPSZ at build time to ensure alignment
> > and non-overlap within those limits and not "don't move anything ever"
> > as fdt_high/initrd_high=0xff... does.  Thanks!
> 
> No currently not. Because I do not know the exact value I have to set
> for CONFIG_SYS_BOOTMAPSZ here. How do I find that out for my board?

To quote the README:
- CONFIG_SYS_BOOTMAPSZ:
                Maximum size of memory mapped by the startup code of
                the Linux kernel; all data that must be processed by
                the Linux kernel (bd_info, boot arguments, FDT blob if
                used) must be put below this limit, unless "bootm_low"
                environment variable is defined and non-zero. In such case
                all data for the Linux kernel must be between "bootm_low"
                and "bootm_low" + CONFIG_SYS_BOOTMAPSZ.  The environment
                variable "bootm_mapsize" will override the value of
                CONFIG_SYS_BOOTMAPSZ.  If CONFIG_SYS_BOOTMAPSZ is undefined,
                then the value in "bootm_size" will be used instead.

And you want to use that plus what Linux's
Documentation/arm64/booting.rst says with respect to locations of the
various items, and the smallest amount of DRAM that will be used by a
platform running this config.  Hope this helps!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200207/7bbf540b/attachment.sig>

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

end of thread, other threads:[~2020-02-07 14:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-05 15:51 [PATCH v1] imx: imx8qm: enable relocation of fdt and initrd Oliver Graute
2020-02-05 16:05 ` Tom Rini
2020-02-07 10:46   ` Oliver Graute
2020-02-07 14:28     ` Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.