All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] stm32mp1: remove fdt_high and initrd_high in environment
@ 2020-02-10 10:54 Patrick Delaunay
  2020-02-10 15:10 ` Tom Rini
  2020-02-14 12:36 ` Patrick DELAUNAY
  0 siblings, 2 replies; 3+ messages in thread
From: Patrick Delaunay @ 2020-02-10 10:54 UTC (permalink / raw)
  To: u-boot

Remove fdt_high and initrd_high (set to 0xffffffff) in stm32mp1 board
enviromnent, and U-Boot always relocate FDT and initrd in bootm command.

This relocation is limited by CONFIG_SYS_BOOTMAPSZ which indicates
the size of the memory region where it is safe to place data passed
to the Linux kernel (DTB, initrd), it is
a) Less than or equal to RAM size.
b) not within the kernel's highmem region

So 256M seems large enough in most circumstances and users
can override this value via environment variable "bootm_mapsize"
if needed.

This modification increases the boot time but avoid assumption
on aligned address for bootm command.

A user can still define this variables themselves if the FDT or
initrd is either left in-place or copied to a specific location.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
---

 include/configs/stm32mp1.h | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/include/configs/stm32mp1.h b/include/configs/stm32mp1.h
index a66534e027..42717c167e 100644
--- a/include/configs/stm32mp1.h
+++ b/include/configs/stm32mp1.h
@@ -43,8 +43,14 @@
 #define CONFIG_SETUP_MEMORY_TAGS
 #define CONFIG_INITRD_TAG
 
+/*
+ * For booting Linux, use the first 256 MB of memory, since this is
+ * the maximum mapped by the Linux kernel during initialization.
+ */
+#define CONFIG_SYS_BOOTMAPSZ		SZ_256M
+
 /* Extend size of kernel image for uncompression */
-#define CONFIG_SYS_BOOTM_LEN			SZ_32M
+#define CONFIG_SYS_BOOTM_LEN		SZ_32M
 
 /* SPL support */
 #ifdef CONFIG_SPL
@@ -215,8 +221,6 @@
 	"pxefile_addr_r=0xc4200000\0" \
 	"splashimage=0xc4300000\0"  \
 	"ramdisk_addr_r=0xc4400000\0" \
-	"fdt_high=0xffffffff\0" \
-	"initrd_high=0xffffffff\0" \
 	"altbootcmd=run bootcmd\0" \
 	"env_default=1\0" \
 	"env_check=if test $env_default -eq 1;"\
-- 
2.17.1

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

* [PATCH] stm32mp1: remove fdt_high and initrd_high in environment
  2020-02-10 10:54 [PATCH] stm32mp1: remove fdt_high and initrd_high in environment Patrick Delaunay
@ 2020-02-10 15:10 ` Tom Rini
  2020-02-14 12:36 ` Patrick DELAUNAY
  1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2020-02-10 15:10 UTC (permalink / raw)
  To: u-boot

On Mon, Feb 10, 2020 at 11:54:11AM +0100, Patrick Delaunay wrote:

> Remove fdt_high and initrd_high (set to 0xffffffff) in stm32mp1 board
> enviromnent, and U-Boot always relocate FDT and initrd in bootm command.
> 
> This relocation is limited by CONFIG_SYS_BOOTMAPSZ which indicates
> the size of the memory region where it is safe to place data passed
> to the Linux kernel (DTB, initrd), it is
> a) Less than or equal to RAM size.
> b) not within the kernel's highmem region
> 
> So 256M seems large enough in most circumstances and users
> can override this value via environment variable "bootm_mapsize"
> if needed.
> 
> This modification increases the boot time but avoid assumption
> on aligned address for bootm command.
> 
> A user can still define this variables themselves if the FDT or
> initrd is either left in-place or copied to a specific location.
> 
> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>

Reviewed-by: Tom Rini <trini@konsulko.com>

-- 
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/20200210/4733981f/attachment.sig>

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

* [PATCH] stm32mp1: remove fdt_high and initrd_high in environment
  2020-02-10 10:54 [PATCH] stm32mp1: remove fdt_high and initrd_high in environment Patrick Delaunay
  2020-02-10 15:10 ` Tom Rini
@ 2020-02-14 12:36 ` Patrick DELAUNAY
  1 sibling, 0 replies; 3+ messages in thread
From: Patrick DELAUNAY @ 2020-02-14 12:36 UTC (permalink / raw)
  To: u-boot

Hi,

> From: Patrick DELAUNAY <patrick.delaunay@st.com>
> Sent: lundi 10 f?vrier 2020 11:54
> 
> Remove fdt_high and initrd_high (set to 0xffffffff) in stm32mp1 board enviromnent,
> and U-Boot always relocate FDT and initrd in bootm command.
> 
> This relocation is limited by CONFIG_SYS_BOOTMAPSZ which indicates the size
> of the memory region where it is safe to place data passed to the Linux kernel
> (DTB, initrd), it is
> a) Less than or equal to RAM size.
> b) not within the kernel's highmem region
> 
> So 256M seems large enough in most circumstances and users can override this
> value via environment variable "bootm_mapsize"
> if needed.
> 
> This modification increases the boot time but avoid assumption on aligned
> address for bootm command.
> 
> A user can still define this variables themselves if the FDT or initrd is either left in-
> place or copied to a specific location.
> 
> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
> ---

Applied to u-boot-stm32/master, thanks!

Regards
Patrick

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

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

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-10 10:54 [PATCH] stm32mp1: remove fdt_high and initrd_high in environment Patrick Delaunay
2020-02-10 15:10 ` Tom Rini
2020-02-14 12:36 ` Patrick DELAUNAY

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.