pci_iomap(9)
π NAME π
okay so pci_iomap - create a virtual mapping cookie for a PCI BAR π
and yes bestie, this is pci_iomap(9) from the Kernel API Manual.
β¨ SYNOPSIS β¨
void __iomem * pci_iomap (struct pci_dev *dev , int bar , unsigned long maxlen );
π¦ ARGUMENTS π¦
devβ PCI device that owns the BAR πbarβ BAR number β¨maxlenβ length of the memory to map π
π DESCRIPTION π
Using this function you will get a __iomem address to your device BAR. iconic. You can access it using ioread*() and iowrite*(). These functions hide the details if this is a MMIO or PIO address space and will just do what you expect from them in the correct way β no cap, they handle the vibe check for you π«Ά.
maxlen specifies the maximum length to map. If you want to get access to the complete BAR without checking for its length first, pass 0 here. literally just 0 and go π
π SEE ALSO π
- Kernel file
./drivers/pci/iomap.cπ§ pci_iomap_range(9)πΈpci_iomap_wc_range(9)π«pci_iomap_wc(9)β
mwah π this page is from ./drivers/pci, dated October 2026 β bye bestie, go map that BAR π«Άβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms