diff options
| author | Avi Kivity <avi@redhat.com> | 2011-07-26 14:26:20 +0300 |
|---|---|---|
| committer | Anthony Liguori <aliguori@us.ibm.com> | 2011-07-29 08:25:44 -0500 |
| commit | 79ff8cb0df5f3f7ec818690f7ad5bdc03859525d (patch) | |
| tree | 399b609b7d124501a876db700bb41ec13efe4dbd /hw/pci.h | |
| parent | 1e39101c649a008462db1ac1d027c62870454d1f (diff) | |
| download | focaccia-qemu-79ff8cb0df5f3f7ec818690f7ad5bdc03859525d.tar.gz focaccia-qemu-79ff8cb0df5f3f7ec818690f7ad5bdc03859525d.zip | |
pci: add MemoryRegion based BAR management API
Allow registering a BAR using a MemoryRegion. Once all users are converted, pci_register_bar() and pci_register_bar_simple() will be removed. Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/pci.h')
| -rw-r--r-- | hw/pci.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/pci.h b/hw/pci.h index cfeb042219..c51156d21c 100644 --- a/hw/pci.h +++ b/hw/pci.h @@ -94,6 +94,7 @@ typedef struct PCIIORegion { uint8_t type; PCIMapIORegionFunc *map_func; ram_addr_t ram_addr; + MemoryRegion *memory; } PCIIORegion; #define PCI_ROM_SLOT 6 @@ -204,6 +205,8 @@ void pci_register_bar(PCIDevice *pci_dev, int region_num, PCIMapIORegionFunc *map_func); void pci_register_bar_simple(PCIDevice *pci_dev, int region_num, pcibus_t size, uint8_t attr, ram_addr_t ram_addr); +void pci_register_bar_region(PCIDevice *pci_dev, int region_num, + uint8_t attr, MemoryRegion *memory); int pci_add_capability(PCIDevice *pdev, uint8_t cap_id, uint8_t offset, uint8_t size); |