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

OpenAMP rsc table sample #16985

Merged
merged 4 commits into from
Apr 1, 2020

Conversation

arnopo
Copy link
Collaborator

@arnopo arnopo commented Jun 21, 2019

This pull request proposes an implementation of the RPMSg protocol based on a resource table.
The resource table can be use to declare resources shared between the main and coprocessor. It is integrated in the co-processor firmware in a specific section. This section can be recognized and parsed by the Linux OS kernel to initialize shared resources such as trace and RPMsg protocol.

Based on this resource table, the objective is to propose a sample that is platform agnostic and that answers to the Linux rpmsg client sample integrated in the Linux kernel distribution.

For time being this pull request only implements the co-processor side, and could be extended in future to also implement the master part.

@zephyrbot

This comment has been minimized.

@arnopo arnopo force-pushed the OpenAMP_rsc_table_sample branch 2 times, most recently from e6107de to 52e12c1 Compare June 21, 2019 16:24
samples/subsys/ipc/openamp_rsc_table/README.rst Outdated Show resolved Hide resolved
samples/subsys/ipc/openamp_rsc_table/README.rst Outdated Show resolved Hide resolved
samples/subsys/ipc/openamp_rsc_table/README.rst Outdated Show resolved Hide resolved
@arnopo arnopo force-pushed the OpenAMP_rsc_table_sample branch from 52e12c1 to 5b2350b Compare June 24, 2019 12:35
@arnopo
Copy link
Collaborator Author

arnopo commented Jun 24, 2019

@galak Please, could you take a look to this pull request and associated OpenAMP pull request: zephyrproject-rtos/open-amp#2.
I'm not sure that adding the resource table directly in open-amp module is the right solution, so if you have better suggestion, don't hesitate!

@arnopo arnopo force-pushed the OpenAMP_rsc_table_sample branch from 5b2350b to 905f828 Compare June 24, 2019 13:02
samples/subsys/ipc/openamp_rsc_table/README.rst Outdated Show resolved Hide resolved
samples/subsys/ipc/openamp_rsc_table/README.rst Outdated Show resolved Hide resolved
samples/subsys/ipc/openamp_rsc_table/README.rst Outdated Show resolved Hide resolved
Copy link
Contributor

@dbkinder dbkinder left a comment

Choose a reason for hiding this comment

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

doc changes LTGM, thanks!

@arnopo arnopo force-pushed the OpenAMP_rsc_table_sample branch from c41d24d to ab5119e Compare July 3, 2019 09:30
@arnopo arnopo added the area: IPC Inter-Process Communication label Jul 3, 2019
Copy link
Member

@erwango erwango left a comment

Choose a reason for hiding this comment

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

First batch of comments

modules/Kconfig.rsc-table Outdated Show resolved Hide resolved
modules/Kconfig.rsc-table Outdated Show resolved Hide resolved
soc/arm/st_stm32/stm32mp1/CMakeLists.txt Outdated Show resolved Hide resolved
samples/subsys/ipc/openamp_rsc_table/remote/prj.conf Outdated Show resolved Hide resolved
@arnopo arnopo force-pushed the OpenAMP_rsc_table_sample branch from ab5119e to 088a1b9 Compare July 16, 2019 15:00
@erwango erwango self-requested a review July 22, 2019 09:52
@arnopo arnopo force-pushed the OpenAMP_rsc_table_sample branch 3 times, most recently from 0c918c1 to f0591c6 Compare July 25, 2019 15:30
@arnopo
Copy link
Collaborator Author

arnopo commented Feb 6, 2020

@galak: gentle reminder. This PR still waits your review :)

@arnopo arnopo force-pushed the OpenAMP_rsc_table_sample branch 3 times, most recently from 8b1a36e to b85f849 Compare February 6, 2020 15:28
@jhedberg
Copy link
Member

This seems to have been neglected for awhile. I just triggered a Shippable re-run. @galak could you take a look?

@galak galak force-pushed the OpenAMP_rsc_table_sample branch from b85f849 to 2add631 Compare March 25, 2020 18:08
Copy link
Collaborator

@galak galak left a comment

Choose a reason for hiding this comment

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

In general looks good, a few updates based on changes I made to PR #17553 that we should reflect here.

lib/open-amp/rsc_table/Kconfig Outdated Show resolved Hide resolved
lib/open-amp/rsc_table/Kconfig Outdated Show resolved Hide resolved
lib/open-amp/rsc_table/README Outdated Show resolved Hide resolved
lib/open-amp/rsc_table/resource_table.c Outdated Show resolved Hide resolved
samples/subsys/ipc/openamp_rsc_table/remote/CMakeLists.txt Outdated Show resolved Hide resolved
samples/subsys/ipc/openamp_rsc_table/remote/CMakeLists.txt Outdated Show resolved Hide resolved
samples/subsys/ipc/openamp_rsc_table/remote/CMakeLists.txt Outdated Show resolved Hide resolved
soc/arm/st_stm32/stm32mp1/dts_fixup.h Outdated Show resolved Hide resolved
Copy link
Collaborator

@galak galak left a comment

Choose a reason for hiding this comment

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

Do you see having more things in lib/open-amp/. Wonder if we need the rsc_table dir, or if we can flatten things a little?

@arnopo
Copy link
Collaborator Author

arnopo commented Mar 26, 2020

Thanks @galak for the review, i will push a new version ASAP ( likely tomorrow)

@arnopo
Copy link
Collaborator Author

arnopo commented Mar 26, 2020

Do you see having more things in lib/open-amp/. Wonder if we need the rsc_table dir, or if we can flatten things a little?

No more things it pipe for the moment, ok i will suppress the rsc_dtable dir

@arnopo arnopo force-pushed the OpenAMP_rsc_table_sample branch from 2add631 to a649b16 Compare March 27, 2020 13:53
@arnopo
Copy link
Collaborator Author

arnopo commented Mar 27, 2020

Do you see having more things in lib/open-amp/. Wonder if we need the rsc_table dir, or if we can flatten things a little?

No more things it pipe for the moment, ok i will suppress the rsc_dtable dir

rsc_table dir has been suppressed

Copy link
Collaborator

@galak galak left a comment

Choose a reason for hiding this comment

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

In general looks good, some minor updates. Should we get PR #14750 merged first, after which I think this should be good.

lib/open-amp/README Outdated Show resolved Hide resolved
@arnopo arnopo force-pushed the OpenAMP_rsc_table_sample branch from a649b16 to 2c52aa7 Compare March 27, 2020 16:16
@arnopo
Copy link
Collaborator Author

arnopo commented Mar 27, 2020

Shippable issue seems not linked to this PR:

INFO    - 435/782 mps2_an385                tests/net/socket/select/net.socket.select          FAILED Failed (qemu 5.352s)
INFO    - /home/buildslave/src/github.com/zephyrproject-rtos/zephyr/sanity-out/mps2_an385/tests/net/socket/select/net.socket.select/handler.log
ERROR   - *** Booting Zephyr OS build zephyr-v2.2.0-812-g60dd11610e6d  ***
Running test suite socket_select
===================================================================
starting test - test_fd_set
PASS - test_fd_set
===================================================================
starting test - test_select

    Assertion failed at WEST_TOPDIR/zephyr/tests/net/socket/select/src/main.c:115: test_select: (tstamp >= 30U && tstamp <= 30 + FUZZ is false)

@galak galak force-pushed the OpenAMP_rsc_table_sample branch from 2c52aa7 to a5e3033 Compare March 27, 2020 20:22
@arnopo
Copy link
Collaborator Author

arnopo commented Mar 31, 2020

Shippable issue seems not linked to this PR:

INFO    - 435/782 mps2_an385                tests/net/socket/select/net.socket.select          FAILED Failed (qemu 5.352s)
INFO    - /home/buildslave/src/github.com/zephyrproject-rtos/zephyr/sanity-out/mps2_an385/tests/net/socket/select/net.socket.select/handler.log
ERROR   - *** Booting Zephyr OS build zephyr-v2.2.0-812-g60dd11610e6d  ***
Running test suite socket_select
===================================================================
starting test - test_fd_set
PASS - test_fd_set
===================================================================
starting test - test_select

    Assertion failed at WEST_TOPDIR/zephyr/tests/net/socket/select/src/main.c:115: test_select: (tstamp >= 30U && tstamp <= 30 + FUZZ is false)

outdated as solve by a rebase

@galak galak force-pushed the OpenAMP_rsc_table_sample branch from a5e3033 to a4f0eba Compare April 1, 2020 02:30
arnopo added 4 commits April 1, 2020 09:45
The resource table is needed by the Linux kernel OS
for a rpmsg generic support, but is also recognised by OpenAMP.
This table allows to add trace based on the RAM console
and to support rpmsg protocol.

Signed-off-by: Arnaud Pouliquen <[email protected]>
Rebase the resource table management to
the new implementation in open-amp module

Signed-off-by: Arnaud Pouliquen <[email protected]>
64 kB of memory is reserved for the inter-processor
communication. this makes sense only if RPMsg is used.
Allow to use this memory for firmware data by default.

Signed-off-by: Arnaud Pouliquen <[email protected]>
This sample is designed to respond to the Linux
rpmsg sample client.
It should be platform independent and based on the
the integration of a resource table in the elf file.

Signed-off-by: Arnaud Pouliquen <[email protected]>
@arnopo arnopo force-pushed the OpenAMP_rsc_table_sample branch from a4f0eba to 6d2865e Compare April 1, 2020 07:59
@arnopo
Copy link
Collaborator Author

arnopo commented Apr 1, 2020

@galak,
i tested your updates and rebase to force the re-run of some stalled checks,

@galak galak merged commit f6800aa into zephyrproject-rtos:master Apr 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants