]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
target-microblaze: mmu: Add R_TBLX_MISS macros
authorEdgar E. Iglesias <edgar.iglesias@xilinx.com>
Sun, 15 Apr 2018 21:18:49 +0000 (23:18 +0200)
committerEdgar E. Iglesias <edgar.iglesias@xilinx.com>
Tue, 29 May 2018 07:35:14 +0000 (09:35 +0200)
Add a R_TBLX_MISS MASK and SHIFT macros.

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/mmu.c
target/microblaze/mmu.h

index 0019ebd18f62deb573ffb908d751444262441a29..f4a4c339c972a8382d7d5f1e36f12b9efed63753 100644 (file)
@@ -292,8 +292,9 @@ void mmu_write(CPUMBState *env, uint32_t rn, uint32_t v)
                                 v & TLB_EPN_MASK, 0, cpu_mmu_index(env, false));
             if (hit) {
                 env->mmu.regs[MMU_R_TLBX] = lu.idx;
-            } else
-                env->mmu.regs[MMU_R_TLBX] |= 0x80000000;
+            } else {
+                env->mmu.regs[MMU_R_TLBX] |= R_TBLX_MISS_MASK;
+            }
             break;
         }
         default:
index 3b7a9983d57edc71aa4f4c243b0f11bb9e1c0656..113539c6e9b1a3df915863fd05995381be0b187e 100644 (file)
 #define TLB_M                 0x00000002 /* Memory is coherent */
 #define TLB_G                 0x00000001 /* Memory is guarded from prefetch */
 
+/* TLBX  */
+#define R_TBLX_MISS_SHIFT 31
+#define R_TBLX_MISS_MASK (1U << R_TBLX_MISS_SHIFT)
+
 #define TLB_ENTRIES    64
 
 struct microblaze_mmu