From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:55478) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKWSi-00060d-Qu for qemu-devel@nongnu.org; Sun, 30 Oct 2011 10:34:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RKWSe-0003sH-Ay for qemu-devel@nongnu.org; Sun, 30 Oct 2011 10:34:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:24952) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKWSe-0003rp-2X for qemu-devel@nongnu.org; Sun, 30 Oct 2011 10:34:08 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p9UEY7Dt019139 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 30 Oct 2011 10:34:07 -0400 Received: from cleopatra.tlv.redhat.com (cleopatra.tlv.redhat.com [10.35.255.11]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p9UEY5JA028992 for ; Sun, 30 Oct 2011 10:34:06 -0400 From: Avi Kivity Date: Sun, 30 Oct 2011 16:33:41 +0200 Message-Id: <1319985234-32371-5-git-send-email-avi@redhat.com> In-Reply-To: <1319985234-32371-1-git-send-email-avi@redhat.com> References: <1319985234-32371-1-git-send-email-avi@redhat.com> Subject: [Qemu-devel] [PATCH 04/17] virtex_ml507: convert to memory API List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Signed-off-by: Avi Kivity --- hw/virtex_ml507.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/virtex_ml507.c b/hw/virtex_ml507.c index d31a204..5313e2e 100644 --- a/hw/virtex_ml507.c +++ b/hw/virtex_ml507.c @@ -192,7 +192,7 @@ static void virtex_init(ram_addr_t ram_size, CPUState *env; target_phys_addr_t ram_base = 0; DriveInfo *dinfo; - ram_addr_t phys_ram; + MemoryRegion *phys_ram = g_new(MemoryRegion, 1); qemu_irq irq[32], *cpu_irq; int kernel_size; int i; @@ -206,8 +206,8 @@ static void virtex_init(ram_addr_t ram_size, env = ppc440_init_xilinx(&ram_size, 1, cpu_model, 400000000); qemu_register_reset(main_cpu_reset, env); - phys_ram = qemu_ram_alloc(NULL, "ram", ram_size); - cpu_register_physical_memory(ram_base, ram_size, phys_ram | IO_MEM_RAM); + memory_region_init_ram(phys_ram, NULL, "ram", ram_size); + memory_region_add_subregion(address_space_mem, ram_base, phys_ram); dinfo = drive_get(IF_PFLASH, 0, 0); pflash_cfi01_register(0xfc000000, NULL, "virtex.flash", FLASH_SIZE, -- 1.7.6.3