PCI_CONF(9) Hyra Kernel Developer’s Manual PCI_CONF(9)
NAME
pci_conf - PCI config space interface
SYNOPSIS
#include <dev/pci/pci.h>
pcireg_t
pci_readl(struct pci_device *dev, uint32_t offset);
void
pci_writel(struct pci_device *dev, uint32_t offset, pcireg_t val);
DESCRIPTION
The PCI configuration space is a 256-byte region implemented per device, consisting of registers used for host-to-device communication and device-specific configuration.
The Hyra PCI driver provides an API for interfacing with a device’s configuration space.
The pci_readl() function returns a 32-bit value from the configuration space of the device pointed to by the dev argument. The offset argument describes how far into the configuration space should be read from.
The pci_writel() function writes a 32-bit value into the configuration space of the device pointed to by the dev argument. The offset argument describes how far into the configuration space val should be written to.
For more information, refer to section 6 of the PCI Local Bus Specification 3.0
AUTHORS
Ian Moffett <ian@osmora.org>
Hyra Feb 20 2024 Hyra