Removed the tag check in InvalidateTLBEntry. All four TLB entries are always cleared on each invalidate command.

Initialised the TLB cache to start from a consistent state on reset.
This commit is contained in:
skidau
2014-12-05 19:56:45 +11:00
parent 693f413364
commit 997681b65a
2 changed files with 35 additions and 32 deletions

View File

@ -121,6 +121,20 @@ void Init(int cpu_core)
ppcState.pagetable_base = 0;
ppcState.pagetable_hashmask = 0;
for (int tlb = 0; tlb < 2; tlb++)
{
for (int set = 0; set < 64; set++)
{
for (int way = 0; way < 2; way++)
{
ppcState.tlb[tlb][set][way].flags = TLB_FLAG_INVALID;
ppcState.tlb[tlb][set][way].paddr = 0;
ppcState.tlb[tlb][set][way].pteg = 0;
ppcState.tlb[tlb][set][way].tag = 0;
}
}
}
ResetRegisters();
PPCTables::InitTables(cpu_core);