From: Vikas Manocha Date: Fri, 31 Mar 2017 23:34:39 +0000 (-0700) Subject: spl: armv7m: keep ARM v7M in thumb mode while jumping to entry point X-Git-Tag: v2017.05-rc2~66 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=634fcf084875674d86c303e630f83b2017e7e07f;p=u-boot spl: armv7m: keep ARM v7M in thumb mode while jumping to entry point On ARM v7M, the processor will return to ARM mode when executing blx instruction with bit 0 of the address == 0. Always set it to 1 to stay in thumb mode. Similar commit: f99993c10882f7dc8ec35993d5febe59aac01e6a Author: Matt Porter Date: Tue May 5 15:00:23 2015 -0400 common/cmd_boot: keep ARM v7M in thumb mode during do_go_exec() Signed-off-by: Vikas Manocha --- diff --git a/common/spl/spl.c b/common/spl/spl.c index 0d1e08245f..a3e73b87bc 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -85,6 +85,9 @@ void spl_set_header_raw_uboot(struct spl_image_info *spl_image) { spl_image->size = CONFIG_SYS_MONITOR_LEN; spl_image->entry_point = CONFIG_SYS_UBOOT_START; +#ifdef CONFIG_CPU_V7M + spl_image->entry_point |= 0x1; +#endif spl_image->load_addr = CONFIG_SYS_TEXT_BASE; spl_image->os = IH_OS_U_BOOT; spl_image->name = "U-Boot";