aboutsummaryrefslogtreecommitdiff
path: root/target/tricore/helper.c
diff options
context:
space:
mode:
authorBastian Koppelmann <kbastian@mail.uni-paderborn.de>2020-05-29 09:21:47 +0200
committerBastian Koppelmann <kbastian@mail.uni-paderborn.de>2020-06-01 16:55:12 +0200
commite00a56dbc3c278c36855fd0b72adc72c8bcf0cf5 (patch)
treee168a8fd3447caf32d324dd2f348c06645d2f32e /target/tricore/helper.c
parent1ed8739a9ab38f97f901f0988d266b2981627f1b (diff)
target/tricore: Implement tricore_cpu_get_phys_page_debug
this also removes tricore_cpu_get_phys_page_attrs_debug() as it was a temporary fix from b190f477e29c7cd03a8fee49c96d27f160e3f5b0. Signed-off-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de> Message-Id: <20200529072148.284037-5-kbastian@mail.uni-paderborn.de>
Diffstat (limited to 'target/tricore/helper.c')
-rw-r--r--target/tricore/helper.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/target/tricore/helper.c b/target/tricore/helper.c
index d5db7b2c03..7715293263 100644
--- a/target/tricore/helper.c
+++ b/target/tricore/helper.c
@@ -42,6 +42,19 @@ static int get_physical_address(CPUTriCoreState *env, hwaddr *physical,
return ret;
}
+
+hwaddr tricore_cpu_get_phys_page_debug(CPUState *cs, vaddr addr)
+{
+ TriCoreCPU *cpu = TRICORE_CPU(cs);
+ hwaddr phys_addr;
+ int prot;
+ int mmu_idx = cpu_mmu_index(&cpu->env, false);
+
+ if (get_physical_address(&cpu->env, &phys_addr, &prot, addr, 0, mmu_idx)) {
+ return -1;
+ }
+ return phys_addr;
+}
#endif
/* TODO: Add exeption support*/