summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2005-03-01 12:25:30 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2005-03-01 12:25:30 +0000
commit4eea7ac2025293de8e8ad88ac331c3cc5d0003db (patch)
treecb1fa4c29bd48aa76808662c42d84936d10d8de3
parentbf2946ab7a9dd90d4b8ba60dc63a80b286060ff8 (diff)
downloadrockbox-4eea7ac2025293de8e8ad88ac331c3cc5d0003db.tar.gz
rockbox-4eea7ac2025293de8e8ad88ac331c3cc5d0003db.zip
iRiver: Moved the main thread stack to IRAM
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6088 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/app.lds20
-rw-r--r--firmware/crt0.S6
2 files changed, 17 insertions, 9 deletions
diff --git a/firmware/app.lds b/firmware/app.lds
index 2e70eb957d..daed49a628 100644
--- a/firmware/app.lds
+++ b/firmware/app.lds
@@ -182,23 +182,31 @@ SECTIONS
182 _iramend = .; 182 _iramend = .;
183 } > IRAM 183 } > IRAM
184 184
185#ifdef IRIVER_H100
186 .stack :
187 {
188 *(.stack)
189 stackbegin = .;
190 . += 0x8000;
191 stackend = .;
192 } > IRAM
193#else
185 /* TRICK ALERT! We want 0x2000 bytes of stack, but we set the section 194 /* TRICK ALERT! We want 0x2000 bytes of stack, but we set the section
186 size smaller, and allow the stack to grow into the .iram copy */ 195 size smaller, and allow the stack to grow into the .iram copy */
187 .stack ADDR(.data) + SIZEOF(.data) + SIZEOF(.iram): 196 .stack ADDR(.data) + SIZEOF(.data) + SIZEOF(.iram):
188 { 197 {
189 *(.stack) 198 *(.stack)
190 _stackbegin = . - SIZEOF(.iram); 199 _stackbegin = . - SIZEOF(.iram);
191 stackbegin = . - SIZEOF(.iram);
192#if MEMORYSIZE >= 32
193 . += 0x8000 - SIZEOF(.iram);
194#else
195 . += 0x2000 - SIZEOF(.iram); 200 . += 0x2000 - SIZEOF(.iram);
196#endif
197 _stackend = .; 201 _stackend = .;
198 stackend = .;
199 } > DRAM 202 } > DRAM
203#endif
200 204
205#ifdef IRIVER_H100
206 .bss ADDR(.data) + SIZEOF(.data) + SIZEOF(.iram):
207#else
201 .bss : 208 .bss :
209#endif
202 { 210 {
203 _edata = .; 211 _edata = .;
204 *(.bss) 212 *(.bss)
diff --git a/firmware/crt0.S b/firmware/crt0.S
index 8928890eeb..9622493683 100644
--- a/firmware/crt0.S
+++ b/firmware/crt0.S
@@ -282,8 +282,8 @@ irq_handler:
282.dataloopend: 282.dataloopend:
283 283
284 /* Munge the main stack */ 284 /* Munge the main stack */
285 lea _stackbegin,%a2 285 lea stackbegin,%a2
286 lea _stackend,%a4 286 lea stackend,%a4
287 move.l #0xdeadbeef,%d0 287 move.l #0xdeadbeef,%d0
288.mungeloop: 288.mungeloop:
289 cmp.l %a2,%a4 289 cmp.l %a2,%a4
@@ -299,7 +299,7 @@ irq_handler:
299 299
300 .section .resetvectors 300 .section .resetvectors
301vectors: 301vectors:
302 .long _stackend 302 .long stackend
303 .long start 303 .long start
304#else 304#else
305 /* Platform: Archos Jukebox 305 /* Platform: Archos Jukebox