From patchwork Tue Feb 21 18:41:42 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 142351 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id E6BABB6FA5 for ; Wed, 22 Feb 2012 05:42:03 +1100 (EST) Received: from localhost ([::1]:34401 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rzuf1-0005Vk-IU for incoming@patchwork.ozlabs.org; Tue, 21 Feb 2012 13:41:59 -0500 Received: from eggs.gnu.org ([140.186.70.92]:52856) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rzues-0005Vf-T0 for qemu-devel@nongnu.org; Tue, 21 Feb 2012 13:41:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rzuen-0001rf-76 for qemu-devel@nongnu.org; Tue, 21 Feb 2012 13:41:50 -0500 Received: from cantor2.suse.de ([195.135.220.15]:57699 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rzuem-0001rN-UD; Tue, 21 Feb 2012 13:41:45 -0500 Received: from relay2.suse.de (unknown [195.135.220.254]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id 5200991240; Tue, 21 Feb 2012 19:41:43 +0100 (CET) From: Alexander Graf To: qemu-devel Developers Date: Tue, 21 Feb 2012 19:41:42 +0100 Message-Id: <1329849702-7665-1-git-send-email-agraf@suse.de> X-Mailer: git-send-email 1.7.3.4 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-Received-From: 195.135.220.15 Cc: qemu-ppc@nongnu.org, Andreas Faerber Subject: [Qemu-devel] [PATCH] PPC: 405: Fix ppc405ep initialization 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 When trying to run a ppc405 guest, it segfaults quite quickly, trying to access timers that weren't initialized. Initialize them properly instead. Reported-by: Andreas Faerber Signed-off-by: Alexander Graf --- hw/ppc405_uc.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/hw/ppc405_uc.c b/hw/ppc405_uc.c index 98079fa..1f4efbf 100644 --- a/hw/ppc405_uc.c +++ b/hw/ppc405_uc.c @@ -2483,6 +2483,8 @@ CPUState *ppc405ep_init(MemoryRegion *address_space_mem, ppc4xx_pob_init(env); /* OBP arbitrer */ ppc4xx_opba_init(0xef600600); + /* Initialize timers */ + ppc_booke_timers_init(env, sysclk, 0); /* Universal interrupt controller */ irqs = g_malloc0(sizeof(qemu_irq) * PPCUIC_OUTPUT_NB); irqs[PPCUIC_OUTPUT_INT] =