Skip to contentSkip to conversation

how to clear the D_cache and I_cache in the MIPS linux ?

DISCUSSION fredtan 3 participants 3 messages Apr 22, 2009 MIPS

lore
Share & tools
lore

fredtan

author
#0 lore raw

I am porting native‐code compilation to a JavaScript engine in the MIPS
platform.After the program

finished dynamic and transparent binary translation,it first write back the code into the memory from

D_CACHE,then invalidate I_CACHE,then run the code. My MIPS does not have SYNCI instruction,Cache

instruction is a privilege instruction, the program has no right to use it. So , What can I do ?

Very grateful for any reply !!!

Signature · 2 lines
View this message in context: http://www.nabble.com/how-to-clear-the-D_cache-and-I_cache-in-the-MIPS-linux---tp23172497p23172497.html
Sent from the linux-mips main mailing list archive at Nabble.com.
#1 lore raw
Quoted 5 lines · fredtan

D_CACHE,then invalidate I_CACHE,then run the code. My MIPS does not have SYNCI instruction,Cache

instruction is a privilege instruction, the program has no right to use it. So , What can I do ?

use cacheflush()

Arnaud

#2 lore raw
Quoted 9 lines · Arnaud Patard
Quoted 5 lines · fredtan

D_CACHE,then invalidate I_CACHE,then run the code. My MIPS does not have SYNCI instruction,Cache

instruction is a privilege instruction, the program has no right to use it. So , What can I do ?

use cacheflush()

It is preferable to always use cacheflush(). The plan is to eventually enhance the cacheflush(3) library function to use SYNCI as applicable for a particular platform.

Ralf