aboutsummaryrefslogtreecommitdiff
path: root/target/ppc
diff options
context:
space:
mode:
authorAlex Zuepke <azu@sysgo.de>2017-02-14 12:54:29 +0100
committerDavid Gibson <david@gibson.dropbear.id.au>2017-02-22 14:28:53 +1100
commit0a4c774086d2246ca14abc5471bf2173d63a3d65 (patch)
tree206c248dca76427526816f3140b8be10babf7ff7 /target/ppc
parent87684b4c4039fcf29ac9a95d46fed166e57d7ed9 (diff)
target-ppc: fix Book-E TLB matching
The Book-E TLB matching process should bail out early when a TLB entry matches, but the access permissions are wrong. The CPU will then raise a DSI error instead of a Data TLB error, as described for TLB matching in Freescale and IBM documents. Signed-off-by: Alex Zuepke <azu@sysgo.de> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'target/ppc')
-rw-r--r--target/ppc/mmu_helper.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/target/ppc/mmu_helper.c b/target/ppc/mmu_helper.c
index 172a305e0f..eb2d482ef7 100644
--- a/target/ppc/mmu_helper.c
+++ b/target/ppc/mmu_helper.c
@@ -825,7 +825,7 @@ static int mmubooke_get_physical_address(CPUPPCState *env, mmu_ctx_t *ctx,
tlb = &env->tlb.tlbe[i];
ret = mmubooke_check_tlb(env, tlb, &raddr, &ctx->prot, address, rw,
access_type, i);
- if (!ret) {
+ if (ret != -1) {
break;
}
}