File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -226,7 +226,10 @@ void processor_t::step(size_t n)
226226 if (extension_enabled (EXT_ZICCID)) {
227227 // Ziccid requires stores eventually become visible to instruction fetch,
228228 // so periodically flush the I$
229- _mmu->flush_icache ();
229+ if (ziccid_flush_count-- == 0 ) {
230+ ziccid_flush_count += ZICCID_FLUSH_PERIOD;
231+ _mmu->flush_icache ();
232+ }
230233 }
231234
232235 while (n > 0 ) {
Original file line number Diff line number Diff line change @@ -412,6 +412,9 @@ class processor_t : public abstract_device_t
412412 static const size_t OPCODE_CACHE_SIZE = 4095 ;
413413 opcode_cache_entry_t opcode_cache[OPCODE_CACHE_SIZE];
414414
415+ unsigned ziccid_flush_count = 0 ;
416+ static const unsigned ZICCID_FLUSH_PERIOD = 10 ;
417+
415418 bool is_handled_in_vs ();
416419 void take_pending_interrupt () { take_interrupt (state.mip ->read () & state.mie ->read ()); }
417420 void take_interrupt (reg_t mask); // take first enabled interrupt in mask
You can’t perform that action at this time.
0 commit comments