diff options
author | Ian Moffett <ian@osmora.org> | 2025-06-11 21:33:29 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-06-11 21:33:29 -0400 |
commit | 70dae4150a98cc93ab9da7bfbf93e21070dc8753 (patch) | |
tree | 0ee7bc83e2756fb35802942f334667bd244c4e8a /sys/arch/amd64/pci/pci_machdep.c | |
parent | 12ca8e0711704d73bdf5c99e6306c321f3bea373 (diff) |
kernel: pci: Add 'cam_hook' structure for PCI I/O
This change improves flexibility and allows for easy future integration
of the PCI Express Enhanced Configuration Access Mechanism (ECAM)
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/arch/amd64/pci/pci_machdep.c')
-rw-r--r-- | sys/arch/amd64/pci/pci_machdep.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/arch/amd64/pci/pci_machdep.c b/sys/arch/amd64/pci/pci_machdep.c index 7eaee6a..5b49a78 100644 --- a/sys/arch/amd64/pci/pci_machdep.c +++ b/sys/arch/amd64/pci/pci_machdep.c @@ -33,6 +33,7 @@ #include <sys/mmio.h> #include <dev/pci/pci.h> #include <dev/pci/pciregs.h> +#include <machine/pci/pci.h> #include <machine/pio.h> #include <machine/bus.h> #include <machine/cpu.h> @@ -73,8 +74,8 @@ pci_get_barreg(struct pci_device *dev, uint8_t bar) } } -pcireg_t -pci_readl(struct pci_device *dev, uint32_t offset) +__weak pcireg_t +md_pci_readl(struct pci_device *dev, uint32_t offset) { uint32_t address; @@ -83,8 +84,8 @@ pci_readl(struct pci_device *dev, uint32_t offset) return inl(0xCFC) >> ((offset & 3) * 8); } -void -pci_writel(struct pci_device *dev, uint32_t offset, pcireg_t val) +__weak void +md_pci_writel(struct pci_device *dev, uint32_t offset, pcireg_t val) { uint32_t address; |