devm_of_pci...ge_resources(9)
β¨ NAME β¨
devm_of_pci_get_host_bridge_resources β the resource-managed way to parse PCI host bridge resources straight out of DT π
(this page lives in the Kernel API Manual, iykyk)
πΈ SYNOPSIS πΈ
int devm_of_pci_get_host_bridge_resources (struct device *dev , struct
list_head *resources , struct list_head *ib_resources , resource_size_t
*io_base );
okay so that's the whole vibe right there, bestie β one function, four args, let's get into it π«Ά
π ARGUMENTS π
devβ the host bridge device, aka the main character here πresourcesβ the list where the range of resources gets added after DT parsing β¨ib_resourcesβ the list where the range of inbound resources gets added after DT parsing, and yes those addresses come from'dma-ranges'πio_baseβ a pointer to a variable that will hold, on return, the physical address where the I/O range starts. It can beNULLif the caller genuinely doesn't expect I/O ranges to be hanging out in the device tree π (no cap, that's allowed)
π¦ DESCRIPTION π¦
So what does it actually do? It parses the "ranges" property of a PCI host bridge device node and sets up the resource mapping based on what's in there. Lowkey iconic. It's expected that the property conforms with the Power ePAPR document β like, that's the standard it's matching against, fr fr π
It returns zero if the range parsing has been successful, or a standard error value if it failed. That's the whole return situation, periodt π
π₯ SEE ALSO π₯
Kernel file ./drivers/pci/of.c β and these besties right here:
pci_set_of_node(9)of_pci_get_devfn(9)of_pci_parse_bus_range(9)of_get_pci_domain_nr(9)of_pci_preserve_config(9)of_pci_check_probe_only(9)of_irq_parse_pci(9)of_irq_parse_and_map_pci(9)of_pci_supply_present(9)of_pci_get_max_link_speed(9)of_pci_get_slot_power_limit(9)of_pci_get_equalization_presets(9)
and that's the page, bestie π it's from ./drivers/pci, dated October 2026, and it's literally called devm_of_pci...ge_resources(9) β go forth and parse those ranges πβ
π¦ 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