mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-11-05 20:35:44 +00:00
b8cc4d0231
The PCI backends in libqos each supply an iomap() and iounmap() function which is used to set up a specified PCI BAR. But PCI BAR allocation takes place entirely within PCI space, so doesn't really need per-backend versions. For example, Linux includes generic BAR allocation code used on platforms where that isn't done by firmware. This patch merges the BAR allocation from the two existing backends into a single simplified copy. The back ends just need to set up some parameters describing the window of PCI IO and PCI memory addresses which are available for allocation. Like both the existing versions the new one uses a simple bump allocator. Note that (again like the existing versions) this doesn't really handle 64-bit memory BARs properly. It is actually used for such a BAR by the ivshmem test, and apparently the 32-bit MMIO BAR logic is close enough to work, as long as the BAR isn't too big. Fixing that to properly handle 64-bit BAR allocation is a problem for another time. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Laurent Vivier <lvivier@redhat.com> Reviewed-by: Greg Kurz <groug@kaod.org> |
||
---|---|---|
.. | ||
ahci.c | ||
ahci.h | ||
fw_cfg.c | ||
fw_cfg.h | ||
i2c-imx.c | ||
i2c-omap.c | ||
i2c.c | ||
i2c.h | ||
libqos-pc.c | ||
libqos-pc.h | ||
libqos-spapr.c | ||
libqos-spapr.h | ||
libqos.c | ||
libqos.h | ||
malloc-generic.c | ||
malloc-generic.h | ||
malloc-pc.c | ||
malloc-pc.h | ||
malloc-spapr.c | ||
malloc-spapr.h | ||
malloc.c | ||
malloc.h | ||
pci-pc.c | ||
pci-pc.h | ||
pci-spapr.c | ||
pci-spapr.h | ||
pci.c | ||
pci.h | ||
rtas.c | ||
rtas.h | ||
usb.c | ||
usb.h | ||
virtio-mmio.c | ||
virtio-mmio.h | ||
virtio-pci.c | ||
virtio-pci.h | ||
virtio.c | ||
virtio.h |