aboutsummaryrefslogtreecommitdiff
path: root/target/openrisc/mmu.c
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2018-05-22 18:21:21 -0700
committerStafford Horne <shorne@gmail.com>2018-07-03 00:05:28 +0900
commitfd992ee7e3fb12aea888744313a2869c8848ef9d (patch)
tree229219a3160d8e4bb831e184d1bef4ef91f658fa /target/openrisc/mmu.c
parent23d45ebdb198378ae580c98ac898aa4b615059fd (diff)
target/openrisc: Merge mmu_helper.c into mmu.c
With tlb_fill in mmu.c, we can simplify things further. Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Stafford Horne <shorne@gmail.com>
Diffstat (limited to 'target/openrisc/mmu.c')
-rw-r--r--target/openrisc/mmu.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/target/openrisc/mmu.c b/target/openrisc/mmu.c
index b2effaa6d7..9b4b5cf04f 100644
--- a/target/openrisc/mmu.c
+++ b/target/openrisc/mmu.c
@@ -240,4 +240,15 @@ hwaddr openrisc_cpu_get_phys_page_debug(CPUState *cs, vaddr addr)
return phys_addr;
}
}
+
+void tlb_fill(CPUState *cs, target_ulong addr, int size,
+ MMUAccessType access_type, int mmu_idx, uintptr_t retaddr)
+{
+ int ret = openrisc_cpu_handle_mmu_fault(cs, addr, size,
+ access_type, mmu_idx);
+ if (ret) {
+ /* Raise Exception. */
+ cpu_loop_exit_restore(cs, retaddr);
+ }
+}
#endif