From patchwork Sat Sep 8 09:52:39 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 182532 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 099312C007D for ; Sat, 8 Sep 2012 19:52:51 +1000 (EST) Received: from localhost ([::1]:40018 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TAHib-0007WN-6Y for incoming@patchwork.ozlabs.org; Sat, 08 Sep 2012 05:52:49 -0400 Received: from eggs.gnu.org ([208.118.235.92]:55403) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TAHiU-0007W6-Bn for qemu-devel@nongnu.org; Sat, 08 Sep 2012 05:52:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TAHiT-0008MG-3R for qemu-devel@nongnu.org; Sat, 08 Sep 2012 05:52:42 -0400 Received: from mout.web.de ([212.227.15.3]:56461) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TAHiS-0008MA-RI; Sat, 08 Sep 2012 05:52:41 -0400 Received: from mchn199C.mchp.siemens.de ([95.157.56.37]) by smtp.web.de (mrweb103) with ESMTPSA (Nemesis) id 0MS2D8-1SyqhJ1iJe-00TKfu; Sat, 08 Sep 2012 11:52:39 +0200 Message-ID: <504B1567.6000106@web.de> Date: Sat, 08 Sep 2012 11:52:39 +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: Blue Swirl References: <50492BC5.4090107@web.de> <504A0A60.8090507@web.de> <504B06E0.6030100@web.de> <504B145D.60103@web.de> In-Reply-To: <504B145D.60103@web.de> X-Enigmail-Version: 1.4.4 X-Provags-ID: V02:K0:pdP9MUu/kES9/6ta2IAwHaLZ5pa7QlJfE4MrblmWFJm 1CnUh9oOs1mzuUTDvPioGecEQCI1W62X+Hu7mIq0110EgGjlN8 Qi/urfY+U7l4O41Xj0ksHwCPXg2kFCr3263TzvtuEQOrZSh+NO KX0UrEQzqHgK1U6+jbtLnjFcx8FpyXy9aQ0pE7uift5rku7Dvp 1RJawbed+aAY/jtoPlqvQ== X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 212.227.15.3 Cc: Peter Maydell , qemu-devel , qemu-stable Subject: [Qemu-devel] [PATCH v2a] 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 --- Changes in v2a: - mark large constant ULL hw/musicpal.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/musicpal.c b/hw/musicpal.c index ad725b5..f305e21 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(0x100000000ULL-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(0x100000000ULL-MP_FLASH_SIZE_MAX, NULL, "musicpal.flash", flash_size, dinfo->bdrv, 0x10000, (flash_size + 0xffff) >> 16,