From: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org
Subject: [PULL 4/5] target/tricore: Implement tricore_cpu_get_phys_page_debug
Date: Mon, 1 Jun 2020 17:11:18 +0200 [thread overview]
Message-ID: <20200601151119.33196-5-kbastian@mail.uni-paderborn.de> (raw)
In-Reply-To: <20200601151119.33196-1-kbastian@mail.uni-paderborn.de>
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>
---
target/tricore/cpu.c | 10 +---------
target/tricore/helper.c | 13 +++++++++++++
2 files changed, 14 insertions(+), 9 deletions(-)
diff --git a/target/tricore/cpu.c b/target/tricore/cpu.c
index 743b404a95..c8c1e9e7d5 100644
--- a/target/tricore/cpu.c
+++ b/target/tricore/cpu.c
@@ -23,14 +23,6 @@
#include "exec/exec-all.h"
#include "qemu/error-report.h"
-static hwaddr tricore_cpu_get_phys_page_attrs_debug(CPUState *cpu, vaddr addr,
- MemTxAttrs *attrs)
-{
- error_report("function cpu_get_phys_page_attrs_debug not "
- "implemented, aborting");
- return -1;
-}
-
static inline void set_feature(CPUTriCoreState *env, int feature)
{
env->features |= 1ULL << feature;
@@ -161,7 +153,7 @@ static void tricore_cpu_class_init(ObjectClass *c, void *data)
cc->dump_state = tricore_cpu_dump_state;
cc->set_pc = tricore_cpu_set_pc;
cc->synchronize_from_tb = tricore_cpu_synchronize_from_tb;
- cc->get_phys_page_attrs_debug = tricore_cpu_get_phys_page_attrs_debug;
+ cc->get_phys_page_debug = tricore_cpu_get_phys_page_debug;
cc->tcg_initialize = tricore_tcg_init;
cc->tlb_fill = tricore_cpu_tlb_fill;
}
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*/
--
2.26.2
next prev parent reply other threads:[~2020-06-01 15:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-01 15:11 [PULL 0/5] tricore queue Bastian Koppelmann
2020-06-01 15:11 ` [PULL 1/5] target/tricore: Don't save pc in generate_qemu_excp Bastian Koppelmann
2020-06-01 15:11 ` [PULL 2/5] target/tricore: Move translate feature check to ctx Bastian Koppelmann
2020-06-01 15:11 ` [PULL 3/5] target/tricore: Raise EXCP_DEBUG in gen_goto_tb() for singlestep Bastian Koppelmann
2020-06-01 15:11 ` Bastian Koppelmann [this message]
2020-06-01 15:11 ` [PULL 5/5] target/tricore: Implement gdbstub Bastian Koppelmann
2020-06-01 20:33 ` [PULL 0/5] tricore queue Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200601151119.33196-5-kbastian@mail.uni-paderborn.de \
--to=kbastian@mail.uni-paderborn.de \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).