diff options
author | Thomas Martitz <kugel@rockbox.org> | 2010-09-09 14:28:58 +0000 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2010-09-09 14:28:58 +0000 |
commit | 6af762f2bfdadd90875997ec7c2035184d23f8dd (patch) | |
tree | 14a2b80289ff5bd837e4f2672eb653e9ad719d85 | |
parent | 28b30d477295e4401eb09a46ac50920a9749d9b8 (diff) | |
download | rockbox-6af762f2bfdadd90875997ec7c2035184d23f8dd.tar.gz rockbox-6af762f2bfdadd90875997ec7c2035184d23f8dd.zip |
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
-rw-r--r-- | apps/codecs.c | 2 | ||||
-rw-r--r-- | apps/codecs.h | 6 | ||||
-rw-r--r-- | apps/codecs/codec_crt0.c | 8 |
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 = { | |||
118 | semaphore_release, | 118 | semaphore_release, |
119 | #endif | 119 | #endif |
120 | 120 | ||
121 | #if NUM_CORES > 1 | ||
122 | cpucache_flush, | 121 | cpucache_flush, |
123 | cpucache_invalidate, | 122 | cpucache_invalidate, |
124 | #endif | ||
125 | 123 | ||
126 | /* strings and memory */ | 124 | /* strings and memory */ |
127 | strcpy, | 125 | 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 @@ | |||
78 | #define CODEC_ENC_MAGIC 0x52454E43 /* RENC */ | 78 | #define CODEC_ENC_MAGIC 0x52454E43 /* RENC */ |
79 | 79 | ||
80 | /* increase this every time the api struct changes */ | 80 | /* increase this every time the api struct changes */ |
81 | #define CODEC_API_VERSION 34 | 81 | #define CODEC_API_VERSION 35 |
82 | 82 | ||
83 | /* update this to latest version if a change to the api struct breaks | 83 | /* update this to latest version if a change to the api struct breaks |
84 | backwards compatibility (and please take the opportunity to sort in any | 84 | backwards compatibility (and please take the opportunity to sort in any |
85 | new function which are "waiting" at the end of the function table) */ | 85 | new function which are "waiting" at the end of the function table) */ |
86 | #define CODEC_MIN_API_VERSION 34 | 86 | #define CODEC_MIN_API_VERSION 35 |
87 | 87 | ||
88 | /* codec return codes */ | 88 | /* codec return codes */ |
89 | enum codec_status { | 89 | enum codec_status { |
@@ -176,10 +176,8 @@ struct codec_api { | |||
176 | void (*semaphore_release)(struct semaphore *s); | 176 | void (*semaphore_release)(struct semaphore *s); |
177 | #endif /* NUM_CORES */ | 177 | #endif /* NUM_CORES */ |
178 | 178 | ||
179 | #if NUM_CORES > 1 | ||
180 | void (*cpucache_flush)(void); | 179 | void (*cpucache_flush)(void); |
181 | void (*cpucache_invalidate)(void); | 180 | void (*cpucache_invalidate)(void); |
182 | #endif | ||
183 | 181 | ||
184 | /* strings and memory */ | 182 | /* strings and memory */ |
185 | char* (*strcpy)(char *dst, const char *src); | 183 | 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) | |||
47 | #endif | 47 | #endif |
48 | ci->memset(plugin_bss_start, 0, plugin_end_addr - plugin_bss_start); | 48 | ci->memset(plugin_bss_start, 0, plugin_end_addr - plugin_bss_start); |
49 | #endif | 49 | #endif |
50 | #if NUM_CORES > 1 | 50 | /* writeback cleared iedata and bss areas, invalidate icache for |
51 | /* writeback cleared iedata and bss areas */ | 51 | * copied code */ |
52 | ci->cpucache_flush(); | 52 | ci->cpucache_invalidate(); |
53 | #endif | 53 | |
54 | return codec_main(); | 54 | return codec_main(); |
55 | } | 55 | } |
56 | 56 | ||