rproc_da_to_va(9)
π rproc_da_to_va(9) β the kernel API manual, but make it make sense π
okay bestie, welcome to the rproc_da_to_va(9) page from the Kernel API Manual π this is the little helper that turns remoteproc device addresses into kernel virtual addresses. it's giving translator energy and honestly? iconic. β¨
πΈ NAME πΈ
rproc_da_to_va β lookup the kernel virtual address for a remoteproc address
π¦ SYNOPSIS π¦
void * rproc_da_to_va (struct rproc *rproc , u64 da , size_t len , bool
*is_iomem );
like, copy that exactly, no cap π
β¨ ARGUMENTS β¨
rprocβ the handle of a remote processor. your main character, basically π«Άdaβ the remoteproc device address you want translated. the whole point of the function ngllenβ length of the memory region thatdais pointing to πis_iomemβ an optional pointer that gets filled in to indicate whetherdais iomapped memory. it's optional, so don't stress π
π DESCRIPTION π
so here's the lore: some remote processors will ask us to allocate them physically contiguous memory regions β we call those "carveouts" β and then map them to specific device addresses, which are hardcoded in the firmware. hardcoded, bestie. the firmware said what it said. π
they may also have dedicated memory regions internal to the processors, and they use those either exclusively or alongside carveouts. both can be true, it's not a contradiction π§
then they may ask us to copy objects into specific device addresses (e.g. code/data sections), or expose us certain symbols in other device addresses (e.g. their trace buffer). very much "here's where my stuff lives, please respect it" energy π
this function is a helper function with which we can go over the allocated carveouts and translate specific device addresses to kernel virtual addresses so we can access the referenced memory. fr fr. and it also allows performing translations on the internal remoteproc memory regions through a platform implementation specific da_to_va ops, if present. if present!! conditional bestie π¦
β NOTE β
phys_to_virt(iommu_iova_to_phys(rproc->domain, da)) will work too, but only on kernel direct mapped RAM memory. only. that's the catch. π
instead, we're just using here the output of the DMA API for the carveouts, which should be more correct. and we love correct π
lowkey this is the paragraph where the manpage flexes on you, so read it twice before you go poking at address translation yourself π
π RETURN π
a valid kernel address on success, or NULL on failure. no in-between, no participation trophy πΈ
π SEE ALSO π
Kernel file ./drivers/remoteproc/remoteproc_core.c
and the whole group chat of related functions, all of them, in order, no skips:
rproc_find_carveout_by_name(9), rproc_check_carveout_da(9), rproc_handle_vdev(9), rproc_handle_trace(9), rproc_handle_devmem(9), rproc_alloc_carveout(9), rproc_release_carveout(9), rproc_handle_carveout(9), rproc_add_carveout(9), rproc_mem_entry_init(9), rproc_of_resm_mem_entry_init(9), rproc_of_parse_firmware(9), rproc_alloc_registered_carveouts(9), rproc_resource_cleanup(9), rproc_trigger_recovery(9), rproc_crash_handler_work(9), rproc_boot(9), rproc_shutdown(9), rproc_detach(9), rproc_get_by_phandle(9), rproc_set_firmware(9), rproc_add(9), devm_rproc_add(9), rproc_type_release(9), rproc_alloc(9), rproc_free(9), rproc_put(9), rproc_del(9), devm_rproc_alloc(9), rproc_add_subdev(9), rproc_remove_subdev(9), rproc_get_by_child(9), rproc_report_crash(9)
and that's the page!! this one lives in ./drivers/remoteproc, dated October 2026, and it's part of the Kernel API Manual β mwah, go translate some addresses, ily, bye bestie π
πβ¨
π¦ 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