pci_iomap(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ 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 🌈


mwah πŸ’‹ this page is from ./drivers/pci, dated October 2026 β€” bye bestie, go map that BAR 🫢✨

πŸ“¦ where this page comes from