summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2010-09-09 14:28:58 +0000
committerThomas Martitz <kugel@rockbox.org>2010-09-09 14:28:58 +0000
commit6af762f2bfdadd90875997ec7c2035184d23f8dd (patch)
tree14a2b80289ff5bd837e4f2672eb653e9ad719d85 /apps
parent28b30d477295e4401eb09a46ac50920a9749d9b8 (diff)
codecs_crt0.c needs to call cpucache_invalidate after copying code around.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28052 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/codecs.c2
-rw-r--r--apps/codecs.h6
-rw-r--r--apps/codecs/codec_crt0.c8
3 files changed, 6 insertions, 10 deletions
diff --git a/apps/codecs.c b/apps/codecs.c
index 25cc659e42..35f6363986 100644
--- a/apps/codecs.c
+++ b/apps/codecs.c
@@ -118,10 +118,8 @@ struct codec_api ci = {
semaphore_release,
#endif
-#if NUM_CORES > 1
cpucache_flush,
cpucache_invalidate,
-#endif
/* strings and memory */
strcpy,
diff --git a/apps/codecs.h b/apps/codecs.h
index 520aaeebc7..f94c81ab20 100644
--- a/apps/codecs.h
+++ b/apps/codecs.h
@@ -78,12 +78,12 @@
#define CODEC_ENC_MAGIC 0x52454E43 /* RENC */
/* increase this every time the api struct changes */
-#define CODEC_API_VERSION 34
+#define CODEC_API_VERSION 35
/* update this to latest version if a change to the api struct breaks
backwards compatibility (and please take the opportunity to sort in any
new function which are "waiting" at the end of the function table) */
-#define CODEC_MIN_API_VERSION 34
+#define CODEC_MIN_API_VERSION 35
/* codec return codes */
enum codec_status {
@@ -176,10 +176,8 @@ struct codec_api {
void (*semaphore_release)(struct semaphore *s);
#endif /* NUM_CORES */
-#if NUM_CORES > 1
void (*cpucache_flush)(void);
void (*cpucache_invalidate)(void);
-#endif
/* strings and memory */
char* (*strcpy)(char *dst, const char *src);
diff --git a/apps/codecs/codec_crt0.c b/apps/codecs/codec_crt0.c
index c680030fee..fdb79092f4 100644
--- a/apps/codecs/codec_crt0.c
+++ b/apps/codecs/codec_crt0.c
@@ -47,10 +47,10 @@ enum codec_status codec_start(void)
#endif
ci->memset(plugin_bss_start, 0, plugin_end_addr - plugin_bss_start);
#endif
-#if NUM_CORES > 1
- /* writeback cleared iedata and bss areas */
- ci->cpucache_flush();
-#endif
+ /* writeback cleared iedata and bss areas, invalidate icache for
+ * copied code */
+ ci->cpucache_invalidate();
+
return codec_main();
}