__libie_pci_get_mmio_addr(9)
π
__libie_pci_get_mmio_addr β like, the whole vibe
okay so bestie, welcome to the Kernel API Manual β¨ and specifically to section 9 and to __libie_pci_get_mmio_addr, which is genuinely one of those little helpers that just works and we love her for it π«Ά
πΈ NAME πΈ
__libie_pci_get_mmio_addr β get the MMIO virtual address π₯
β¨ SYNOPSIS β¨
void __iomem * __libie_pci_get_mmio_addr (struct libie_mmio_info
*mmio_info , resource_size_t offset , int num_args , ... );
no cap, that's the whole signature β she takes a pointer, an offset, a count, and then vibes with whatever else you hand her π
π ARGUMENTS π
mmio_infoβ contains list of MMIO regions. that's it, that's the list, she's holding the whole map πΊοΈoffsetβ register offset to find. you're like "hey where does this one live" and she goes and finds it πnum_argsβ number of additional arguments present. gotta tell her how many lil extras are coming π«...β optional BAR index (0by default). so if you don't say anything, she just assumes0, queen of low-effort defaults π
π¦ DESCRIPTION π¦
This function finds the virtual address of a register offset by iterating through the non-linear MMIO regions that are mapped by the driver.
like literally, she walks through the non-linear MMIO regions β mapped by the driver β one by one, until she finds the virtual address for the register offset you asked about. it's giving "search party but make it elegant" π§
The list is traversed oldest to newest, so accessing an older mapping via this function while deleting a newer one is allowed. iykyk β that ordering is the whole point, and yes, you can absolutely read an old mapping while a newer one is being torn down. slay π
π RETURN π
valid MMIO virtual address or NULL.
that's it. you get an address, or you get NULL and you can cry about it π (fr fr, check for the NULL, bestie.)
π SEE ALSO π
- Kernel file
./drivers/net/ethernet/intel/libie/pci.c libie_find_mmio_region(9)__libie_pci_map_mmio_region(9)libie_pci_unmap_fltr_regs(9)libie_pci_unmap_all_mmio_regions(9)libie_pci_init_dev(9)
and that's the page!! π source/version is ./drivers/net/ethernet/intel/l..., dated October 2026 β mwah, go read the other ones too, they're all in the same little family ππ
π¦ 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