diff options
Diffstat (limited to 'tests/libqos/pci.c')
-rw-r--r-- | tests/libqos/pci.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/libqos/pci.c b/tests/libqos/pci.c index 98a2e56569..146b06311c 100644 --- a/tests/libqos/pci.c +++ b/tests/libqos/pci.c @@ -289,6 +289,22 @@ void qpci_io_writel(QPCIDevice *dev, void *data, uint32_t value) } } +void qpci_memread(QPCIDevice *dev, void *data, void *buf, size_t len) +{ + uintptr_t addr = (uintptr_t)data; + + g_assert(addr >= QPCI_PIO_LIMIT); + dev->bus->memread(dev->bus, addr, buf, len); +} + +void qpci_memwrite(QPCIDevice *dev, void *data, const void *buf, size_t len) +{ + uintptr_t addr = (uintptr_t)data; + + g_assert(addr >= QPCI_PIO_LIMIT); + dev->bus->memwrite(dev->bus, addr, buf, len); +} + void *qpci_iomap(QPCIDevice *dev, int barno, uint64_t *sizeptr) { QPCIBus *bus = dev->bus; |