1
0
Fork 0
forked from len0rd/rockbox

iRiver: Moved the main thread stack to IRAM

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6088 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Linus Nielsen Feltzing 2005-03-01 12:25:30 +00:00
parent bf2946ab7a
commit 4eea7ac202
2 changed files with 17 additions and 9 deletions

View file

@ -182,23 +182,31 @@ SECTIONS
_iramend = .;
} > IRAM
#ifdef IRIVER_H100
.stack :
{
*(.stack)
stackbegin = .;
. += 0x8000;
stackend = .;
} > IRAM
#else
/* TRICK ALERT! We want 0x2000 bytes of stack, but we set the section
size smaller, and allow the stack to grow into the .iram copy */
.stack ADDR(.data) + SIZEOF(.data) + SIZEOF(.iram):
{
*(.stack)
_stackbegin = . - SIZEOF(.iram);
stackbegin = . - SIZEOF(.iram);
#if MEMORYSIZE >= 32
. += 0x8000 - SIZEOF(.iram);
#else
. += 0x2000 - SIZEOF(.iram);
#endif
_stackend = .;
stackend = .;
} > DRAM
#endif
#ifdef IRIVER_H100
.bss ADDR(.data) + SIZEOF(.data) + SIZEOF(.iram):
#else
.bss :
#endif
{
_edata = .;
*(.bss)

View file

@ -282,8 +282,8 @@ irq_handler:
.dataloopend:
/* Munge the main stack */
lea _stackbegin,%a2
lea _stackend,%a4
lea stackbegin,%a2
lea stackend,%a4
move.l #0xdeadbeef,%d0
.mungeloop:
cmp.l %a2,%a4
@ -299,7 +299,7 @@ irq_handler:
.section .resetvectors
vectors:
.long _stackend
.long stackend
.long start
#else
/* Platform: Archos Jukebox