Open GbGp opened 2 weeks ago
It looks like that replacing the mmap implementation in zynqmp_apu_lcm_rproc_example.c
with the one found here works well:
https://github.com/OpenAMP/open-amp/blob/main/apps/machine/zynqmp_r5/zynqmp_r5_a53_rproc.c#L124
The remoteproc_ops::mmap operation is supposed to work with either physical address or destination address input arguments, as documented in the docs.
On the other ways, any implementation of
mmap
in the the fw_load app will simply pass only the physical address tometal_io_init
: https://github.com/OpenAMP/openamp-system-reference/blob/main/examples/legacy_apps/examples/load_fw/zynqmp_apu_lcm_rproc_example.c#L94As I see, this will always results in a mapping failure since, in this app, remoteproc.c will call
mmap
passingRPROC_LOAD_ANYADDR
(==METAL_BAD_PHYS
) as physical address: https://github.com/OpenAMP/open-amp/blob/main/lib/remoteproc/remoteproc.c#L593Since I am running the example in a baremetal system, I could get away with simply letting the mmap fail, and setting the the physical address to destination address (i.e. setting
*pa = lda
before returning).I am not really familiar with this topics, so maybe I am misunderstanding everything, but something seems to be missing here.