[U-Boot] [PATCH] ARM: mxs: Setup stack in JTAG mode

Stefano Babic sbabic at denx.de
Thu Oct 10 17:20:07 CEST 2013


On 20/09/2013 01:36, Marek Vasut wrote:
> In case the MX23/MX28 is switched into JTAG mode via the BootMode select
> switches, the BootROM bypasses the CPU core registers initialization.
> This in turn means that the Stack Pointer (SP) register is not set as
> it is in every other mode of operation, but instead is only zeroed out.
> 
> To prevent U-Boot SPL from crashing in this obscure JTAG mode, configure
> the SP to point at the CONFIG_SYS_INIT_SP_ADDR if the SP is zeroed out.
> 
> Note that in case the SP is already configured, we must preserve that exact
> SP value and must not modify it. This is important since in every other mode
> but the JTAG mode, the SPL returns into the BootROM and BootROM in turn loads
> U-Boot itself. If the SP were to be corrupted, the BootROM won't be able to
> continue it's operation after returned from SPL and the system would crash.
> 
> Finally, add the JTAG mode switch identifier, so it's not recognised as
> Unknown mode.
> 
> Signed-off-by: Marek Vasut <marex at denx.de>
> Cc: Stefano Babic <sbabic at denx.de>
> Cc: Fabio Estevam <fabio.estevam at freescale.com>
> Cc: Otavio Salvador <otavio at ossystems.com.br>
> ---

Applied to u-boot-imx, -next branch, thanks !

Best regards,
Stefano Babic




-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================


More information about the U-Boot mailing list