mirror of
https://github.com/dingusdev/dingusppc.git
synced 2025-01-10 13:29:38 +00:00
ppcmmu: fix BAT state updates.
This commit is contained in:
parent
f6e208267e
commit
648dfcd47b
@ -878,7 +878,7 @@ static void mpc601_bat_update(uint32_t bat_reg)
|
||||
dbat_entry->valid = false;
|
||||
}
|
||||
|
||||
// MPC601 has unified BATs so we're going to fush both ITLB and DTLB
|
||||
// MPC601 has unified BATs so we're going to flush both ITLB and DTLB
|
||||
if (!gTLBFlushBatEntries) {
|
||||
gTLBFlushBatEntries = true;
|
||||
add_ctx_sync_action(&tlb_flush_bat_entries<TLBType::ITLB>);
|
||||
@ -894,7 +894,6 @@ static void ppc_ibat_update(uint32_t bat_reg)
|
||||
|
||||
upper_reg_num = bat_reg & 0xFFFFFFFE;
|
||||
|
||||
if (ppc_state.spr[upper_reg_num] & 3) { // is that BAT pair valid?
|
||||
bat_entry = &ibat_array[(bat_reg - 528) >> 1];
|
||||
bl = (ppc_state.spr[upper_reg_num] >> 2) & 0x7FF;
|
||||
hi_mask = ~((bl << 17) | 0x1FFFF);
|
||||
@ -909,7 +908,6 @@ static void ppc_ibat_update(uint32_t bat_reg)
|
||||
gTLBFlushBatEntries = true;
|
||||
add_ctx_sync_action(&tlb_flush_bat_entries<TLBType::ITLB>);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void ppc_dbat_update(uint32_t bat_reg)
|
||||
@ -920,7 +918,6 @@ static void ppc_dbat_update(uint32_t bat_reg)
|
||||
|
||||
upper_reg_num = bat_reg & 0xFFFFFFFE;
|
||||
|
||||
if (ppc_state.spr[upper_reg_num] & 3) { // is that BAT pair valid?
|
||||
bat_entry = &dbat_array[(bat_reg - 536) >> 1];
|
||||
bl = (ppc_state.spr[upper_reg_num] >> 2) & 0x7FF;
|
||||
hi_mask = ~((bl << 17) | 0x1FFFF);
|
||||
@ -935,7 +932,7 @@ static void ppc_dbat_update(uint32_t bat_reg)
|
||||
gTLBFlushBatEntries = true;
|
||||
add_ctx_sync_action(&tlb_flush_bat_entries<TLBType::DTLB>);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void mmu_pat_ctx_changed()
|
||||
|
Loading…
x
Reference in New Issue
Block a user