@@ -69,6 +72,8 @@ static enum pci_region_type pci_addr_to_type(u32 addr)
  {
      if (addr&  PCI_BASE_ADDRESS_SPACE_IO)
          return PCI_REGION_TYPE_IO;
+    if (addr&  PCI_BASE_ADDRESS_MEM_TYPE_64)
+        return PCI_REGION_TYPE_PREFMEM_64;
This seems dangerous - a 64bit bar can be non-prefetchable - getting
this wrong could cause random (hard to debug) crashes.

Just out of curiosity - how this could happen? Having 64bit
non-prefetchable BAR implies that the device is not behind
any bridge (as bridges describe 64bit ranges for prefetchable
memory only). Is it possible on nowadays systems?

Reply via email to