of_reserved_..._to_resource(9)
π of_reserved_..._to_resource(9) β the Kernel API Manual, bestie edition π
okay so this is a page from the Kernel API Manual, and it's literally about of_reserved_mem_region_to_resource β yes the name is a whole mouthful, we're surviving tho π«Ά
β¨ NAME β¨
of_reserved_mem_region_to_resource β get a reserved memory region as a resource, periodt π
πΈ SYNOPSIS πΈ
int of_reserved_mem_region_to_resource (const struct device_node *np ,
unsigned int idx , struct resource *res );
π ARGUMENTS π
npβ the node that's holding the'memory-region'property, like it's carrying the whole vibe π¦idxβ which'memory-region'property entry you wanna look up, by index, iykyk π₯resβ pointer to astruct resourcethat gets filled in with the reserved region π
β DESCRIPTION β
so this function lets drivers look up a node's 'memory-region' property entries by index and hand back a struct resource for that entry. iconic behavior honestly π
it returns 0 on success, with res filled in β slay π
it returns -ENODEV if 'memory-region' is missing or unavailable, and -EINVAL for any other error. no cap, those are the only two error flavors π
π¦ SEE ALSO π¦
kernel file ./drivers/of/of_reserved_mem.c β go read it, it's giving main character energy πβ¨
and the whole friend group:
fdt_scan_reserved_mem_late(9)fdt_fixup_reserved_mem_node(9)fdt_validate_reserved_mem_node(9)__reserved_mem_init_node(9)fdt_init_reserved_mem_node(9)of_reserved_mem_device_init_by_idx(9)of_reserved_mem_device_init_by_name(9)of_reserved_mem_device_release(9)devm_of_reserved_mem_device_init(9)of_reserved_mem_lookup(9)of_reserved_mem_region_to_resource_byname(9)of_reserved_mem_region_count(9)
and that's the page, bestie π it lives in ./drivers/of, it's dated October 2026, and it's filed under of_reserved_..._to_resource(9) β mwah, go touch some reserved memory ππ§
π¦ 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