mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 10:37:38 -04:00
PP targets: Make sure the COP cache is invalidated before loading a plugin.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16984 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
4ab52c3456
commit
f79bfcf1d7
1 changed files with 10 additions and 1 deletions
|
@ -585,10 +585,13 @@ int plugin_load(const char* plugin, void* parameter)
|
||||||
struct plugin_header *hdr;
|
struct plugin_header *hdr;
|
||||||
#ifdef SIMULATOR
|
#ifdef SIMULATOR
|
||||||
void *pd;
|
void *pd;
|
||||||
#else
|
#else /* !SIMULATOR */
|
||||||
int fd;
|
int fd;
|
||||||
ssize_t readsize;
|
ssize_t readsize;
|
||||||
|
#if NUM_CORES > 1
|
||||||
|
unsigned my_core;
|
||||||
#endif
|
#endif
|
||||||
|
#endif /* !SIMULATOR */
|
||||||
int xm, ym;
|
int xm, ym;
|
||||||
#ifdef HAVE_REMOTE_LCD
|
#ifdef HAVE_REMOTE_LCD
|
||||||
int rxm, rym;
|
int rxm, rym;
|
||||||
|
@ -637,6 +640,12 @@ int plugin_load(const char* plugin, void* parameter)
|
||||||
gui_syncsplash(HZ*2, str(LANG_PLUGIN_CANT_OPEN), plugin);
|
gui_syncsplash(HZ*2, str(LANG_PLUGIN_CANT_OPEN), plugin);
|
||||||
return fd;
|
return fd;
|
||||||
}
|
}
|
||||||
|
#if NUM_CORES > 1
|
||||||
|
/* Make sure COP cache is flushed and invalidated before loading */
|
||||||
|
my_core = switch_core(CURRENT_CORE ^ 1);
|
||||||
|
invalidate_icache();
|
||||||
|
switch_core(my_core);
|
||||||
|
#endif
|
||||||
|
|
||||||
readsize = read(fd, pluginbuf, PLUGIN_BUFFER_SIZE);
|
readsize = read(fd, pluginbuf, PLUGIN_BUFFER_SIZE);
|
||||||
close(fd);
|
close(fd);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue