From patchwork Wed Apr 21 09:21:56 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Monjalon X-Patchwork-Id: 50646 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 1B680B6EEB for ; Wed, 21 Apr 2010 19:35:12 +1000 (EST) Received: from localhost ([127.0.0.1]:33565 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O4WFK-0004Xk-Qw for incoming@patchwork.ozlabs.org; Wed, 21 Apr 2010 05:29:26 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O4W8A-0000xz-Rb for qemu-devel@nongnu.org; Wed, 21 Apr 2010 05:22:02 -0400 Received: from [140.186.70.92] (port=46085 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O4W88-0000vg-Uz for qemu-devel@nongnu.org; Wed, 21 Apr 2010 05:22:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O4W86-0001nm-2O for qemu-devel@nongnu.org; Wed, 21 Apr 2010 05:22:00 -0400 Received: from smtp21.orange.fr ([80.12.242.48]:18136) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O4W85-0001mz-TP for qemu-devel@nongnu.org; Wed, 21 Apr 2010 05:21:58 -0400 Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf2113.orange.fr (SMTP Server) with ESMTP id 7F9B11C00EE2 for ; Wed, 21 Apr 2010 11:21:56 +0200 (CEST) Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf2113.orange.fr (SMTP Server) with ESMTP id 725A41C01A45 for ; Wed, 21 Apr 2010 11:21:56 +0200 (CEST) Received: from localhost.localdomain (LPuteaux-156-15-47-90.w82-127.abo.wanadoo.fr [82.127.74.90]) by mwinf2113.orange.fr (SMTP Server) with ESMTP id 4470F1C00EE2 for ; Wed, 21 Apr 2010 11:21:56 +0200 (CEST) X-ME-UUID: 20100421092156280.4470F1C00EE2@mwinf2113.orange.fr From: Thomas Monjalon To: qemu-devel@nongnu.org Date: Wed, 21 Apr 2010 11:21:56 +0200 Message-Id: <1271841716-11582-3-git-send-email-thomas_ml@monjalon.net> X-Mailer: git-send-email 1.7.0.5 In-Reply-To: <1271841716-11582-1-git-send-email-thomas_ml@monjalon.net> References: <1271841716-11582-1-git-send-email-thomas_ml@monjalon.net> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Subject: [Qemu-devel] [PATCH 2/2] target-ppc: fix interrupt vectors for MPC603 and e300 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 From: Thomas Monjalon The vectors are listed - in the chapter 1.3.3.2 (Implementation-Specific Interrupt Model) of the e300 datasheet [e300CORERM] and - in the chapter 3.5.2 (PowerPC 603 Microprocessor Exception Model) of the MPC603 datasheet. As e300 inherits from MPC603, init_excp_e300() calls init_excp_603(). Signed-off-by: Thomas Monjalon --- target-ppc/translate_init.c | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c index 9e42831..f3e266d 100644 --- a/target-ppc/translate_init.c +++ b/target-ppc/translate_init.c @@ -2853,7 +2853,16 @@ static void init_excp_603 (CPUPPCState *env) env->excp_vectors[POWERPC_EXCP_SMI] = 0x00001400; env->hreset_excp_prefix = 0x00000000UL; /* Hardware reset vector */ - env->hreset_vector = 0xFFFFFFFCUL; + env->hreset_vector = 0x00000100UL; +#endif +} + +static void init_excp_e300 (CPUPPCState *env) +{ + init_excp_603(env); +#if !defined(CONFIG_USER_ONLY) + env->excp_vectors[POWERPC_EXCP_CRITICAL] = 0x00000A00; + env->excp_vectors[POWERPC_EXCP_PERFM] = 0x00000F00; #endif } @@ -4175,7 +4184,7 @@ static void init_proc_e300 (CPUPPCState *env) gen_low_BATs(env); gen_high_BATs(env); gen_6xx_7xx_soft_tlb(env, 64, 2); - init_excp_603(env); + init_excp_e300(env); env->dcache_line_size = 32; env->icache_line_size = 32; /* Allocate hardware IRQ controller */