Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fw_load example might be broken #62

Open
GbGp opened this issue Nov 4, 2024 · 1 comment
Open

fw_load example might be broken #62

GbGp opened this issue Nov 4, 2024 · 1 comment

Comments

@GbGp
Copy link

GbGp commented Nov 4, 2024

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.

@GbGp
Copy link
Author

GbGp commented Nov 5, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant