From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:51432) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R5IAb-0006eh-LK for qemu-devel@nongnu.org; Sun, 18 Sep 2011 10:16:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R5IAT-0007dC-TE for qemu-devel@nongnu.org; Sun, 18 Sep 2011 10:16:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:9850) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R5IAT-0007cd-CW for qemu-devel@nongnu.org; Sun, 18 Sep 2011 10:16:25 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p8IEGO2J018191 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 18 Sep 2011 10:16:24 -0400 Received: from cleopatra.tlv.redhat.com (cleopatra.tlv.redhat.com [10.35.255.11]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p8IEGMTP015588 for ; Sun, 18 Sep 2011 10:16:24 -0400 From: Avi Kivity Date: Sun, 18 Sep 2011 17:16:01 +0300 Message-Id: <1316355364-23603-11-git-send-email-avi@redhat.com> In-Reply-To: <1316355364-23603-1-git-send-email-avi@redhat.com> References: <1316355364-23603-1-git-send-email-avi@redhat.com> Subject: [Qemu-devel] [PATCH 10/13] omap1: convert to memory API (part V) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Tricky aliases. Signed-off-by: Avi Kivity --- hw/omap1.c | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-) diff --git a/hw/omap1.c b/hw/omap1.c index df5d68b..f48aa8a 100644 --- a/hw/omap1.c +++ b/hw/omap1.c @@ -3708,14 +3708,16 @@ static void omap1_mpu_reset(void *opaque) { 0 } }; -static void omap_setup_dsp_mapping(const struct omap_map_s *map) +static void omap_setup_dsp_mapping(MemoryRegion *system_memory, + const struct omap_map_s *map) { - int io; + MemoryRegion *io; for (; map->phys_dsp; map ++) { - io = cpu_get_physical_page_desc(map->phys_mpu); - - cpu_register_physical_memory(map->phys_dsp, map->size, io); + io = g_new(MemoryRegion, 1); + memory_region_init_alias(io, map->name, + system_memory, map->phys_mpu, map->size); + memory_region_add_subregion(system_memory, map->phys_dsp, io); } } @@ -3978,7 +3980,7 @@ struct omap_mpu_state_s *omap310_mpu_init(MemoryRegion *system_memory, * DSP MMU fffed200 - fffed2ff */ - omap_setup_dsp_mapping(omap15xx_dsp_mm); + omap_setup_dsp_mapping(system_memory, omap15xx_dsp_mm); omap_setup_mpui_io(system_memory, s); qemu_register_reset(omap1_mpu_reset, s); -- 1.7.6.3