From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36825) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zo6a4-00089v-6I for qemu-devel@nongnu.org; Mon, 19 Oct 2015 05:18:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zo6a2-0001OI-KF for qemu-devel@nongnu.org; Mon, 19 Oct 2015 05:18:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56634) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zo6a2-0001O8-Fb for qemu-devel@nongnu.org; Mon, 19 Oct 2015 05:18:10 -0400 From: Gerd Hoffmann Date: Mon, 19 Oct 2015 11:18:03 +0200 Message-Id: <1445246284-21137-7-git-send-email-kraxel@redhat.com> In-Reply-To: <1445246284-21137-1-git-send-email-kraxel@redhat.com> References: <1445246284-21137-1-git-send-email-kraxel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PULL 6/7] Enable fw_cfg DMA interface for x86 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Eduardo Habkost , "Michael S. Tsirkin" , Gerd Hoffmann , Paolo Bonzini , =?UTF-8?q?Marc=20Mar=C3=AD?= , Richard Henderson From: Marc Mar=C3=AD Enable the fw_cfg DMA interface for all the x86 platforms. Based on Gerd Hoffman's initial implementation. Signed-off-by: Marc Mar=C3=AD Reviewed-by: Laszlo Ersek Signed-off-by: Gerd Hoffmann --- hw/i386/pc.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 682867a..b25a872 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -752,14 +752,15 @@ static void pc_build_smbios(FWCfgState *fw_cfg) } } =20 -static FWCfgState *bochs_bios_init(void) +static FWCfgState *bochs_bios_init(AddressSpace *as) { FWCfgState *fw_cfg; uint64_t *numa_fw_cfg; int i, j; unsigned int apic_id_limit =3D pc_apic_id_limit(max_cpus); =20 - fw_cfg =3D fw_cfg_init_io(BIOS_CFG_IOPORT); + fw_cfg =3D fw_cfg_init_io_dma(BIOS_CFG_IOPORT, BIOS_CFG_IOPORT + 4, = as); + /* FW_CFG_MAX_CPUS is a bit confusing/problematic on x86: * * SeaBIOS needs FW_CFG_MAX_CPUS for CPU hotplug, but the CPU hotplu= g @@ -1393,7 +1394,8 @@ FWCfgState *pc_memory_init(PCMachineState *pcms, option_rom_mr, 1); =20 - fw_cfg =3D bochs_bios_init(); + fw_cfg =3D bochs_bios_init(&address_space_memory); + rom_set_fw(fw_cfg); =20 if (guest_info->has_reserved_memory && pcms->hotplug_memory.base) { --=20 1.8.3.1