tools/pci: add Nuvoton bridge configuration
The Nuvoton PCI device requires the Memory Space bit to be set in its
command register in order to access the mailbox over MMIO.
Signed-off-by: Benjamin Fair <benjaminfair@google.com>
Change-Id: Ic262b907ae55c622999aa68891b618650ccad3f2
diff --git a/tools/pciaccess.cpp b/tools/pciaccess.cpp
index 8aced6f..0d2ae0b 100644
--- a/tools/pciaccess.cpp
+++ b/tools/pciaccess.cpp
@@ -45,6 +45,20 @@
return ::pci_device_probe(dev);
}
+int PciAccessImpl::pci_device_cfg_read_u8(struct pci_device* dev,
+ std::uint8_t* data,
+ pciaddr_t offset) const
+{
+ return ::pci_device_cfg_read_u8(dev, data, offset);
+}
+
+int PciAccessImpl::pci_device_cfg_write_u8(struct pci_device* dev,
+ std::uint8_t data,
+ pciaddr_t offset) const
+{
+ return ::pci_device_cfg_write_u8(dev, data, offset);
+}
+
int PciAccessImpl::pci_device_map_range(struct pci_device* dev, pciaddr_t base,
pciaddr_t size, unsigned map_flags,
void** addr) const