karo: tx6: prevent DTB from either being out of reach of kernel or overwritten during...
authorLothar Waßmann <LW@KARO-electronics.de>
Fri, 21 Jul 2017 11:33:21 +0000 (13:33 +0200)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 21 Jul 2017 11:33:21 +0000 (13:33 +0200)
The current setting of fdtaddr and fdt_high has proven to be
inappropriate in that either the FDT may be out of reach of the
kernel or may be overwritten by the uncompressing Linux kernel.

Set fdt_high to an offset of 256MiB from SDRAM start, so that it is
valid for any board regardless of memory size while preventing the
described problems.

include/configs/tx6.h

index 146f220..a5bab22 100644 (file)
 #define PHYS_SDRAM_1_SIZE              (UL(CONFIG_SYS_SDRAM_CHIP_SIZE) * \
                                         SZ_1M / 32 *                   \
                                         CONFIG_SYS_SDRAM_BUS_WIDTH)
-#if PHYS_SDRAM_1_SIZE > SZ_1G
-#define FDT_HIGH_STR                   "fdt_high=ffffffff\0"
+#ifndef CONFIG_BOARD_TX6UL
+#define FDT_HIGH_ADDR_STR              "20000000"
 #else
-#define FDT_HIGH_STR                   ""
+#define FDT_HIGH_ADDR_STR              "90000000"
 #endif
 
 #ifdef CONFIG_SOC_MX6Q
        EMMC_BOOT_PART_STR                                              \
        EMMC_BOOT_ACK_STR                                               \
        "fdtaddr=" xstr(CONFIG_FDTADDR) "\0"                            \
-       FDT_HIGH_STR                                                    \
        FDTSAVE_CMD_STR                                                 \
+       "fdt_high=" FDT_HIGH_ADDR_STR "\0"                              \
        "mtdids=" MTDIDS_DEFAULT "\0"                                   \
        "mtdparts=" MTDPARTS_DEFAULT "\0"                               \
        "nfsroot=/tftpboot/rootfs\0"                                    \