aboutsummaryrefslogtreecommitdiff
path: root/hw/alpha_palcode.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2009-12-13 17:18:47 -0800
committerAurelien Jarno <aurelien@aurel32.net>2009-12-17 18:11:58 +0100
commitfe57ca82b09b05ab893ffa8a1a6ace7352970636 (patch)
treec304f8eb381569eb7fc241d76a589f093c7dd127 /hw/alpha_palcode.c
parentab3aee26c480eb5e522896b3f758a3c3c3c9f9c6 (diff)
target-alpha: Add placeholders for missing userspace PALcalls.
Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'hw/alpha_palcode.c')
-rw-r--r--hw/alpha_palcode.c32
1 files changed, 30 insertions, 2 deletions
diff --git a/hw/alpha_palcode.c b/hw/alpha_palcode.c
index edec01815a..843bd1491e 100644
--- a/hw/alpha_palcode.c
+++ b/hw/alpha_palcode.c
@@ -1061,6 +1061,16 @@ void call_pal (CPUState *env, int palcode)
target_long ret;
switch (palcode) {
+ case 0x80:
+ /* BPT */
+ qemu_log("BPT\n");
+ /* FIXME: Sends SIGTRAP, si_code=TRAP_BRKPT. */
+ exit(1);
+ case 0x81:
+ /* BUGCHK */
+ qemu_log("BUGCHK\n");
+ /* FIXME: Sends SIGTRAP, si_code=SI_FAULT. */
+ exit(1);
case 0x83:
/* CALLSYS */
qemu_log("CALLSYS n " TARGET_FMT_ld "\n", env->ir[0]);
@@ -1075,6 +1085,14 @@ void call_pal (CPUState *env, int palcode)
env->ir[IR_V0] = -ret;
}
break;
+ case 0x86:
+ /* IMB */
+ qemu_log("IMB\n");
+ /* ??? We can probably elide the code using page_unprotect that is
+ checking for self-modifying code. Instead we could simply call
+ tb_flush here. Until we work out the changes required to turn
+ off the extra write protection, this can be a no-op. */
+ break;
case 0x9E:
/* RDUNIQUE */
qemu_log("RDUNIQUE: " TARGET_FMT_lx "\n", env->unique);
@@ -1085,9 +1103,19 @@ void call_pal (CPUState *env, int palcode)
qemu_log("WRUNIQUE: " TARGET_FMT_lx "\n", env->ir[IR_A0]);
/* Handled in the translator for usermode. */
abort();
+ case 0xAA:
+ /* GENTRAP */
+ qemu_log("GENTRAP: " TARGET_FMT_lx "\n", env->ir[IR_A0]);
+ /* FIXME: This is supposed to send a signal:
+ SIGFPE:
+ GEN_INTOVF, GEN_INTDIV, GEN_FLTOVF, GEN_FLTDIV,
+ GEN_FLTUND, GEN_FLTINV, GEN_FLTINE, GEN_ROPRAND
+ SIGTRAP:
+ others
+ with various settings of si_code. */
+ exit(1);
default:
- qemu_log("%s: unhandled palcode %02x\n",
- __func__, palcode);
+ qemu_log("%s: unhandled palcode %02x\n", __func__, palcode);
exit(1);
}
}