From patchwork Tue Apr 27 15:31:07 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Monjalon X-Patchwork-Id: 51087 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 004C1B7D60 for ; Wed, 28 Apr 2010 01:38:09 +1000 (EST) Received: from localhost ([127.0.0.1]:46391 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O6mrN-0004UC-Qc for incoming@patchwork.ozlabs.org; Tue, 27 Apr 2010 11:38:05 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O6mkv-0002LJ-Lx for qemu-devel@nongnu.org; Tue, 27 Apr 2010 11:31:25 -0400 Received: from [140.186.70.92] (port=41000 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O6mkp-0002Hx-7u for qemu-devel@nongnu.org; Tue, 27 Apr 2010 11:31:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O6mki-0001sU-W4 for qemu-devel@nongnu.org; Tue, 27 Apr 2010 11:31:18 -0400 Received: from smtp27.orange.fr ([80.12.242.94]:50417) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O6mki-0001rh-Mc for qemu-devel@nongnu.org; Tue, 27 Apr 2010 11:31:12 -0400 Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf2728.orange.fr (SMTP Server) with ESMTP id 52DDA1C00496 for ; Tue, 27 Apr 2010 17:31:11 +0200 (CEST) Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf2728.orange.fr (SMTP Server) with ESMTP id 3DCBC1C00605 for ; Tue, 27 Apr 2010 17:31:11 +0200 (CEST) Received: from tmonjalo-laptop (LPuteaux-156-15-47-90.w82-127.abo.wanadoo.fr [82.127.74.90]) by mwinf2728.orange.fr (SMTP Server) with ESMTP id F03121C00496 for ; Tue, 27 Apr 2010 17:31:10 +0200 (CEST) X-ME-UUID: 20100427153110983.F03121C00496@mwinf2728.orange.fr From: Thomas Monjalon To: qemu-devel@nongnu.org Date: Tue, 27 Apr 2010 17:31:07 +0200 Message-Id: <7dc5ddc9b7627552cb6c60672729cf4cc4186042.1272382040.git.thomas@monjalon.net> X-Mailer: git-send-email 1.7.1 In-Reply-To: References: In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Subject: [Qemu-devel] [PATCH v2 2/5] 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 */