-
Notifications
You must be signed in to change notification settings - Fork 19
Description
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 to metal_io_init:
https://github.com/OpenAMP/openamp-system-reference/blob/main/examples/legacy_apps/examples/load_fw/zynqmp_apu_lcm_rproc_example.c#L94
As I see, this will always results in a mapping failure since, in this app, remoteproc.c will call mmap passing RPROC_LOAD_ANYADDR (==METAL_BAD_PHYS) as physical address:
https://github.com/OpenAMP/open-amp/blob/main/lib/remoteproc/remoteproc.c#L593
Since 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.