forked from len0rd/rockbox
Replace some nasty hard-coded offsets with labels
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19730 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
759bede3bc
commit
e04e16395f
1 changed files with 5 additions and 4 deletions
|
|
@ -48,8 +48,9 @@ start:
|
||||||
|
|
||||||
The following two values are filled in by mktccboot.
|
The following two values are filled in by mktccboot.
|
||||||
*/
|
*/
|
||||||
.word 0 /* Saved entrypoint of original firmware*/
|
of_entrypoint: .word 0 /* Saved entrypoint of original firmware*/
|
||||||
.word 0 /* Location in RAM of the start of our bootloader */
|
bl_entrypoint: .word 0 /* Location in RAM of the start of our bootloader */
|
||||||
|
|
||||||
#else
|
#else
|
||||||
// ldr pc, =start_loc /* jump to the main entry point */
|
// ldr pc, =start_loc /* jump to the main entry point */
|
||||||
b start_loc
|
b start_loc
|
||||||
|
|
@ -95,7 +96,7 @@ start_loc:
|
||||||
#error No bootup key detection implemented for this target
|
#error No bootup key detection implemented for this target
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ldrne pc, [pc, #-28] /* Jump to OF if HOLD button not pressed */
|
ldrne pc, of_entrypoint /* Jump to OF if HOLD button not pressed */
|
||||||
#endif /* TCCBOOT */
|
#endif /* TCCBOOT */
|
||||||
|
|
||||||
/* We are now definitely executing the bootloader, so we relocate to the
|
/* We are now definitely executing the bootloader, so we relocate to the
|
||||||
|
|
@ -103,7 +104,7 @@ start_loc:
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef TCCBOOT
|
#ifdef TCCBOOT
|
||||||
ldr r0, [pc, #-28] /* mktccboot fills in the load address */
|
ldr r0, bl_entrypoint
|
||||||
#else
|
#else
|
||||||
mov r0, #0x20000000 /* Otherwise, load address is the start of DRAM */
|
mov r0, #0x20000000 /* Otherwise, load address is the start of DRAM */
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue