From patchwork Thu Apr 4 16:47:33 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 233876 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 D28192C0084 for ; Fri, 5 Apr 2013 03:48:32 +1100 (EST) Received: from localhost ([::1]:43155 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNnKx-0006zn-5B for incoming@patchwork.ozlabs.org; Thu, 04 Apr 2013 12:48:31 -0400 Received: from eggs.gnu.org ([208.118.235.92]:59525) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNnK7-00068v-19 for qemu-devel@nongnu.org; Thu, 04 Apr 2013 12:47:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UNnK2-0006xZ-DU for qemu-devel@nongnu.org; Thu, 04 Apr 2013 12:47:38 -0400 Received: from cantor2.suse.de ([195.135.220.15]:48869 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNnK2-0006xS-7s; Thu, 04 Apr 2013 12:47:34 -0400 Received: from relay1.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 48FD5A3A4A; Thu, 4 Apr 2013 18:47:33 +0200 (CEST) From: Alexander Graf To: "qemu-ppc@nongnu.org list:PowerPC" Date: Thu, 4 Apr 2013 18:47:33 +0200 Message-Id: <1365094053-1635-1-git-send-email-agraf@suse.de> X-Mailer: git-send-email 1.6.0.2 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x X-Received-From: 195.135.220.15 Cc: qemu-devel qemu-devel , Fabien Chouteau Subject: [Qemu-devel] [PATCH] 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 a08a6b2..ca7d98f 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 */