[U-Boot] [PATCH 2/2] rpi: Fix fdt_high & initrd_high for 64-bit builds

Tuomas Tynkkynen tuomas.tynkkynen at iki.fi
Mon Jun 19 11:08:04 UTC 2017


The magic value that disables relocation is dependent on the CPU word
size, so the current 'ffffffff' is doing the wrong thing on aarch64.

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen at iki.fi>
---
These two patches aren't really related except for touching the same
parts of the code, I just noticed this by coincidence. For me there's no
visible effects with this patch.

Instead of spreading this #ifdef pattern further,
http://patchwork.ozlabs.org/patch/716487/ would be a cleaner way of
solving this...
---
 include/configs/rpi.h | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/include/configs/rpi.h b/include/configs/rpi.h
index a2d82a9146..153b2463a7 100644
--- a/include/configs/rpi.h
+++ b/include/configs/rpi.h
@@ -119,6 +119,14 @@
 	"stdout=serial,vidconsole\0" \
 	"stderr=serial,vidconsole\0"
 
+#ifdef CONFIG_ARM64
+#define FDT_HIGH "ffffffffffffffff"
+#define INITRD_HIGH "ffffffffffffffff"
+#else
+#define FDT_HIGH "ffffffff"
+#define INITRD_HIGH "ffffffff"
+#endif
+
 /*
  * Memory layout for where various images get loaded by boot scripts:
  *
@@ -164,8 +172,8 @@
 # define KERNEL_ADDR_R "0x03000000"
 #endif
 #define ENV_MEM_LAYOUT_SETTINGS \
-	"fdt_high=ffffffff\0" \
-	"initrd_high=ffffffff\0" \
+	"fdt_high=" FDT_HIGH "\0" \
+	"initrd_high=" INITRD_HIGH "\0" \
 	"fdt_addr_r=0x00000100\0" \
 	"kernel_addr_r=" KERNEL_ADDR_R "\0" \
 	"scriptaddr=0x04000000\0" \
-- 
2.13.0



More information about the U-Boot mailing list