From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40708) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZkCj0-0004qJ-04 for qemu-devel@nongnu.org; Thu, 08 Oct 2015 11:03:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZkCiw-0006PY-NW for qemu-devel@nongnu.org; Thu, 08 Oct 2015 11:03:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60269) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZkCiw-0006PT-JS for qemu-devel@nongnu.org; Thu, 08 Oct 2015 11:03:14 -0400 From: =?UTF-8?q?Marc=20Mar=C3=AD?= Date: Thu, 8 Oct 2015 17:02:56 +0200 Message-Id: <1444316578-21775-5-git-send-email-markmb@redhat.com> In-Reply-To: <1444316578-21775-1-git-send-email-markmb@redhat.com> References: <1444316523-21711-1-git-send-email-markmb@redhat.com> <1444316578-21775-1-git-send-email-markmb@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH v5 4/6] Enable fw_cfg DMA interface for ARM List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Drew , Stefan Hajnoczi , "Gabriel L. Somlo" , Kevin O'Connor , Gerd Hoffmann , =?UTF-8?q?Marc=20Mar=C3=AD?= , Laszlo Enable the fw_cfg DMA interface for the ARM virt machine. Based on Gerd Hoffman's initial implementation. Signed-off-by: Marc Mar=C3=AD Reviewed-by: Peter Maydell Reviewed-by: Laszlo Ersek --- hw/arm/virt.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 7ae984f..0a39087 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -119,7 +119,7 @@ static const MemMapEntry a15memmap[] =3D { [VIRT_GIC_REDIST] =3D { 0x080A0000, 0x00F60000 }, [VIRT_UART] =3D { 0x09000000, 0x00001000 }, [VIRT_RTC] =3D { 0x09010000, 0x00001000 }, - [VIRT_FW_CFG] =3D { 0x09020000, 0x0000000a }, + [VIRT_FW_CFG] =3D { 0x09020000, 0x00000018 }, [VIRT_MMIO] =3D { 0x0a000000, 0x00000200 }, /* ...repeating for a total of NUM_VIRTIO_TRANSPORTS, each of that s= ize */ [VIRT_PLATFORM_BUS] =3D { 0x0c000000, 0x02000000 }, @@ -677,13 +677,13 @@ static void create_flash(const VirtBoardInfo *vbi) g_free(nodename); } =20 -static void create_fw_cfg(const VirtBoardInfo *vbi) +static void create_fw_cfg(const VirtBoardInfo *vbi, AddressSpace *as) { hwaddr base =3D vbi->memmap[VIRT_FW_CFG].base; hwaddr size =3D vbi->memmap[VIRT_FW_CFG].size; char *nodename; =20 - fw_cfg_init_mem_wide(base + 8, base, 8, 0, NULL); + fw_cfg_init_mem_wide(base + 8, base, 8, base + 16, as); =20 nodename =3D g_strdup_printf("/fw-cfg@%" PRIx64, base); qemu_fdt_add_subnode(vbi->fdt, nodename); @@ -1026,7 +1026,7 @@ static void machvirt_init(MachineState *machine) */ create_virtio_devices(vbi, pic); =20 - create_fw_cfg(vbi); + create_fw_cfg(vbi, &address_space_memory); rom_set_fw(fw_cfg_find()); =20 guest_info->smp_cpus =3D smp_cpus; --=20 2.4.3