remoteproc: add elf file load support
authorFabien Dessenne <fabien.dessenne@st.com>
Fri, 31 May 2019 13:11:33 +0000 (15:11 +0200)
committerPatrick Delaunay <patrick.delaunay@st.com>
Mon, 22 Jul 2019 07:21:28 +0000 (09:21 +0200)
commit7a7c4cb0f0440ce7384e233583b32c75ef534ddc
tree03c2fa96ca5995ab1658133a4822d9d933dda0bd
parent163b7d7706d842517c5c77e649290be557ad578b
remoteproc: add elf file load support

The current implementation supports only binary file load.
Add helpers to support ELF32 format (sanity check, and load).
Note that since an ELF32 image is built for the remote processor, the
load function uses the device_to_virt ops to translate the addresses.
Implement a basic translation for sandbox_testproc.

Add related tests. Test result:
=> ut dm remoteproc_elf
Test: dm_test_remoteproc_elf: remoteproc.c
Test: dm_test_remoteproc_elf: remoteproc.c (flat tree)
Failures: 0

Signed-off-by: Loic Pallardy <loic.pallardy@st.com>
Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
drivers/remoteproc/Makefile
drivers/remoteproc/rproc-elf-loader.c [new file with mode: 0644]
drivers/remoteproc/sandbox_testproc.c
include/remoteproc.h
test/dm/remoteproc.c