diff options
Diffstat (limited to 'firmware/target/arm')
-rw-r--r-- | firmware/target/arm/tcc77x/crt0.S | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/firmware/target/arm/tcc77x/crt0.S b/firmware/target/arm/tcc77x/crt0.S index 03dc2a9771..68946eb6fa 100644 --- a/firmware/target/arm/tcc77x/crt0.S +++ b/firmware/target/arm/tcc77x/crt0.S | |||
@@ -48,8 +48,9 @@ start: | |||
48 | 48 | ||
49 | The following two values are filled in by mktccboot. | 49 | The following two values are filled in by mktccboot. |
50 | */ | 50 | */ |
51 | .word 0 /* Saved entrypoint of original firmware*/ | 51 | of_entrypoint: .word 0 /* Saved entrypoint of original firmware*/ |
52 | .word 0 /* Location in RAM of the start of our bootloader */ | 52 | bl_entrypoint: .word 0 /* Location in RAM of the start of our bootloader */ |
53 | |||
53 | #else | 54 | #else |
54 | // ldr pc, =start_loc /* jump to the main entry point */ | 55 | // ldr pc, =start_loc /* jump to the main entry point */ |
55 | b start_loc | 56 | b start_loc |
@@ -95,7 +96,7 @@ start_loc: | |||
95 | #error No bootup key detection implemented for this target | 96 | #error No bootup key detection implemented for this target |
96 | #endif | 97 | #endif |
97 | 98 | ||
98 | ldrne pc, [pc, #-28] /* Jump to OF if HOLD button not pressed */ | 99 | ldrne pc, of_entrypoint /* Jump to OF if HOLD button not pressed */ |
99 | #endif /* TCCBOOT */ | 100 | #endif /* TCCBOOT */ |
100 | 101 | ||
101 | /* We are now definitely executing the bootloader, so we relocate to the | 102 | /* We are now definitely executing the bootloader, so we relocate to the |
@@ -103,7 +104,7 @@ start_loc: | |||
103 | */ | 104 | */ |
104 | 105 | ||
105 | #ifdef TCCBOOT | 106 | #ifdef TCCBOOT |
106 | ldr r0, [pc, #-28] /* mktccboot fills in the load address */ | 107 | ldr r0, bl_entrypoint |
107 | #else | 108 | #else |
108 | mov r0, #0x20000000 /* Otherwise, load address is the start of DRAM */ | 109 | mov r0, #0x20000000 /* Otherwise, load address is the start of DRAM */ |
109 | #endif | 110 | #endif |