public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/2] ARM: rpi: update memory layout env. var. documentation
@ 2016-02-06  5:45 Stephen Warren
  2016-02-06  5:45 ` [U-Boot] [PATCH 2/2] ARM: rpi: set fdt_high in the default environment Stephen Warren
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Stephen Warren @ 2016-02-06  5:45 UTC (permalink / raw)
  To: u-boot

Update rpi-common.h's documentation that describes the rationale for
choosing various addresses for standardized variables used by boot
scripts. This comment was correct when written, but not updated when some
of the values were changed.

Fixes: 14006a567105 ("rpi: set fdt_addr_r to 0x00000100 to match default
...device_tree_address")
Cc: Jonathan Liu <net147@gmail.com>
Cc: Daniel Stone <daniels@collabora.com>
Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
---
 include/configs/rpi-common.h | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/include/configs/rpi-common.h b/include/configs/rpi-common.h
index 72f1e2d60b8f..00a5266dad15 100644
--- a/include/configs/rpi-common.h
+++ b/include/configs/rpi-common.h
@@ -144,8 +144,14 @@
 /*
  * Memory layout for where various images get loaded by boot scripts:
  *
- * scriptaddr can be pretty much anywhere that doesn't conflict with something
- *   else. Put it low in memory to avoid conflicts.
+ * I suspect address 0 is used as the SMP pen on the RPi2, so avoid this.
+ *
+ * fdt_addr_r simply shouldn't overlap anything else. However, the RPi's
+ *   binary firmware loads a DT to address 0x100, so we choose this address to
+ *   match it. This allows custom boot scripts to pass this DT on to Linux
+ *   simply by not over-writing the data at this address. When using U-Boot,
+ *   U-Boot (and scripts it executes) typicaly ignore the DT loaded by the FW
+ *   and loads its own DT from disk (triggered by boot.scr or extlinux.conf).
  *
  * pxefile_addr_r can be pretty much anywhere that doesn't conflict with
  *   something else. Put it low in memory to avoid conflicts.
@@ -159,11 +165,11 @@
  *   this up to 16M allows for a sizable kernel to be decompressed below the
  *   compressed load address.
  *
- * fdt_addr_r simply shouldn't overlap anything else. Choosing 32M allows for
- *   the compressed kernel to be up to 16M too.
+ * scriptaddr can be pretty much anywhere that doesn't conflict with something
+ *   else. Choosing 32M allows for the compressed kernel to be up to 16M.
  *
  * ramdisk_addr_r simply shouldn't overlap anything else. Choosing 33M allows
- *   for the FDT/DTB to be up to 1M, which is hopefully plenty.
+ *   for any boot script to be up to 1M, which is hopefully plenty.
  */
 #define ENV_MEM_LAYOUT_SETTINGS \
 	"fdt_addr_r=0x00000100\0" \
-- 
1.9.1

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

end of thread, other threads:[~2016-02-08 20:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-06  5:45 [U-Boot] [PATCH 1/2] ARM: rpi: update memory layout env. var. documentation Stephen Warren
2016-02-06  5:45 ` [U-Boot] [PATCH 2/2] ARM: rpi: set fdt_high in the default environment Stephen Warren
2016-02-08 20:50   ` [U-Boot] [U-Boot, " Tom Rini
2016-02-06  7:30 ` [U-Boot] [PATCH 1/2] ARM: rpi: update memory layout env. var. documentation Jonathan Liu
2016-02-06 16:36   ` Stephen Warren
2016-02-06 20:48     ` Jonathan Liu
2016-02-08 20:50 ` [U-Boot] [U-Boot, " Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox