ppcmmu: Handle undefined mmu mode.

This commit is contained in:
joevt 2023-11-12 22:52:41 -08:00 committed by dingusdev
parent c14974d167
commit aed74479fd
1 changed files with 8 additions and 0 deletions

View File

@ -389,6 +389,10 @@ void mmu_change_mode()
pCurITLB1 = &itlb1_mode2[0];
pCurITLB2 = &itlb2_mode2[0];
break;
case 1:
// user mode can't disable translations
LOG_F(ERROR, "instruction mmu mode 1 is invalid!");
mmu_mode = 3;
case 3: // user mode with instruction translation enabled
pCurITLB1 = &itlb1_mode3[0];
pCurITLB2 = &itlb2_mode3[0];
@ -410,6 +414,10 @@ void mmu_change_mode()
pCurDTLB1 = &dtlb1_mode2[0];
pCurDTLB2 = &dtlb2_mode2[0];
break;
case 1:
// user mode can't disable translations
LOG_F(ERROR, "data mmu mode 1 is invalid!");
mmu_mode = 3;
case 3: // user mode with data translation enabled
pCurDTLB1 = &dtlb1_mode3[0];
pCurDTLB2 = &dtlb2_mode3[0];