Re: Using the Cortex M4 on IMX7D


Arnaud POULIQUEN
 

Hi,




Hey Arnaud,

Thanks for your reply.

I've seen that stm32_rproc driver has additionally functions within static const
struct rproc_ops st_rproc_ops
https://elixir.bootlin.com/linux/v5.11.2/source/drivers/remoteproc/stm32_rpro
c.c#L544
especially

.parse_fw = stm32_rproc_parse_fw,

within the plain rproc driver

rproc->ops->parse_fw = rproc_elf_load_rsc_table

is registerd within "static int rproc_alloc_ops()"
This is the generic elf parser functions that are available here:
https://elixir.bootlin.com/linux/latest/source/drivers/remoteproc/remoteproc_elf_loader.c


https://elixir.bootlin.com/linux/v5.11.2/source/drivers/remoteproc/remoteproc
_core.c#L2202

and is called by doing the "echo start" command.
Have you specified the firmware name?

Here is the sequence to load a firmware from Linux user application:
cp $1 /lib/firmware/
echo $1> /sys/class/remoteproc/remoteproc0/firmware
echo start >/sys/class/remoteproc/remoteproc0/state

with $1 is the firmware to load


https://elixir.bootlin.com/linux/v5.11.2/source/drivers/remoteproc/remoteproc
_elf_loader.c#L359


but fails after the find_table() function.
This function return NULL or the address of the resource table, but not return an error
Do you have a kernel error message ?


so if i just skip that for a test in
https://elixir.bootlin.com/linux/v5.11.2/source/drivers/remoteproc/remoteproc
_core.c#L1464,
does that take me over the point?
I can not see the code where rproc actually "loads" the firmware to the M4?

This is mainly done in https://elixir.bootlin.com/linux/latest/source/drivers/remoteproc/remoteproc_elf_loader.c

Regards,
Arnaud


best regards and a great weekend
Michael

Join users@lists.zephyrproject.org to automatically receive all group messages.