From 70dae4150a98cc93ab9da7bfbf93e21070dc8753 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Wed, 11 Jun 2025 21:33:29 -0400 Subject: 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 --- sys/arch/amd64/pci/pci_machdep.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'sys/arch') 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 #include #include +#include #include #include #include @@ -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; -- cgit v1.2.3