All of lore.kernel.org
 help / color / mirror / Atom feed
* imx8mm memory env in U-Boot
@ 2021-08-26 16:39 Tim Harvey
  2021-08-26 19:41 ` Tom Rini
  0 siblings, 1 reply; 4+ messages in thread
From: Tim Harvey @ 2021-08-26 16:39 UTC (permalink / raw)
  To: u-boot
  Cc: Adam Ford, Ying-Chun Liu (PaulLiu),
	Peng Fan, Jagan Teki, Matteo Lisi, Fabio Estevam, Stefano Babic,
	Teresa Remmet, Oleksandr Suvorov, Marcel Ziswiler, Igor Opaniuk

Greetings,

I'm trying to understand what the best memory usage is in U-Boot for
IMX8M boards for generic distro configs such as: loadaddr,
kernel_addr_r, fdt_addr_r, ramdisk_addr, scriptaddr.

My understanding is that the following is a good rule of thumb:
loadaddr = DDR start + 32MB (as FIT images may load kernel at DDR
start; but this only allows for a 32MB kernel)
kernel_addr_r = $loadaddr
fdt_addr_r = $kernel_addr_r + 128MB (allows you up to 128MB for your
kernel; handy if you want a kernel with internal ramdisk)
ramdisk_addr = fdt_addr_r + 512KB (512KB should be plenty for a dt)
scriptaddr = $loadaddr

Looking at the various imx8mm boards upstream they are kind of all
over the place but do follow some patterns likely due to some of us
just going with what prior boards used.

While I'm at it I've encountered a couple other questions:
- why on IMX8MM is CONFIG_LOADADDR is 0x40480000 when DDR starts at
0x40000000. Why the 4608KB offset?
- what is CONFIG_SYS_INIT_RAM_SIZE? Most boards are setting this to
2MB but a couple (cl-iot-gate/phycore) set it to 512KB
- what are people using for the load address for the kernel within FIT
images? I expect start of DDR is appropriate (0x40000000) however for
whatever reason I've been using 0x40200000. This plays into the env as
you can't overlap where you loaded the FIT image with where you told
the FIT image to relocate the kernel to.

Best regards,

Tim

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

end of thread, other threads:[~2021-08-28 19:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-26 16:39 imx8mm memory env in U-Boot Tim Harvey
2021-08-26 19:41 ` Tom Rini
2021-08-27 21:32   ` Tim Harvey
2021-08-28 19:24     ` 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.