target-microblaze: Bypass MMU with MMU_NOMMU_IDX
authorEdgar E. Iglesias <edgar.iglesias@xilinx.com>
Fri, 13 Apr 2018 20:16:57 +0000 (22:16 +0200)
committerEdgar E. Iglesias <edgar.iglesias@xilinx.com>
Tue, 29 May 2018 07:35:13 +0000 (09:35 +0200)
Bypass MMU translation when mmu-index MMU_NOMMU_IDX is used.

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
target/microblaze/helper.c

index a9f4ca93e3e68b389085c963a300859951ebf384..261dcc74c78ec62e53bb7586d5ad891857e2e027 100644 (file)
@@ -58,7 +58,8 @@ int mb_cpu_handle_mmu_fault(CPUState *cs, vaddr address, int size, int rw,
     int prot;
 
     /* Translate if the MMU is available and enabled.  */
-    if (cpu->cfg.use_mmu && (env->sregs[SR_MSR] & MSR_VM)) {
+    if (cpu->cfg.use_mmu && (env->sregs[SR_MSR] & MSR_VM)
+        && mmu_idx != MMU_NOMMU_IDX) {
         uint32_t vaddr, paddr;
         struct microblaze_mmu_lookup lu;