summaryrefslogtreecommitdiff
path: root/firmware/rolo.c
diff options
context:
space:
mode:
authorNils Wallménius <nils@rockbox.org>2007-07-16 19:26:07 +0000
committerNils Wallménius <nils@rockbox.org>2007-07-16 19:26:07 +0000
commit76fa0f7e30398e01d405b4391c30b99dca4c9288 (patch)
treec22252cad1416bd4962bae46428da248b63e738f /firmware/rolo.c
parentc74e9a0755b09ae6443bfaa92dcb5e1bb91d40df (diff)
Make a private function static where possible, add a comment, make a small cosmetic change
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13918 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/rolo.c')
-rw-r--r--firmware/rolo.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/firmware/rolo.c b/firmware/rolo.c
index 1ad59e216b..427c8a2102 100644
--- a/firmware/rolo.c
+++ b/firmware/rolo.c
@@ -98,10 +98,10 @@ extern unsigned short descramble(const unsigned char* source,
extern void rolo_restart(const unsigned char* source, unsigned char* dest,
int length);
#else
-void rolo_restart(const unsigned char* source, unsigned char* dest,
- long length) __attribute__ ((section (".icode")));
-void rolo_restart(const unsigned char* source, unsigned char* dest,
- long length)
+STATICIRAM void rolo_restart(const unsigned char* source, unsigned char* dest,
+ long length) ICODE_ATTR;
+STATICIRAM void rolo_restart(const unsigned char* source, unsigned char* dest,
+ long length)
{
long i;
unsigned char* localdest = dest;
@@ -109,6 +109,9 @@ void rolo_restart(const unsigned char* source, unsigned char* dest,
unsigned long* memmapregs = (unsigned long*)0xf000f000;
#endif
+ /* This is the equivalent of a call to memcpy() but this must be done from
+ iram to avoid overwriting itself and we don't want to depend on memcpy()
+ always being in iram */
for(i = 0;i < length;i++)
*localdest++ = *source++;