]> git.karo-electronics.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 81c1bec83f098427d9ecb1d538950ce7ad729e5e..b73aa49e319c2385af470305697a8b30ecbcce67 100644 (file)
@@ -77,7 +77,7 @@
 #include <cyg/hal/hal_io.h>
 
 #ifndef CYGARC_PHYSICAL_ADDRESS
-# error
+# error CYGARC_PHYSICAL_ADDRESS not defined
 # define CYGARC_PHYSICAL_ADDRESS(x) (x)
 #endif
 
@@ -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