summaryrefslogtreecommitdiff
path: root/firmware/descramble.S
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2005-11-28 22:42:38 +0000
committerJens Arnold <amiconn@rockbox.org>2005-11-28 22:42:38 +0000
commit4d66fc8dc248e4169a5d1aa5bdc80c85dabbcee1 (patch)
tree9456f9bb076dd0df50e3ff170e321ec993301ef3 /firmware/descramble.S
parent27c658c8a655ebe4f8160c24486867aca2900754 (diff)
Fixed two more than 3 years old bugs in RoLo: (1) Read start address from image instead of using hard coded loadaddress+0x200. (2) Set desired stack pointer. The stack pointer used to remain wherever it was when invoking RoLo...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8100 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/descramble.S')
-rw-r--r--firmware/descramble.S10
1 files changed, 3 insertions, 7 deletions
diff --git a/firmware/descramble.S b/firmware/descramble.S
index 34e4d830c8..70b133460f 100644
--- a/firmware/descramble.S
+++ b/firmware/descramble.S
@@ -104,8 +104,6 @@ _rolo_restart:
sub r4,r0 /* r0 = dest - source */
add #-4,r0 /* adjust for early increment */
add r4,r6 /* r6 = source + len */
- mov.w .offset,r1
- add r1,r5 /* start_func() */
.copy: /* loop takes 6 cycles per longword */
mov.l @r4+,r1
@@ -113,11 +111,9 @@ _rolo_restart:
mov.l r1,@(r0,r4)
bt .copy
- jmp @r5
- nop
-
-.offset:
- .word 0x200
+ mov.l @r5+,r0 /* start address from image */
+ jmp @r0
+ mov.l @r5+,r15 /* stack pointer from image */
.end:
.size _descramble,.end-_descramble