aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudio Fontana <claudio.fontana@huawei.com>2013-06-12 16:20:23 +0100
committerPeter Maydell <peter.maydell@linaro.org>2013-06-12 16:20:23 +0100
commitf129061c6abfaee2133fcb55c384ec5f99028f62 (patch)
tree638daee55fd07d69edbc44e896ab68d4d8cbc60b
parent31f1275b90f4803ee5a2900020f21d3320ce62b7 (diff)
user-exec.c: aarch64 initial implementation of cpu_signal_handler
Signed-off-by: Claudio Fontana <claudio.fontana@huawei.com> Reviewed-by: Richard Henderson <rth@twiddle.net> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 51AF4028.5030504@huawei.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r--user-exec.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/user-exec.c b/user-exec.c
index 71bd6c531c..fa7f1f1de9 100644
--- a/user-exec.c
+++ b/user-exec.c
@@ -448,6 +448,21 @@ int cpu_signal_handler(int host_signum, void *pinfo,
&uc->uc_sigmask, puc);
}
+#elif defined(__aarch64__)
+
+int cpu_signal_handler(int host_signum, void *pinfo,
+ void *puc)
+{
+ siginfo_t *info = pinfo;
+ struct ucontext *uc = puc;
+ uint64_t pc;
+ int is_write = 0; /* XXX how to determine? */
+
+ pc = uc->uc_mcontext.pc;
+ return handle_cpu_signal(pc, (uint64_t)info->si_addr,
+ is_write, &uc->uc_sigmask, puc);
+}
+
#elif defined(__mc68000)
int cpu_signal_handler(int host_signum, void *pinfo,