From 76fa0f7e30398e01d405b4391c30b99dca4c9288 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nils=20Wallm=C3=A9nius?= Date: Mon, 16 Jul 2007 19:26:07 +0000 Subject: 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 --- firmware/rolo.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/firmware/rolo.c b/firmware/rolo.c index 1ad59e2..427c8a2 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++; -- cgit v1.1