[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4 3/7] Implement fw_cfg DMA interface
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH v4 3/7] Implement fw_cfg DMA interface |
Date: |
Thu, 1 Oct 2015 18:18:28 +0100 |
On 1 October 2015 at 15:36, Laszlo Ersek <address@hidden> wrote:
> I think I finally understand this difference now. It is all rooted in
> the difference between the internal APIs sysbus_add_io() and
> sysbus_init_mmio(). Both of these are called from the device realize
> functions, but the first (sysbus_add_io()) wants the IO port address at
> once, whereas the second (sysbus_init_mmio()) doesn't want the address
> -- the actual mapping (sysbus_mmio_map()) is delayed to board code; the
> device code doesn't want to be aware of it.
Yes. The sysbus_add_io() API is firmly wedded to the x86 I/O port
concept and to the idea that devices are at fixed I/O port addresses
which don't depend on what board they're in (because the few
non-x86 systems that set up some kind of "IO port" abstraction
are generally doing it to look more x86-like).
That said, sysbus_add_io() is one of those odd functions which
we use half a dozen times in the whole codebase and which leaves
me wondering if it ought to be refactored to work differently
(eg split into "declare IO ports" and "map IO ports into IO space"
like the mmio functions)...
thanks
-- PMM
- Re: [Qemu-devel] [PATCH v4 5/7] Enable fw_cfg DMA interface for x86, (continued)
Re: [Qemu-devel] [PATCH v4 0/7] fw_cfg DMA interface, Kevin O'Connor, 2015/10/08
[Qemu-devel] [PATCH v4 3/7] Implement fw_cfg DMA interface, Marc Marí, 2015/10/08
Re: [Qemu-devel] [PATCH v4 3/7] Implement fw_cfg DMA interface, Marc Marí, 2015/10/08
Re: [Qemu-devel] [PATCH v4 3/7] Implement fw_cfg DMA interface, Stefan Hajnoczi, 2015/10/08
Re: [Qemu-devel] [PATCH v4 3/7] Implement fw_cfg DMA interface, Peter Maydell, 2015/10/08
Re: [Qemu-devel] [PATCH v4 3/7] Implement fw_cfg DMA interface, Stefan Hajnoczi, 2015/10/09
Re: [Qemu-devel] [PATCH v4 3/7] Implement fw_cfg DMA interface, Marc Marí, 2015/10/09
Re: [Qemu-devel] [PATCH v4 3/7] Implement fw_cfg DMA interface, Marc Marí, 2015/10/08
[Qemu-devel] [PATCH v4 2/7] fw_cfg DMA interface documentation, Marc Marí, 2015/10/08
[Qemu-devel] [PATCH v4 1/7] fw_cfg: document fw_cfg_modify_iXX() update functions, Marc Marí, 2015/10/08