diff options
author | imp <imp@FreeBSD.org> | 2005-12-29 23:40:41 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2005-12-29 23:40:41 +0000 |
commit | e57b04f29b1ff21e1c921174a40471f0f21b64c2 (patch) | |
tree | 4605f6b4e07215175e8a73b1a9832a4ac7b7f83f | |
parent | 95bb7dd5c456f4064c8d82261961b3a348d5a32f (diff) | |
download | FreeBSD-src-e57b04f29b1ff21e1c921174a40471f0f21b64c2.zip FreeBSD-src-e57b04f29b1ff21e1c921174a40471f0f21b64c2.tar.gz |
Add a macro to map from BAR to rid # (inverse of PCIR_BARS).
-rw-r--r-- | sys/dev/pci/pcireg.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/dev/pci/pcireg.h b/sys/dev/pci/pcireg.h index e0bbcc3..253666c 100644 --- a/sys/dev/pci/pcireg.h +++ b/sys/dev/pci/pcireg.h @@ -116,6 +116,7 @@ #define PCIR_BARS 0x10 #define PCIR_BAR(x) (PCIR_BARS + (x) * 4) +#define PCI_RID2BAR(rid) (1<<(((rid)-PCIR_BARS)/4)) #define PCIR_CIS 0x28 #define PCIM_CIS_ASI_MASK 0x7 #define PCIM_CIS_ASI_TUPLE 0 |