diff options
| author | Avi Kivity <avi@redhat.com> | 2011-04-04 18:27:58 +0300 |
|---|---|---|
| committer | Michael S. Tsirkin <mst@redhat.com> | 2011-04-07 13:56:45 +0300 |
| commit | 17cbcb0bf79c605aecaab3661dc8bad627e4cb3b (patch) | |
| tree | aaab24f7b5b9667e1711da2f2e55305126734510 /hw/pci.h | |
| parent | af94482bcee9640d9f8a6aa06104d8456bbe0d7f (diff) | |
| download | focaccia-qemu-17cbcb0bf79c605aecaab3661dc8bad627e4cb3b.tar.gz focaccia-qemu-17cbcb0bf79c605aecaab3661dc8bad627e4cb3b.zip | |
pci: add pci_register_bar_simple() API
This is similar to pci_register_bar(), but automatically registers a single memory region spanning the entire BAR. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.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 a5f875d06b..c6a6eb67b6 100644 --- a/hw/pci.h +++ b/hw/pci.h @@ -92,6 +92,7 @@ typedef struct PCIIORegion { pcibus_t filtered_size; uint8_t type; PCIMapIORegionFunc *map_func; + ram_addr_t ram_addr; } PCIIORegion; #define PCI_ROM_SLOT 6 @@ -200,6 +201,8 @@ PCIDevice *pci_register_device(PCIBus *bus, const char *name, void pci_register_bar(PCIDevice *pci_dev, int region_num, pcibus_t size, uint8_t type, 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); int pci_add_capability(PCIDevice *pdev, uint8_t cap_id, uint8_t offset, uint8_t size); |