]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - ti-linux-kernel/ti-linux-kernel-next.git/commit
remoteproc/k3-r5: add support for fixed reserved memory regions
authorSuman Anna <s-anna@ti.com>
Tue, 9 Oct 2018 20:57:02 +0000 (15:57 -0500)
committerSuman Anna <s-anna@ti.com>
Fri, 19 Oct 2018 18:55:12 +0000 (13:55 -0500)
commit6a28d115b9729cad5357c289e25ee90c6264d6a8
tree4453780edfc96a4e487caf8c1661909279152124
parent236b12d25333d42d6be48a3a6407b76366a761db
remoteproc/k3-r5: add support for fixed reserved memory regions

The R5F remote processors do not have an MMU, and so require fixed
memory carveout regions matching the firmware image addresses. The
R5F remoteproc driver currently relies on a single memory region
provided to the device and uses it to dynamically allocate memory
for both the vrings/vring buffers as well as for the firmware image
segments. The latter is done through matching RSC_CARVEOUT entries.
This is not a scalable solution though as there is no way to ensure
the allocated memories will match the exact firmware image addresses.

Enhance the current R5F remoteproc driver to remove this limitation.
Support for this is added by mandating multiple memory regions to be
attached to the remoteproc device. The first memory region will be
used to serve as the DMA pool for all dynamic allocations like the
vrings and vring buffers. The remaining memory regions are mapped
into the kernel at device probe time, and are used to provide address
translations for firmware image segments without the need for any
RSC_CARVEOUT entries. Any firmware image using memory outside of
the supplied reserved memory carveout regions will be errored out.

NOTE:
The R5F remoteproc driver currently does not support the Region
Address Translator allowing the R5F cores to use a 32-bit processor
address for leveraging a physical address > 32-bit address. All
the reserved memory regions are therefore expected to be using
memory regions within the first 2 GB.

Signed-off-by: Suman Anna <s-anna@ti.com>
drivers/remoteproc/ti_k3_r5_remoteproc.c