diff options
author | Ye.Li <B37916@freescale.com> | 2014-04-28 16:19:44 +0800 |
---|---|---|
committer | Nitin Garg <nitin.garg@freescale.com> | 2014-04-28 09:47:50 -0500 |
commit | 982145e3ae188ba3fcb48bc3d2df7f8dd27136ae (patch) | |
tree | 71581990d65d89a7e8b1152cb0141c076ac18005 | |
parent | d51982ed69309c1bbe95cca72723ce82b24ac717 (diff) | |
download | u-boot-imx-imx_v2013.04_3.10.31_1.1.0_alpha.zip u-boot-imx-imx_v2013.04_3.10.31_1.1.0_alpha.tar.gz u-boot-imx-imx_v2013.04_3.10.31_1.1.0_alpha.tar.bz2 |
ENGR00310794 iMX6 Fix potential plugin bug which wrecks bootROM registerrel_imx_3.10.31_1.1.0_alphaimx_v2013.04_3.10.31_1.1.0_alpha
The R5 register used plugin code is not saved on stack. If this register
is also used in boot ROM, this may cause to destroy the R5 value.
Currently, it is a potential problem because the ROM does not use R5 before
its calling plug-in. But this is the compiler behavior and not be guaranteed.
Signed-off-by: Ye.Li <B37916@freescale.com>
(cherry picked from commit 3a0d342db505bb014e59a275fdddacdc907ea7f9)
-rw-r--r-- | arch/arm/include/asm/arch-mx6/mx6_plugin.S | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm/include/asm/arch-mx6/mx6_plugin.S b/arch/arm/include/asm/arch-mx6/mx6_plugin.S index 79b1bf8..7f37048 100644 --- a/arch/arm/include/asm/arch-mx6/mx6_plugin.S +++ b/arch/arm/include/asm/arch-mx6/mx6_plugin.S @@ -93,6 +93,7 @@ after_calling_rom___pu_irom_hwcnfg_setup: * plugin_download(void **start, size_t *bytes, UINT32 *ivt_offset) */ pop {r0-r4, lr} + push {r5} ldr r5, boot_data2 str r5, [r0] ldr r5, image_len2 @@ -100,6 +101,7 @@ after_calling_rom___pu_irom_hwcnfg_setup: ldr r5, second_ivt_offset str r5, [r2] mov r0, #1 + pop {r5} /* return back to ROM code */ bx lr |