aboutsummaryrefslogtreecommitdiff
path: root/linux-user
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2018-01-31 15:50:29 +0000
committerPeter Maydell <peter.maydell@linaro.org>2018-01-31 15:50:29 +0000
commitb05631954d6dfe93340d516660397e2c1a2a5dd6 (patch)
tree33a95992695411ba93cfeec651b358ecc2fd746f /linux-user
parent6521130b0a7f699fdb82446d57df5627bfa7ed3c (diff)
parenteed142195c95a6c50545fa7a28e725d780ab9636 (diff)
downloadqemu-b05631954d6dfe93340d516660397e2c1a2a5dd6.zip
qemu-b05631954d6dfe93340d516660397e2c1a2a5dd6.tar.gz
qemu-b05631954d6dfe93340d516660397e2c1a2a5dd6.tar.bz2
Merge remote-tracking branch 'remotes/rth/tags/pull-hppa-20180131' into staging
Implement hppa-softmmu # gpg: Signature made Wed 31 Jan 2018 14:19:06 GMT # gpg: using RSA key 0x64DF38E8AF7E215F # gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>" # Primary key fingerprint: 7A48 1E78 868B 4DB6 A85A 05C0 64DF 38E8 AF7E 215F * remotes/rth/tags/pull-hppa-20180131: (43 commits) target/hppa: Implement PROBE for system mode target/hppa: Fix 32-bit operand masks for 0E FCVT hw/hppa: Add MAINTAINERS entry pc-bios: Add hppa-firmware.img and git submodule hw/hppa: Implement DINO system board target/hppa: Enable MTTCG target/hppa: Implement STWA target/hppa: Implement a pause instruction target/hppa: Implement LDSID for system mode target/hppa: Fix comment target/hppa: Increase number of temp regs target/hppa: Only use EXCP_DTLB_MISS target/hppa: Implement B,GATE insn target/hppa: Add migration for the cpu target/hppa: Add system registers to gdbstub target/hppa: Optimize for flat addressing space target/hppa: Implement halt and reset instructions target/hppa: Implement SYNCDMA insn target/hppa: Implement LCI target/hppa: Implement LPA ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'linux-user')
-rw-r--r--linux-user/hppa/target_cpu.h2
-rw-r--r--linux-user/main.c28
-rw-r--r--linux-user/signal.c4
3 files changed, 27 insertions, 7 deletions
diff --git a/linux-user/hppa/target_cpu.h b/linux-user/hppa/target_cpu.h
index e50522e..7b78bbe 100644
--- a/linux-user/hppa/target_cpu.h
+++ b/linux-user/hppa/target_cpu.h
@@ -33,7 +33,7 @@ static inline void cpu_clone_regs(CPUHPPAState *env, target_ulong newsp)
static inline void cpu_set_tls(CPUHPPAState *env, target_ulong newtls)
{
- env->cr27 = newtls;
+ env->cr[27] = newtls;
}
#endif
diff --git a/linux-user/main.c b/linux-user/main.c
index 2140465..7de0e02 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -3773,21 +3773,41 @@ void cpu_loop(CPUHPPAState *env)
env->iaoq_f = env->gr[31];
env->iaoq_b = env->gr[31] + 4;
break;
- case EXCP_SIGSEGV:
+ case EXCP_ITLB_MISS:
+ case EXCP_DTLB_MISS:
+ case EXCP_NA_ITLB_MISS:
+ case EXCP_NA_DTLB_MISS:
+ case EXCP_IMP:
+ case EXCP_DMP:
+ case EXCP_DMB:
+ case EXCP_PAGE_REF:
+ case EXCP_DMAR:
+ case EXCP_DMPI:
info.si_signo = TARGET_SIGSEGV;
info.si_errno = 0;
info.si_code = TARGET_SEGV_ACCERR;
- info._sifields._sigfault._addr = env->ior;
+ info._sifields._sigfault._addr = env->cr[CR_IOR];
queue_signal(env, info.si_signo, QEMU_SI_FAULT, &info);
break;
- case EXCP_SIGILL:
+ case EXCP_UNALIGN:
+ info.si_signo = TARGET_SIGBUS;
+ info.si_errno = 0;
+ info.si_code = 0;
+ info._sifields._sigfault._addr = env->cr[CR_IOR];
+ queue_signal(env, info.si_signo, QEMU_SI_FAULT, &info);
+ break;
+ case EXCP_ILL:
+ case EXCP_PRIV_OPR:
+ case EXCP_PRIV_REG:
info.si_signo = TARGET_SIGILL;
info.si_errno = 0;
info.si_code = TARGET_ILL_ILLOPN;
info._sifields._sigfault._addr = env->iaoq_f;
queue_signal(env, info.si_signo, QEMU_SI_FAULT, &info);
break;
- case EXCP_SIGFPE:
+ case EXCP_OVERFLOW:
+ case EXCP_COND:
+ case EXCP_ASSIST:
info.si_signo = TARGET_SIGFPE;
info.si_errno = 0;
info.si_code = 0;
diff --git a/linux-user/signal.c b/linux-user/signal.c
index 2db4507..9a380b9 100644
--- a/linux-user/signal.c
+++ b/linux-user/signal.c
@@ -6442,7 +6442,7 @@ static void setup_sigcontext(struct target_sigcontext *sc, CPUArchState *env)
__put_user(env->fr[i], &sc->sc_fr[i]);
}
- __put_user(env->sar, &sc->sc_sar);
+ __put_user(env->cr[CR_SAR], &sc->sc_sar);
}
static void restore_sigcontext(CPUArchState *env, struct target_sigcontext *sc)
@@ -6463,7 +6463,7 @@ static void restore_sigcontext(CPUArchState *env, struct target_sigcontext *sc)
__get_user(env->iaoq_f, &sc->sc_iaoq[0]);
__get_user(env->iaoq_b, &sc->sc_iaoq[1]);
- __get_user(env->sar, &sc->sc_sar);
+ __get_user(env->cr[CR_SAR], &sc->sc_sar);
}
/* No, this doesn't look right, but it's copied straight from the kernel. */