diff options
-rw-r--r-- | apps/codecs/codec_crt0.c | 4 | ||||
-rw-r--r-- | apps/plugins/plugin_crt0.c | 4 |
2 files changed, 8 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(); diff --git a/apps/plugins/plugin_crt0.c b/apps/plugins/plugin_crt0.c index 1db9d6a81a..d86c5c367c 100644 --- a/apps/plugins/plugin_crt0.c +++ b/apps/plugins/plugin_crt0.c @@ -90,6 +90,10 @@ enum plugin_status plugin__start(const void *param) /* zero out the bss section */ rb->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 */ + rb->cpucache_invalidate(); #endif /* we come back here if exit() was called or the plugin returned normally */ |