From patchwork Thu Sep 6 23:03:33 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 182299 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 BB93D2C0083 for ; Fri, 7 Sep 2012 09:03:49 +1000 (EST) Received: from localhost ([::1]:54912 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T9l6w-0006fx-WF for incoming@patchwork.ozlabs.org; Thu, 06 Sep 2012 19:03:47 -0400 Received: from eggs.gnu.org ([208.118.235.92]:44908) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T9l6p-0006f5-SW for qemu-devel@nongnu.org; Thu, 06 Sep 2012 19:03:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T9l6p-0006ZC-0c for qemu-devel@nongnu.org; Thu, 06 Sep 2012 19:03:39 -0400 Received: from mout.web.de ([212.227.15.4]:51257) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T9l6m-0006YF-MY; Thu, 06 Sep 2012 19:03:36 -0400 Received: from mchn199C.mchp.siemens.de ([95.157.56.37]) by smtp.web.de (mrweb001) with ESMTPSA (Nemesis) id 0MQNzw-1SztCj34MW-00Udn4; Fri, 07 Sep 2012 01:03:33 +0200 Message-ID: <50492BC5.4090107@web.de> Date: Fri, 07 Sep 2012 01:03:33 +0200 From: Jan Kiszka User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 MIME-Version: 1.0 To: Peter Maydell X-Enigmail-Version: 1.4.4 X-Provags-ID: V02:K0:x6avRWAPkXIdTiF//2nniYLrv8wXAcXz7jmc5tys/Pe kRwf/DHLoUME5Oh/fOiaxVMcJ73iQa0dsXX6xZu4/szk8Vph4/ J+l3jqkOci47s5qBLeokGwHSoFpcq0f7ztCv9H96vw4y8vpV4G MiLs6e3kc3LLIdeWoDSeDY/qdtB3gTyjdKwc1YCMSkiYVnpprq BXiePRdumdYe1kydP3sGA== X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 212.227.15.4 Cc: qemu-devel , qemu-stable Subject: [Qemu-devel] [PATCH] musicpal: Fix flash mapping 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 The old arithmetic assumed 32 physical address bits which is no longer true for ARM since 3cc0cd61f4. Signed-off-by: Jan Kiszka Reviewed-by: Peter Maydell --- hw/musicpal.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/musicpal.c b/hw/musicpal.c index ad725b5..10c2c16 100644 --- a/hw/musicpal.c +++ b/hw/musicpal.c @@ -1583,7 +1583,7 @@ static void musicpal_init(ram_addr_t ram_size, * image is smaller than 32 MB. */ #ifdef TARGET_WORDS_BIGENDIAN - pflash_cfi02_register(0-MP_FLASH_SIZE_MAX, NULL, + pflash_cfi02_register(0x100000000-MP_FLASH_SIZE_MAX, NULL, "musicpal.flash", flash_size, dinfo->bdrv, 0x10000, (flash_size + 0xffff) >> 16, @@ -1591,7 +1591,7 @@ static void musicpal_init(ram_addr_t ram_size, 2, 0x00BF, 0x236D, 0x0000, 0x0000, 0x5555, 0x2AAA, 1); #else - pflash_cfi02_register(0-MP_FLASH_SIZE_MAX, NULL, + pflash_cfi02_register(0x100000000-MP_FLASH_SIZE_MAX, NULL, "musicpal.flash", flash_size, dinfo->bdrv, 0x10000, (flash_size + 0xffff) >> 16,