Line 84... |
Line 84... |
printf("EXCEPTION: read out of memory (32-bit access to %.8lx)\n", fetchaddr);
|
printf("EXCEPTION: read out of memory (32-bit access to %.8lx)\n", fetchaddr);
|
except_handle(EXCEPT_BUSERR, cur_vadd);
|
except_handle(EXCEPT_BUSERR, cur_vadd);
|
return 0;
|
return 0;
|
}
|
}
|
if (!pending.valid && cur_area->log)
|
if (!pending.valid && cur_area->log)
|
fprintf (cur_area->log, "[%08x] -> read %08x\n", fetchaddr, tmp);
|
fprintf (cur_area->log, "[%08lx] -> read %08lx\n", fetchaddr, tmp);
|
return tmp;
|
return tmp;
|
}
|
}
|
|
|
/* Which set to check out? */
|
/* Which set to check out? */
|
set = (fetchaddr / config.ic.blocksize) % config.ic.nsets;
|
set = (fetchaddr / config.ic.blocksize) % config.ic.nsets;
|
Line 132... |
Line 132... |
printf("EXCEPTION: read out of memory (32-bit access to %.8lx)\n", fetchaddr);
|
printf("EXCEPTION: read out of memory (32-bit access to %.8lx)\n", fetchaddr);
|
except_handle(EXCEPT_BUSERR, cur_vadd);
|
except_handle(EXCEPT_BUSERR, cur_vadd);
|
return 0;
|
return 0;
|
}
|
}
|
if (!pending.valid && cur_area->log)
|
if (!pending.valid && cur_area->log)
|
fprintf (cur_area->log, "[%08x] -> read %08x\n", fetchaddr, tmp);
|
fprintf (cur_area->log, "[%08lx] -> read %08lx\n", fetchaddr, tmp);
|
}
|
}
|
|
|
ic[set].way[minway].tagaddr = tagaddr;
|
ic[set].way[minway].tagaddr = tagaddr;
|
for (i = 0; i < config.ic.nways; i++)
|
for (i = 0; i < config.ic.nways; i++)
|
if (ic[set].way[i].lru)
|
if (ic[set].way[i].lru)
|
Line 187... |
Line 187... |
|
|
inline void ic_clock()
|
inline void ic_clock()
|
{
|
{
|
unsigned long addr;
|
unsigned long addr;
|
|
|
if (addr = mfspr(SPR_ICBPR)) {
|
if ((addr = mfspr(SPR_ICBPR))) {
|
ic_simulate_fetch(addr);
|
ic_simulate_fetch(addr);
|
mtspr(SPR_ICBPR, 0);
|
mtspr(SPR_ICBPR, 0);
|
}
|
}
|
if (addr = mfspr(SPR_ICBIR)) {
|
if ((addr = mfspr(SPR_ICBIR))) {
|
ic_inv(addr);
|
ic_inv(addr);
|
mtspr(SPR_ICBIR, 0);
|
mtspr(SPR_ICBIR, 0);
|
}
|
}
|
if (addr = mfspr(SPR_ICBLR)) {
|
if ((addr = mfspr(SPR_ICBLR))) {
|
mtspr(SPR_ICBLR, 0);
|
mtspr(SPR_ICBLR, 0);
|
}
|
}
|
}
|
}
|
|
|
No newline at end of file
|
No newline at end of file
|