summaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorEduardo Otubo <otubo@redhat.com>2017-07-27 16:30:40 +0200
committerMichael Tokarev <mjt@tls.msk.ru>2017-07-31 13:06:38 +0300
commitb190f477e29c7cd03a8fee49c96d27f160e3f5b0 (patch)
treee503d53343c719a8b9721c79ee06eea5a60a0f39 /target
parent7a0b7eba4b577bceb8aa795ae46d9812e2d6f4ca (diff)
qemu-system-tricore: segfault when entering "x 0" on the monitor
Starting Qemu with "qemu-system-tricore -nographic -M tricore_testboard -S" and entering "x 0" at the monitor prompt leads to Segmentation fault. This happens because tricore_cpu_get_phys_page_debug() is not implemented yet, this is a temporary workaround to avoid the crash. Signed-off-by: Eduardo Otubo <otubo@redhat.com> Tested-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'target')
-rw-r--r--target/tricore/cpu.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/target/tricore/cpu.c b/target/tricore/cpu.c
index 08f50e2ba7..5ab5b56454 100644
--- a/target/tricore/cpu.c
+++ b/target/tricore/cpu.c
@@ -22,6 +22,15 @@
#include "cpu.h"
#include "qemu-common.h"
#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)
{
@@ -176,6 +185,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;
}
static void cpu_register(const TriCoreCPUInfo *info)