From patchwork Mon Dec 14 01:18:47 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 41058 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 153C3B70BA for ; Mon, 14 Dec 2009 13:38:27 +1100 (EST) Received: from localhost ([127.0.0.1]:48420 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NK0pM-0004Ac-9u for incoming@patchwork.ozlabs.org; Sun, 13 Dec 2009 21:38:24 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NK0lt-0002oR-1o for qemu-devel@nongnu.org; Sun, 13 Dec 2009 21:34:49 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NK0lr-0002nV-MT for qemu-devel@nongnu.org; Sun, 13 Dec 2009 21:34:47 -0500 Received: from [199.232.76.173] (port=59842 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NK0lr-0002nI-CX for qemu-devel@nongnu.org; Sun, 13 Dec 2009 21:34:47 -0500 Received: from are.twiddle.net ([75.149.56.221]:33407) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NK0lq-00012l-K8 for qemu-devel@nongnu.org; Sun, 13 Dec 2009 21:34:46 -0500 Received: by are.twiddle.net (Postfix, from userid 5000) id A12A6554; Sun, 13 Dec 2009 18:34:45 -0800 (PST) Message-Id: <0b0bae837012790622f1fe92d1b97710ef9a5727.1260755765.git.rth@twiddle.net> In-Reply-To: References: From: Richard Henderson Date: Sun, 13 Dec 2009 17:18:47 -0800 To: qemu-devel@nongnu.org X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: [Qemu-devel] [PATCH 1/5] target-alpha: Add placeholders for missing userspace PALcalls. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Richard Henderson --- hw/alpha_palcode.c | 32 ++++++++++++++++++++++++++++++-- 1 files changed, 30 insertions(+), 2 deletions(-) diff --git a/hw/alpha_palcode.c b/hw/alpha_palcode.c index edec018..2a694dc 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); } }