diff options
| author | Rafaël Carré <rafael.carre@gmail.com> | 2010-08-30 20:47:53 +0000 |
|---|---|---|
| committer | Rafaël Carré <rafael.carre@gmail.com> | 2010-08-30 20:47:53 +0000 |
| commit | da16248e47901c826a90291d2bb2a7aae78b209a (patch) | |
| tree | fcc2a1944dd1b543e21346b46f50252ffc27fb7c /apps/plugin.c | |
| parent | a1997c13c168beeb41bf2f5b814115cdd5cb574c (diff) | |
| download | rockbox-da16248e47901c826a90291d2bb2a7aae78b209a.zip rockbox-da16248e47901c826a90291d2bb2a7aae78b209a.tar.gz rockbox-da16248e47901c826a90291d2bb2a7aae78b209a.tar.bz2 rockbox-da16248e47901c826a90291d2bb2a7aae78b209a.tar.xz | |
Plugins: modify IRAM copying code
Move to plugin_crt0.c, plugins don't need PLUGIN_IRAM_* macros anymore
IRAM is no longered zeroed before copying (as it is at the same address
than BSS) -> Fix FS#11581
Use cpucache_invalidate() (and not cpucache_flush), needed for self-modifying code on cached IRAM
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27948 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugin.c')
| -rw-r--r-- | apps/plugin.c | 29 |
1 files changed, 5 insertions, 24 deletions
diff --git a/apps/plugin.c b/apps/plugin.c index 767c593..e0455c5 100644 --- a/apps/plugin.c +++ b/apps/plugin.c @@ -109,7 +109,9 @@ static const struct plugin_api rockbox_api = { lcd_clear_display, lcd_getstringsize, lcd_putsxy, + lcd_putsxyf, lcd_puts, + lcd_putsf, lcd_puts_scroll, lcd_stop_scroll, #ifdef HAVE_LCD_CHARCELLS @@ -382,8 +384,10 @@ static const struct plugin_api rockbox_api = { trigger_cpu_boost, cancel_cpu_boost, #endif -#if NUM_CORES > 1 +#ifdef HAVE_CPUCACHE_FLUSH cpucache_flush, +#endif +#ifdef HAVE_CPUCACHE_INVALIDATE cpucache_invalidate, #endif timer_register, @@ -620,9 +624,6 @@ static const struct plugin_api rockbox_api = { plugin_get_audio_buffer, plugin_tsr, plugin_get_current_filename, -#ifdef PLUGIN_USE_IRAM - plugin_iram_init, -#endif #if defined(DEBUG) || defined(SIMULATOR) debugf, #endif @@ -721,9 +722,6 @@ static const struct plugin_api rockbox_api = { /* new stuff at the end, sort into place next time the API gets incompatible */ - - lcd_putsf, - lcd_putsxyf, }; int plugin_load(const char* plugin, const void* parameter) @@ -919,23 +917,6 @@ void* plugin_get_audio_buffer(size_t *buffer_size) #endif } -#ifdef PLUGIN_USE_IRAM -/* Initializes plugin IRAM */ -void plugin_iram_init(char *iramstart, char *iramcopy, size_t iram_size, - char *iedata, size_t iedata_size) -{ - /* We need to stop audio playback in order to use codec IRAM */ - audio_hard_stop(); - memcpy(iramstart, iramcopy, iram_size); - memset(iedata, 0, iedata_size); - memset(iramcopy, 0, iram_size); -#if NUM_CORES > 1 - /* writeback cleared iedata and iramcopy areas */ - cpucache_flush(); -#endif -} -#endif /* PLUGIN_USE_IRAM */ - /* The plugin wants to stay resident after leaving its main function, e.g. runs from timer or own thread. The callback is registered to later instruct it to free its resources before a new plugin gets loaded. */ |