forked from len0rd/rockbox
Added main stack munging
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1356 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
e699fba4b1
commit
a23fe48741
1 changed files with 18 additions and 3 deletions
|
|
@ -99,6 +99,17 @@ start_l:
|
||||||
bt start_l
|
bt start_l
|
||||||
nop
|
nop
|
||||||
|
|
||||||
|
/* Munge the main thread stack */
|
||||||
|
mov.l stack_k,r2
|
||||||
|
mov.l deadbeef_k,r0
|
||||||
|
mov.l stackbegin_k,r1
|
||||||
|
munge_loop:
|
||||||
|
mov.l r0,@r1
|
||||||
|
add #4,r1
|
||||||
|
cmp/ge r1,r2
|
||||||
|
bt munge_loop
|
||||||
|
nop
|
||||||
|
|
||||||
! call the mainline
|
! call the mainline
|
||||||
mov.l main_k,r0
|
mov.l main_k,r0
|
||||||
jsr @r0
|
jsr @r0
|
||||||
|
|
@ -108,7 +119,11 @@ start_l:
|
||||||
|
|
||||||
.align 2
|
.align 2
|
||||||
stack_k:
|
stack_k:
|
||||||
.long _stack
|
.long _stackend
|
||||||
|
stackbegin_k:
|
||||||
|
.long _stackbegin
|
||||||
|
deadbeef_k:
|
||||||
|
.long 0xdeadbeef
|
||||||
edata_k:
|
edata_k:
|
||||||
.long _edata
|
.long _edata
|
||||||
end_k:
|
end_k:
|
||||||
|
|
@ -123,6 +138,6 @@ orig_vbr_k:
|
||||||
.section .resetvectors
|
.section .resetvectors
|
||||||
vectors:
|
vectors:
|
||||||
.long start
|
.long start
|
||||||
.long _stack
|
.long _stackend
|
||||||
.long start
|
.long start
|
||||||
.long _stack
|
.long _stackend
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue