[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
Hi Ben,
I propose adding this discussion to the agenda of the next system reference meeting.
Regards, Arnaud
-----Original Message----- From: Levinsky, Ben via Openamp-rp <openamp- rp@lists.openampproject.org> Sent: Thursday, June 19, 2025 12:55 AM To: openamp-rp@lists.openampproject.org Cc: Shah, Tanmay tanmay.shah@amd.com Subject: [Openamp-rp] [RFC] Proposal to add mailbox interface
[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.
- 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
- https://github.com/OpenAMP/libmetal/tree/main/lib/system/zephyr
- https://github.com/zephyrproject-rtos/zephyr/tree/main/drivers/mbox
- (pull request pending)
- https://github.com/zephyrproject-
rtos/zephyr/tree/main/samples/drivers/mbox
Openamp-rp mailing list -- openamp-rp@lists.openampproject.org To unsubscribe send an email to openamp-rp- leave@lists.openampproject.org
openamp-rp@lists.openampproject.org