diff options
Diffstat (limited to 'sys/dev/pci/pcivar.h')
-rw-r--r-- | sys/dev/pci/pcivar.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/sys/dev/pci/pcivar.h b/sys/dev/pci/pcivar.h index 2bb26bd..14132bf 100644 --- a/sys/dev/pci/pcivar.h +++ b/sys/dev/pci/pcivar.h @@ -190,11 +190,6 @@ typedef struct pcicfg { /* additional type 1 device config header information (PCI to PCI bridge) */ -#define PCI_PPBMEMBASE(h,l) ((((pci_addr_t)(h) << 32) + ((l)<<16)) & ~0xfffff) -#define PCI_PPBMEMLIMIT(h,l) ((((pci_addr_t)(h) << 32) + ((l)<<16)) | 0xfffff) -#define PCI_PPBIOBASE(h,l) ((((h)<<16) + ((l)<<8)) & ~0xfff) -#define PCI_PPBIOLIMIT(h,l) ((((h)<<16) + ((l)<<8)) | 0xfff) - typedef struct { pci_addr_t pmembase; /* base address of prefetchable memory */ pci_addr_t pmemlimit; /* topmost address of prefetchable memory */ @@ -500,6 +495,18 @@ pci_msix_count(device_t dev) return (PCI_MSIX_COUNT(device_get_parent(dev), dev)); } +static __inline int +pci_msix_pba_bar(device_t dev) +{ + return (PCI_MSIX_PBA_BAR(device_get_parent(dev), dev)); +} + +static __inline int +pci_msix_table_bar(device_t dev) +{ + return (PCI_MSIX_TABLE_BAR(device_get_parent(dev), dev)); +} + static __inline uint16_t pci_get_rid(device_t dev) { |