From patchwork Fri Apr 26 18:21:29 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 239941 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 1670F2C00F1 for ; Sat, 27 Apr 2013 04:32:22 +1000 (EST) Received: from localhost ([::1]:50311 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVnRU-0001YY-4K for incoming@patchwork.ozlabs.org; Fri, 26 Apr 2013 14:32:20 -0400 Received: from eggs.gnu.org ([208.118.235.92]:55389) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVnHO-0003NA-Oo for qemu-devel@nongnu.org; Fri, 26 Apr 2013 14:22:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UVnHL-0004xZ-5A for qemu-devel@nongnu.org; Fri, 26 Apr 2013 14:21:54 -0400 Received: from cantor2.suse.de ([195.135.220.15]:38877 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVnHK-0004wz-VP; Fri, 26 Apr 2013 14:21:51 -0400 Received: from relay1.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 6E9D45E000209; Fri, 26 Apr 2013 20:21:50 +0200 (CEST) From: Alexander Graf To: qemu-ppc@nongnu.org Date: Fri, 26 Apr 2013 20:21:29 +0200 Message-Id: <1367000509-8833-11-git-send-email-agraf@suse.de> X-Mailer: git-send-email 1.6.0.2 In-Reply-To: <1367000509-8833-1-git-send-email-agraf@suse.de> References: <1367000509-8833-1-git-send-email-agraf@suse.de> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x X-Received-From: 195.135.220.15 Cc: Blue Swirl , qemu-devel@nongnu.org, Aurelien Jarno Subject: [Qemu-devel] [PATCH 10/30] PPC: mac newworld: fix cpu NIP reset value X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org On -M mac99, we can run 970 CPUs. However, these CPUs define the initial instruction pointer they start execution at as part of their bootup protocol, so effectively it's up to the board to decide where they start. This went unnoticed, because they used to boot at the same location our flash was mapped to, but due to the recent reset changes our 970 CPUs want to reset to 0x100 now, which is always a 0 instruction. Set the initial IP to something reasonable for -M mac99. Signed-off-by: Alexander Graf Reviewed-by: Fabien Chouteau --- hw/ppc/mac_newworld.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c index 4a9b883..ce44e95 100644 --- a/hw/ppc/mac_newworld.c +++ b/hw/ppc/mac_newworld.c @@ -126,6 +126,8 @@ static void ppc_core99_reset(void *opaque) PowerPCCPU *cpu = opaque; cpu_reset(CPU(cpu)); + /* 970 CPUs want to get their initial IP as part of their boot protocol */ + cpu->env.nip = PROM_ADDR + 0x100; } /* PowerPC Mac99 hardware initialisation */