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

Add support for imx8mp_evk M7 core for openamp_rsc_table sample #78585

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

alxlastur
Copy link

Add support for imx8mp_evk M7 core for openamp_rsc_table sample

This enables openamp_rsc_table sample for imx8mp_evk on M7 core

Signed-off-by: Alexandru Lastur <[email protected]>
Currently, Zephyr is always sending back notifications to
AP (e.g Linux in our case) on channel 0.

But this currently doesn't work if Linux uses other channel
id for communication. So, save the channel id used by Linux
and use it to send back replies.

Signed-off-by: Alexandru Lastur <[email protected]>

LOG_DBG("%s: msg received", __func__);
ipm_send(ipm_handle, 0, id, NULL, 0);
ipm_send(ipm_handle, 0, ipm_ch->channel_id, NULL, 0);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

copy past from #78228 (comment):

This probably introduces a regression on existing platforms. I can see two assumptions in this patch:

  1. The IPM channel ID used for RX and TX is the same. The initial implementation is that
    channel id 0 is used for RX and channel id 1 is usedfor Tx.

  2. You assume that we receive a first message before sending the first one (ipm_ch->channel_id is set in platform_ipm_callback()), which seems like a dangerous assumption to me.

Some simple solutions could be to put the code under platform configuration or, perhaps more generically, to define CONFIG_IPM_RX_CHANNEL_ID and CONFIG_IPM_TX_CHANNEL_ID to configure the channel IDs.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think using the CONFIG_ definitions would work for us.

@dbaluta dbaluta changed the title Zephyr opanamp rsc imx8mp m7 dev 1 Add support for imx8mp_evk M7 core for openamp_rsc_table sample Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: IPC Inter-Process Communication area: Open AMP area: Samples Samples
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants