Re: [Qemu-devel] [RFC 2/7] fw_cfg dma interface

2015-07-23 Thread Laszlo Ersek
On 07/22/15 19:18, Kevin O'Connor wrote: On Wed, Jul 22, 2015 at 10:31:12AM +0200, Marc Marí wrote: On Wed, 22 Jul 2015 00:24:34 -0400 Kevin O'Connor ke...@koconnor.net wrote: On Tue, Jul 21, 2015 at 06:03:41PM +0200, Marc Marí wrote: From: Gerd Hoffmann kra...@redhat.com First draft of a

Re: [Qemu-devel] [RFC 2/7] fw_cfg dma interface

2015-07-23 Thread Peter Maydell
On 23 July 2015 at 14:13, Laszlo Ersek ler...@redhat.com wrote: On 07/22/15 19:18, Kevin O'Connor wrote: Another possibility would be to place the new fw_cfg dma register address into a named fw_cfg file (eg, fw_cfg_dma). The firmware could then use the existing select/data fw_cfg interface

Re: [Qemu-devel] [RFC 2/7] fw_cfg dma interface

2015-07-23 Thread Laszlo Ersek
On 07/23/15 15:35, Peter Maydell wrote: On 23 July 2015 at 14:13, Laszlo Ersek ler...@redhat.com wrote: On 07/22/15 19:18, Kevin O'Connor wrote: Another possibility would be to place the new fw_cfg dma register address into a named fw_cfg file (eg, fw_cfg_dma). The firmware could then use

Re: [Qemu-devel] [RFC 2/7] fw_cfg dma interface

2015-07-23 Thread Kevin O'Connor
On Thu, Jul 23, 2015 at 02:35:05PM +0100, Peter Maydell wrote: On 23 July 2015 at 14:13, Laszlo Ersek ler...@redhat.com wrote: On 07/22/15 19:18, Kevin O'Connor wrote: Another possibility would be to place the new fw_cfg dma register address into a named fw_cfg file (eg, fw_cfg_dma). The

Re: [Qemu-devel] [RFC 2/7] fw_cfg dma interface

2015-07-23 Thread Marc Marí
On Thu, 23 Jul 2015 15:45:25 +0200 Laszlo Ersek ler...@redhat.com wrote: On 07/23/15 15:35, Peter Maydell wrote: On 23 July 2015 at 14:13, Laszlo Ersek ler...@redhat.com wrote: On 07/22/15 19:18, Kevin O'Connor wrote: Another possibility would be to place the new fw_cfg dma register

Re: [Qemu-devel] [RFC 2/7] fw_cfg dma interface

2015-07-22 Thread Kevin O'Connor
On Wed, Jul 22, 2015 at 10:31:12AM +0200, Marc Marí wrote: On Wed, 22 Jul 2015 00:24:34 -0400 Kevin O'Connor ke...@koconnor.net wrote: On Tue, Jul 21, 2015 at 06:03:41PM +0200, Marc Marí wrote: From: Gerd Hoffmann kra...@redhat.com First draft of a fw_cfg dma interface. Designed as

Re: [Qemu-devel] [RFC 2/7] fw_cfg dma interface

2015-07-22 Thread Marc Marí
On Wed, 22 Jul 2015 00:24:34 -0400 Kevin O'Connor ke...@koconnor.net wrote: On Tue, Jul 21, 2015 at 06:03:41PM +0200, Marc Marí wrote: From: Gerd Hoffmann kra...@redhat.com First draft of a fw_cfg dma interface. Designed as add-on to the extisting fw_cfg interface, i.e. there is no

Re: [Qemu-devel] [RFC 2/7] fw_cfg dma interface

2015-07-22 Thread Marc Marí
On Tue, 21 Jul 2015 21:44:49 +0200 Laszlo Ersek ler...@redhat.com wrote: On 07/21/15 18:03, Marc Marí wrote: From: Gerd Hoffmann kra...@redhat.com First draft of a fw_cfg dma interface. Designed as add-on to the extisting fw_cfg interface, i.e. there is no select register. There are

Re: [Qemu-devel] [RFC 2/7] fw_cfg dma interface

2015-07-22 Thread Laszlo Ersek
On 07/22/15 10:19, Marc Marí wrote: On Tue, 21 Jul 2015 21:44:49 +0200 Laszlo Ersek ler...@redhat.com wrote: On 07/21/15 18:03, Marc Marí wrote: From: Gerd Hoffmann kra...@redhat.com First draft of a fw_cfg dma interface. Designed as add-on to the extisting fw_cfg interface, i.e. there

Re: [Qemu-devel] [RFC 2/7] fw_cfg dma interface

2015-07-22 Thread Andrew Jones
On Tue, Jul 21, 2015 at 09:44:49PM +0200, Laszlo Ersek wrote: On 07/21/15 18:03, Marc Marí wrote: +static void fw_cfg_dma_transfer(FWCfgState *s) +{ +dma_addr_t len; +uint8_t *ptr; +uint32_t i; + +if (s-dma_ctl FW_CFG_DMA_CTL_ERROR) { +return; +} +

Re: [Qemu-devel] [RFC 2/7] fw_cfg dma interface

2015-07-22 Thread Stefan Hajnoczi
On Wed, Jul 22, 2015 at 12:24:34AM -0400, Kevin O'Connor wrote: On Tue, Jul 21, 2015 at 06:03:41PM +0200, Marc Marí wrote: From: Gerd Hoffmann kra...@redhat.com First draft of a fw_cfg dma interface. Designed as add-on to the extisting fw_cfg interface, i.e. there is no select register.

Re: [Qemu-devel] [RFC 2/7] fw_cfg dma interface

2015-07-22 Thread Laszlo Ersek
On 07/22/15 13:30, Andrew Jones wrote: On Tue, Jul 21, 2015 at 09:44:49PM +0200, Laszlo Ersek wrote: On 07/21/15 18:03, Marc Marí wrote: +static void fw_cfg_dma_transfer(FWCfgState *s) +{ +dma_addr_t len; +uint8_t *ptr; +uint32_t i; + +if (s-dma_ctl FW_CFG_DMA_CTL_ERROR)

Re: [Qemu-devel] [RFC 2/7] fw_cfg dma interface

2015-07-21 Thread Kevin O'Connor
On Tue, Jul 21, 2015 at 06:03:41PM +0200, Marc Marí wrote: From: Gerd Hoffmann kra...@redhat.com First draft of a fw_cfg dma interface. Designed as add-on to the extisting fw_cfg interface, i.e. there is no select register. There are four 32bit registers: Target address (low and high

[Qemu-devel] [RFC 2/7] fw_cfg dma interface

2015-07-21 Thread Marc Marí
From: Gerd Hoffmann kra...@redhat.com First draft of a fw_cfg dma interface. Designed as add-on to the extisting fw_cfg interface, i.e. there is no select register. There are four 32bit registers: Target address (low and high bits), transfer length, control register. See docs/specs/fw_cfg.txt

Re: [Qemu-devel] [RFC 2/7] fw_cfg dma interface

2015-07-21 Thread Laszlo Ersek
On 07/21/15 18:03, Marc Marí wrote: From: Gerd Hoffmann kra...@redhat.com First draft of a fw_cfg dma interface. Designed as add-on to the extisting fw_cfg interface, i.e. there is no select register. There are four 32bit registers: Target address (low and high bits), transfer length,