diff options
Diffstat (limited to 'firmware/crt0.S')
-rw-r--r-- | firmware/crt0.S | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/firmware/crt0.S b/firmware/crt0.S index 99aab83867..0343fd1e23 100644 --- a/firmware/crt0.S +++ b/firmware/crt0.S | |||
@@ -112,6 +112,20 @@ copy_l: | |||
112 | bf copy_l | 112 | bf copy_l |
113 | nop | 113 | nop |
114 | 114 | ||
115 | /* copy the .topram section */ | ||
116 | mov.l topramcopy_k,r0 | ||
117 | mov.l topram_k,r1 | ||
118 | mov.l topramend_k,r2 | ||
119 | copy_l2: | ||
120 | mov.l @r0,r3 | ||
121 | mov.l r3,@r1 | ||
122 | add #4,r0 | ||
123 | add #4,r1 | ||
124 | cmp/ge r2,r1 | ||
125 | bf copy_l2 | ||
126 | nop | ||
127 | |||
128 | |||
115 | /* Munge the main thread stack */ | 129 | /* Munge the main thread stack */ |
116 | mov.l stack_k,r2 | 130 | mov.l stack_k,r2 |
117 | mov.l deadbeef_k,r0 | 131 | mov.l deadbeef_k,r0 |
@@ -150,6 +164,12 @@ iram_k: | |||
150 | .long _iramstart | 164 | .long _iramstart |
151 | iramend_k: | 165 | iramend_k: |
152 | .long _iramend | 166 | .long _iramend |
167 | topramcopy_k: | ||
168 | .long _topramcopy | ||
169 | topram_k: | ||
170 | .long _topramstart | ||
171 | topramend_k: | ||
172 | .long _topramend | ||
153 | main_k: | 173 | main_k: |
154 | .long _main | 174 | .long _main |
155 | vbr_k: | 175 | vbr_k: |