From 9b5066ccc91ccab1887fb8c2182db2092880e5d1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Lothar=20Wa=C3=9Fmann?= Date: Fri, 21 Jul 2017 13:33:21 +0200 Subject: [PATCH] karo: tx6: prevent DTB from either being out of reach of kernel or overwritten during uncompress 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 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/configs/tx6.h b/include/configs/tx6.h index 146f22040b..a5bab22582 100644 --- a/include/configs/tx6.h +++ b/include/configs/tx6.h @@ -99,10 +99,10 @@ #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 @@ -237,8 +237,8 @@ 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" \ -- 2.39.2