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 rpmsg-echo-test example #1

Merged
merged 10 commits into from
Nov 15, 2022
Merged

Conversation

tnmysh
Copy link
Collaborator

@tnmysh tnmysh commented Sep 23, 2022

rpmsg-echo-test example demonstrates how to write linux userspace application that uses rpmsg devices in kernel space. This application sends pre-defined payload to remote processor firmware and waits for remote processor to send same payload back. It then verifies received payload integrity. Number of packets to send to remote processor can be configured from command line

Signed-off-by: Tanmay Shah tanmay.shah@amd.com

Makefile Outdated Show resolved Hide resolved
examples/linux/rpmsg-echo-test/echo_test.c Show resolved Hide resolved
examples/linux/rpmsg-echo-test/echo_test.c Show resolved Hide resolved
@tnmysh tnmysh force-pushed the rpmsg_echo_test_kernelspace branch 2 times, most recently from 6464427 to eae2ecc Compare September 28, 2022 00:35
@tnmysh
Copy link
Collaborator Author

tnmysh commented Sep 28, 2022

I will close this pull request and open new one as new echo_test app contains more changes.

@tnmysh tnmysh closed this Sep 28, 2022
@tnmysh
Copy link
Collaborator Author

tnmysh commented Sep 28, 2022

As discussed this with Arnaud same pull request can be used.

@tnmysh tnmysh reopened this Sep 28, 2022
@tnmysh
Copy link
Collaborator Author

tnmysh commented Sep 28, 2022

@arnopo

I addressed comments in latest commit.

  • No makefile in root dir
  • Add README for echo_test
  • Allow end point dst address to be set from command line.

@tnmysh tnmysh requested review from arnopo and removed request for edmooring and wmamills September 29, 2022 13:01
Copy link

@edmooring edmooring left a comment

Choose a reason for hiding this comment

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

Looks good to me.

This project uses same license as openamp project.
So copy over open-amp project license file and add AMD copyrights line

Signed-off-by: Tanmay Shah <tanmay.shah@amd.com>
examples directory will contain different apps demonstrating
various functionality of openamp framework

This particular app was moved from meta-openamp project as
meta-openamp is supposed to have only Yocto bitbake recipes and
not source files.

This app demonstrates fast IPC communication without data corruption
between Host and Remote processor. IPC communication is done via
rpmsg framework in kernelspace

Signed-off-by: Tanmay Shah <tanmay.shah@amd.com>
@tnmysh tnmysh force-pushed the rpmsg_echo_test_kernelspace branch from f10ea12 to ef0e414 Compare October 6, 2022 05:43
@tnmysh
Copy link
Collaborator Author

tnmysh commented Oct 6, 2022

@wmamills, @arnopo, @edmooring

I have split changes in different commits as requested. If all look good, I will do the same for other examples as well.

@arnopo
Copy link
Collaborator

arnopo commented Oct 6, 2022

@wmamills, @arnopo, @edmooring

I have split changes in different commits as requested. If all look good, I will do the same for other examples as well.

look good to me
Thanks for the extra work

@arnopo arnopo requested a review from edmooring October 6, 2022 14:32
Copy link
Collaborator

@wmamills wmamills left a comment

Choose a reason for hiding this comment

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

Reference should be to the openamp lib example not the Xilinx sample

@tnmysh
Copy link
Collaborator Author

tnmysh commented Oct 10, 2022

Reference should be to the openamp lib example not the Xilinx sample

Ah! I understand now. That would be: https://github.com/OpenAMP/open-amp/blob/main/apps/examples/echo/rpmsg-echo.c

I will update README accordingly in all the examples.

@tnmysh tnmysh force-pushed the rpmsg_echo_test_kernelspace branch from ef0e414 to 47b85cf Compare October 12, 2022 19:57
@arnopo arnopo mentioned this pull request Oct 20, 2022
@tnmysh
Copy link
Collaborator Author

tnmysh commented Oct 21, 2022

Reference should be to the openamp lib example not the Xilinx sample

Ah! I understand now. That would be: https://github.com/OpenAMP/open-amp/blob/main/apps/examples/echo/rpmsg-echo.c

I will update README accordingly in all the examples.

Done.

@tnmysh tnmysh requested review from wmamills and removed request for edmooring October 25, 2022 01:51
Kernel uses rpmsg_ctrl from virtio0.rpmsg_ctrl.0.0 directory.
Add this support without breaking backward compatibility

Signed-off-by: Tanmay Shah <tanmay.shah@amd.com>
@tnmysh tnmysh requested review from arnopo and edmooring and removed request for wmamills, arnopo and edmooring October 26, 2022 23:12
@tnmysh
Copy link
Collaborator Author

tnmysh commented Oct 26, 2022

@arnopo , @edmooring
Could you please look at latest change ?
I can only re-request review for one of you.
I am not sure why I can't re-request reviews for both of you.

use __progname instead of hardcode binary name

Signed-off-by: Tanmay Shah <tanmay.shah@amd.com>
@tnmysh tnmysh requested review from arnopo and removed request for edmooring and wmamills October 29, 2022 20:13
Attempt to probe rpmsg_ctrl driver for kernel >= 6.0.
If failed, then assume it's kernel < 6.0 and continue execution.

Signed-off-by: Tanmay Shah <tanmay.shah@amd.com>
replace "Master" with "Host"

Signed-off-by: Tanmay Shah <tanmay.shah@amd.com>
Copy link
Collaborator

@arnopo arnopo left a comment

Choose a reason for hiding this comment

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

LGTM

@arnopo arnopo merged commit 5d4b284 into OpenAMP:main Nov 15, 2022
@tnmysh tnmysh deleted the rpmsg_echo_test_kernelspace branch December 3, 2022 00:46
arnopo added a commit to arnopo/openamp-system-reference that referenced this pull request May 20, 2024
Point to the main branch tha integrate the pull request OpenAMP#1

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
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

Successfully merging this pull request may close these issues.

4 participants