[AMD Official Use Only - AMD Internal Distribution Only]
Hello All,
Presently for the OpenAMP Legacy Demos available in the community system reference repo the interrupt mechanism involves Libmetal APIs directly writing to control registers. This is an issue because it is clearly coupling the demos to vendor-specific logic.
If we could instead have a refactor of demos without the vendor-specific interrupt register writes this would be a code clean up.
[1] In one of the Libmetal-supported OS's, Zephyr there is already IPM support, though it is being deprecated as we have been told upstream.
[2][3] That being said, there is already mailbox support in Zephyr and AMD is upstreaming support for this too.
In order to (a) clean up the vendor-specific register writes and (b) add a generic mailbox support to Libmetal libraries below is a proposal for a patch series.
1. Add mailbox support - lib/mbox.h - descripe APIs for init, deinit, send and receive. 2. Add stubs for baremetal for the above APIs 3. Add stubs for freertos for the above APIs. 4. Add implementation for Zephyr with: - init - As Zephyr OS statically defines mailbox structures today based on device tree, this will simply store the mailbox structure [4] - deinit - free mailbox - send/receive will simply wrap around the Zephyr APIs for mbox send/receive
1. https://github.com/OpenAMP/libmetal/tree/main/lib/system/zephyr 2. https://github.com/zephyrproject-rtos/zephyr/tree/main/drivers/mbox 3. (pull request pending) 4. https://github.com/zephyrproject-rtos/zephyr/tree/main/samples/drivers/mbox
openamp-rp@lists.openampproject.org