mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
libqos: allow qpci_iomap to return BAR mapping size
This patch allows qpci_iomap to return the size of the BAR mapping that it created, to allow driver applications (e.g, ahci-test) to make determinations about the suitability or the mapping size, or in the specific case of AHCI, how many ports are supported by the HBA. Signed-off-by: John Snow <jsnow@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
parent
7f2a5ae6c1
commit
6ce7100e7f
5 changed files with 10 additions and 7 deletions
|
@ -41,7 +41,7 @@ struct QPCIBus
|
|||
void (*config_writel)(QPCIBus *bus, int devfn,
|
||||
uint8_t offset, uint32_t value);
|
||||
|
||||
void *(*iomap)(QPCIBus *bus, QPCIDevice *dev, int barno);
|
||||
void *(*iomap)(QPCIBus *bus, QPCIDevice *dev, int barno, uint64_t *sizeptr);
|
||||
void (*iounmap)(QPCIBus *bus, void *data);
|
||||
};
|
||||
|
||||
|
@ -74,7 +74,7 @@ void qpci_io_writeb(QPCIDevice *dev, void *data, uint8_t value);
|
|||
void qpci_io_writew(QPCIDevice *dev, void *data, uint16_t value);
|
||||
void qpci_io_writel(QPCIDevice *dev, void *data, uint32_t value);
|
||||
|
||||
void *qpci_iomap(QPCIDevice *dev, int barno);
|
||||
void *qpci_iomap(QPCIDevice *dev, int barno, uint64_t *sizeptr);
|
||||
void qpci_iounmap(QPCIDevice *dev, void *data);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue