summaryrefslogtreecommitdiff
path: root/firmware/rolo.c
diff options
context:
space:
mode:
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,
98extern void rolo_restart(const unsigned char* source, unsigned char* dest, 98extern void rolo_restart(const unsigned char* source, unsigned char* dest,
99 int length); 99 int length);
100#else 100#else
101void rolo_restart(const unsigned char* source, unsigned char* dest, 101STATICIRAM void rolo_restart(const unsigned char* source, unsigned char* dest,
102 long length) __attribute__ ((section (".icode"))); 102 long length) ICODE_ATTR;
103void rolo_restart(const unsigned char* source, unsigned char* dest, 103STATICIRAM void rolo_restart(const unsigned char* source, unsigned char* dest,
104 long length) 104 long length)
105{ 105{
106 long i; 106 long i;
107 unsigned char* localdest = dest; 107 unsigned char* localdest = dest;
@@ -109,6 +109,9 @@ void rolo_restart(const unsigned char* source, unsigned char* dest,
109 unsigned long* memmapregs = (unsigned long*)0xf000f000; 109 unsigned long* memmapregs = (unsigned long*)0xf000f000;
110#endif 110#endif
111 111
112 /* This is the equivalent of a call to memcpy() but this must be done from
113 iram to avoid overwriting itself and we don't want to depend on memcpy()
114 always being in iram */
112 for(i = 0;i < length;i++) 115 for(i = 0;i < length;i++)
113 *localdest++ = *source++; 116 *localdest++ = *source++;
114 117