From patchwork Thu Oct 14 18:00:33 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Blue Swirl X-Patchwork-Id: 67851 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 88CF91007D3 for ; Fri, 15 Oct 2010 05:01:50 +1100 (EST) Received: from localhost ([127.0.0.1]:57927 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P6S7f-0000Jx-OC for incoming@patchwork.ozlabs.org; Thu, 14 Oct 2010 14:01:47 -0400 Received: from [140.186.70.92] (port=42560 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P6S6q-0000IX-Ej for qemu-devel@nongnu.org; Thu, 14 Oct 2010 14:00:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P6S6p-0000Nn-IA for qemu-devel@nongnu.org; Thu, 14 Oct 2010 14:00:56 -0400 Received: from mail-qw0-f45.google.com ([209.85.216.45]:62230) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P6S6p-0000Nh-Fy for qemu-devel@nongnu.org; Thu, 14 Oct 2010 14:00:55 -0400 Received: by qwh5 with SMTP id 5so3492393qwh.4 for ; Thu, 14 Oct 2010 11:00:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:from:date :message-id:subject:to:content-type; bh=obds9rtwPzb0N1wIpIohX1P1UQuoJMA9UjndkPuwCp8=; b=KbKpsa6Mm4uLuiKHFruSOyxlg/zKPLeW1eiF+b2NhZtD9UVB08NJXwt2HredlPbXRu un+eG4/lPz+p9iMPrKkyClSV208y6la+QA0UoLrOwGWzAnMVn9ED/RtUjtlLkeS0lWfC k8b4TcntMXHATZc7n+Yh/oGw0lag9k0Q/Etfw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=xLIGCLKAEdaZAsbONr1OM7AX7A0c4P1bONx6WRLgbn+y5dm6vaXEbFFVrC4GUke7Qf 2VjTS5MOEFWFKQASOYvX3Wyora0P7Jlz4nTOS6Nw42+MpcGTQwKkJJ/iNjrJ7ydE4D8x /yiOA2AVwGV1QadTULjeAQA37x9zmcy/bx5FY= Received: by 10.229.246.141 with SMTP id ly13mr9126344qcb.80.1287079254302; Thu, 14 Oct 2010 11:00:54 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.64.196 with HTTP; Thu, 14 Oct 2010 11:00:33 -0700 (PDT) From: Blue Swirl Date: Thu, 14 Oct 2010 18:00:33 +0000 Message-ID: To: qemu-devel X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: [Qemu-devel] [PATCH] mips_fulong2e: fix ram allocation X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org RAM registration used incorrect offset. Fix by using the offset obtained previously for this purpose. Spotted by GCC 4.6.0 20100925 warning, which is also avoided. Signed-off-by: Blue Swirl --- hw/mips_fulong2e.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/mips_fulong2e.c b/hw/mips_fulong2e.c index f9723f5..07eb9ee 100644 --- a/hw/mips_fulong2e.c +++ b/hw/mips_fulong2e.c @@ -295,7 +295,7 @@ static void mips_fulong2e_init(ram_addr_t ram_size, const char *boot_device, ram_offset = qemu_ram_alloc(NULL, "fulong2e.ram", ram_size); bios_offset = qemu_ram_alloc(NULL, "fulong2e.bios", bios_size); - cpu_register_physical_memory(0, ram_size, IO_MEM_RAM); + cpu_register_physical_memory(0, ram_size, ram_offset); cpu_register_physical_memory(0x1fc00000LL, bios_size, bios_offset | IO_MEM_ROM);