diff options
author | Ian Moffett <ian@osmora.org> | 2025-09-20 17:16:36 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-09-20 17:16:36 -0400 |
commit | 12e09ed63aeea6fed6928a11df75a4cbe09b286b (patch) | |
tree | af433a6228c17fee1715472ad9d0b492d7556eaf /src/sys/include/io | |
parent | 739924cb5cb84e8f29c90b4accd0910daa58a579 (diff) |
kern: pci: Add PCI_BAR_IO() checker in pci/cam.h
The PCI_BAR_IO() checks if the BAR is an I/O type BAR. The value 1 is
returned if true, otherwise 0 if it is a memory type BAR.
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'src/sys/include/io')
-rw-r--r-- | src/sys/include/io/pci/cam.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/sys/include/io/pci/cam.h b/src/sys/include/io/pci/cam.h index 817556e..06dcc53 100644 --- a/src/sys/include/io/pci/cam.h +++ b/src/sys/include/io/pci/cam.h @@ -78,6 +78,7 @@ #define PCI_CAP_MSIX 0x11 /* PCI BAR defines */ +#define PCI_BAR_IO(BAR) (((BAR) & 1) == 1) #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) |