summaryrefslogtreecommitdiff
path: root/apps/codecs/codec_crt0.c
diff options
context:
space:
mode:
authorFrank Gevaerts <frank@gevaerts.be>2010-10-10 20:49:21 +0000
committerFrank Gevaerts <frank@gevaerts.be>2010-10-10 20:49:21 +0000
commite94eea95389567047dbbfd064f456ab8028b2852 (patch)
tree85d2735f9af77e677d64252053304c297c867858 /apps/codecs/codec_crt0.c
parentbf301fdbb6cc7858d3b53a31d08c06b83c7f10c8 (diff)
Invalidate the CPU cache after clearing bss, to make sure that bss variables that are used via non-cached aliases don't read garbage.
This fixes FS#11653 for me git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28236 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/codec_crt0.c')
-rw-r--r--apps/codecs/codec_crt0.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/codecs/codec_crt0.c b/apps/codecs/codec_crt0.c
index 184da74c8f..cf14e460ec 100644
--- a/apps/codecs/codec_crt0.c
+++ b/apps/codecs/codec_crt0.c
@@ -53,6 +53,10 @@ enum codec_status codec_start(void)
}
#endif /* PLUGIN_USE_IRAM */
ci->memset(plugin_bss_start, 0, plugin_end_addr - plugin_bss_start);
+ /* Some parts of bss may be used via a no-cache alias (at least
+ * portalplayer has this). If we don't clear the cache, those aliases
+ * may read garbage */
+ ci->cpucache_invalidate();
#endif
return codec_main();