mirror of
https://github.com/dingusdev/dingusppc.git
synced 2026-10-25 01:02:27 +00:00
debugger: More parsing bat changes.
- For MPC601, ibat#l should be bat#. - For non-MPC601, ibat#l should be dbat#l for dbats. - Don't show info for invalid bats on MPC601.
This commit is contained in:
1 parent
20ed0f7620
commit
d94bf01163
1 file changed
+20
-10
+20
-10
@@ -625,19 +625,29 @@ static void print_mmu_regs()
|
||||
for (int i = 0; i < 4 + (is_601 ? 0 : 4); i++) {
|
||||
PPC_BAT_entry *bat_entry = i < 4 ? ibat_array : dbat_array;
|
||||
bat_entry = &bat_entry[i & 3];
|
||||
printf(" %sbat%du : %08X ibat%dl : %08X ; range : %08X..%08X -> %08X..%08X access : %s%s protection : %s%s",
|
||||
printf(" %sbat%du : %08X %sbat%dl : %08X",
|
||||
is_601 ? "" : i < 4 ? "i" : "d",
|
||||
i & 3, ppc_state.spr[528+i*2],
|
||||
i & 3, ppc_state.spr[529+i*2],
|
||||
bat_entry->bepi, bat_entry->bepi + ~bat_entry->hi_mask,
|
||||
bat_entry->phys_hi, bat_entry->phys_hi + ~bat_entry->hi_mask,
|
||||
bat_entry->access & 2 ? is_601 ? "Ks" : "Vs" : "__",
|
||||
bat_entry->access & 1 ? is_601 ? "Ku" : "Vp" : "__",
|
||||
bat_entry->prot & 2 ? "P" : "_",
|
||||
bat_entry->prot & 1 ? "P" : "_"
|
||||
is_601 ? "" : i < 4 ? "i" : "d",
|
||||
i & 3, ppc_state.spr[529+i*2]
|
||||
);
|
||||
if (is_601) {
|
||||
printf(" (%s)", bat_entry->valid ? "valid" : "invalid");
|
||||
if (!is_601 || bat_entry->valid) {
|
||||
printf(" ; range : %08X..%08X -> %08X..%08X access : %s%s protection : %s%s",
|
||||
bat_entry->bepi, bat_entry->bepi + ~bat_entry->hi_mask,
|
||||
bat_entry->phys_hi, bat_entry->phys_hi + ~bat_entry->hi_mask,
|
||||
bat_entry->access & 2 ? is_601 ? "Ks" : "Vs" : "__",
|
||||
bat_entry->access & 1 ? is_601 ? "Ku" : "Vp" : "__",
|
||||
bat_entry->prot & 2 ? "P" : "_",
|
||||
bat_entry->prot & 1 ? "P" : "_"
|
||||
);
|
||||
if (is_601) {
|
||||
printf(" (%s)", "valid");
|
||||
}
|
||||
} else {
|
||||
printf(" ; range : %8s..%8s -> %8s..%8s access : %s%s protection : %s%s",
|
||||
"", "", "", "", "__", "__", "_", "_"
|
||||
);
|
||||
printf(" (%s)", "invalid");
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user