From fe57ca82b09b05ab893ffa8a1a6ace7352970636 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Sun, 13 Dec 2009 17:18:47 -0800 Subject: [PATCH] target-alpha: Add placeholders for missing userspace PALcalls. Signed-off-by: Richard Henderson Signed-off-by: Aurelien Jarno --- hw/alpha_palcode.c | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/hw/alpha_palcode.c b/hw/alpha_palcode.c index edec018..843bd14 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); } } -- 2.7.4