]> git.kernelconcepts.de Git - karo-tx-redboot.git/blobdiff - packages/hal/arm/arch/v2_0/src/redboot_linux_exec.c
RedBoot TX53 Release 2012-02-15
[karo-tx-redboot.git] / packages / hal / arm / arch / v2_0 / src / redboot_linux_exec.c
index 9d7a5f9c99f4bab95f7ec9b25d2bf7b807d011a3..b73aa49e319c2385af470305697a8b30ecbcce67 100644 (file)
@@ -459,8 +459,9 @@ do_exec(int argc, char *argv[])
                   __xtramp_end__ - __xtramp_start__);
 
                asm volatile (
-                                         CYGARC_HAL_MMU_OFF_X(%5)
                                          "__xtramp_start__:\n"
+                                         "add pc, %5, #4\n" /* jump to copied trampoline code */
+                                         CYGARC_HAL_MMU_OFF_X(%5)
                                          " cmp %1,%4;\n"                 // Default kernel load address. Relocate
                                          " beq 2f;\n"            // kernel image there if necessary, and
                                          " cmp %2,#0;\n"                 // if size is non-zero
@@ -499,8 +500,9 @@ do_exec(int argc, char *argv[])
                   __tramp_end__ - __tramp_start__);
 
        asm volatile (
-                                 CYGARC_HAL_MMU_OFF(%5)
                                  "__tramp_start__:\n"
+                                 "add pc, %5, #4\n" /* jump to copied trampoline code */
+                                 CYGARC_HAL_MMU_OFF(%5)
                                  " cmp %1,%4;\n"               // Default kernel load address. Relocate
                                  " beq 2f;\n"                  // kernel image there if necessary, and
                                  " cmp %2,#0;\n"               // if size is non-zero