diff options
Diffstat (limited to 'sys/include/dev/pci/pciregs.h')
-rw-r--r-- | sys/include/dev/pci/pciregs.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/include/dev/pci/pciregs.h b/sys/include/dev/pci/pciregs.h index 763fade..f0ed4d2 100644 --- a/sys/include/dev/pci/pciregs.h +++ b/sys/include/dev/pci/pciregs.h @@ -69,4 +69,9 @@ #define PCI_CAP_MSI 0x05 #define PCI_CAP_MSIX 0x11 +/* PCI BAR defines */ +#define PCI_BAR_TYPE(BAR) ((BAR >> 1) & 3) +#define PCI_BAR_32(BAR) (PCI_BAR_TYPE(BAR) == 0x0) +#define PCI_BAR_64(BAR) (PCI_BAR_TYPE(BAR) == 0x2) + #endif /* _PCI_PCIREGS_H_ */ |