From patchwork Fri Jan 24 00:39:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 240028 List-Id: U-Boot discussion From: marek.vasut at gmail.com (Marek Vasut) Date: Fri, 24 Jan 2020 01:39:23 +0100 Subject: [PATCH] ARM: rmobile: Limit bootloader size to 1 MiB on R-Car Gen3 Message-ID: <20200124003923.324999-1-marek.vasut+renesas@gmail.com> The HF/QSPI flash layout permits up to 1 MiB large bootloader blob, set CONFIG_BOARD_SIZE_LIMIT to enforce this limit and set the monitor size to match accordingly. Signed-off-by: Marek Vasut Cc: Nobuhiro Iwamatsu --- include/configs/rcar-gen3-common.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/configs/rcar-gen3-common.h b/include/configs/rcar-gen3-common.h index 520da5027e..6528f1fa62 100644 --- a/include/configs/rcar-gen3-common.h +++ b/include/configs/rcar-gen3-common.h @@ -46,10 +46,13 @@ #define CONFIG_MAX_MEM_MAPPED (0x80000000u - DRAM_RSV_SIZE) #define CONFIG_SYS_MONITOR_BASE 0x00000000 -#define CONFIG_SYS_MONITOR_LEN (256 * 1024) +#define CONFIG_SYS_MONITOR_LEN (1 * 1024 * 1024) #define CONFIG_SYS_MALLOC_LEN (1 * 1024 * 1024) #define CONFIG_SYS_BOOTM_LEN (64 << 20) +/* The HF/QSPI layout permits up to 1 MiB large bootloader blob */ +#define CONFIG_BOARD_SIZE_LIMIT 1048576 + /* ENV setting */ #define CONFIG_ENV_OVERWRITE