summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYe.Li <B37916@freescale.com>2014-04-28 16:19:44 +0800
committerYe.Li <B37916@freescale.com>2014-04-28 17:26:44 +0800
commit3a0d342db505bb014e59a275fdddacdc907ea7f9 (patch)
tree9fee4f8638e638dc540729b96ea2953c48ef29d0
parentb79672fd60d35cd74fb0e883eab652bb48b3f4cf (diff)
downloadu-boot-imx-kk4.4.2_2.0.0-alpha.zip
u-boot-imx-kk4.4.2_2.0.0-alpha.tar.gz
u-boot-imx-kk4.4.2_2.0.0-alpha.tar.bz2
ENGR00310794 iMX6 Fix potential plugin bug which wrecks bootROM registerkk4.4.2_2.0.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>
-rw-r--r--arch/arm/include/asm/arch-mx6/mx6_plugin.S2
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