Skip to content

openamp sample integration/app #7416

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

Merged
merged 3 commits into from
May 19, 2018

Conversation

galak
Copy link
Collaborator

@galak galak commented May 8, 2018

Example of using open-amp.

This example docs need some cleaning up, but this is based on #7415 and #7161

@galak galak added the DNM This PR should not be merged (Do Not Merge) label May 8, 2018
@galak galak requested review from dbkinder and MaureenHelm as code owners May 8, 2018 17:48
@galak galak added the area: IPC Inter-Process Communication label May 8, 2018
@@ -0,0 +1,61 @@
.. _lpcxpresso54114_m0:

NXP LPCXPRESSO54114
Copy link
Contributor

Choose a reason for hiding this comment

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

might-should add M0 or maybe (M0 core) to this title. Without it, it has the same title as the board doc we've already got.

as dropping characters, have been observed with older versions of the firmware.

The code for the secondary core is linked into the primary core binary file.
Startup code copies the secondary core's code into an appropriate location
Copy link
Contributor

Choose a reason for hiding this comment

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

Might be work clarifying (assuming I've got this right):

Startup code for the primary core copies the secondary core's code into an
appropriate location in RAM and starts the secondary core's execution.

@galak galak mentioned this pull request May 17, 2018
@galak galak force-pushed the openamp-sample branch from fbd7f71 to 580b9ad Compare May 17, 2018 20:14
@galak galak requested review from nashif and SebastianBoe as code owners May 17, 2018 20:14
@galak galak changed the title [DNM] Openamp sample openamp sample integration/app May 17, 2018
@galak galak dismissed dbkinder’s stale review May 17, 2018 20:21

needs rereview

@galak galak force-pushed the openamp-sample branch from 580b9ad to dc742d7 Compare May 17, 2018 20:25
@galak
Copy link
Collaborator Author

galak commented May 17, 2018

@dbkinder can you review this now from a doc perspective.

@galak
Copy link
Collaborator Author

galak commented May 17, 2018

This is the first step towards a fuller solution for #3065. We expect in the future to update the openamp implementation both for improved integration with Zephyr, as well as reduce code footprint from an improved openamp library.

@galak galak removed the DNM This PR should not be merged (Do Not Merge) label May 18, 2018
galak added 2 commits May 17, 2018 19:10
Origin:
   https://github.com/OpenAMP/libmetal

Status:
   606c31438025b9fb1515dace1c642d5835d8d33c [v2018.04]

   When we import libmetal we removed the tests/ and examples/ dir to
   reduce the amount of code imported.

Purpose:
   HAL abstraction layer used by open-amp

Description:
   Libmetal provides common user APIs to access devices, handle device
   interrupts and request memory across the following operating
   environments:

   * Linux user space (based on UIO and VFIO support in the kernel)
   * RTOS (with and without virtual memory)
   * Bare-metal environments

Dependencies:
   Depends on Zephyr itself as it utilizes Zephyr's APIs to provide an
   abstraction to open-amp.

URL:
   https://github.com/OpenAMP/libmetal

commit:
   606c31438025b9fb1515dace1c642d5835d8d33c

Maintained-by:
   External

License:
   BSD-3-Clause

License Link:
   https://github.com/OpenAMP/libmetal/blob/master/LICENSE.md

Signed-off-by: Kumar Gala <[email protected]>
Origin:
   https://github.com/OpenAMP/open-amp

Status:
   de361adee09cd31793c60218a0ec49bc307a7410 [v2018.04]

   When we import open-amp we removed the apps dir to reduce the amount
   of code imported.

Purpose:
   IPC layer that implements rpmsg communication between cores.

Description:

This repository is the home for the Open Asymmetric Multi Processing
(OpenAMP) framework project. The OpenAMP framework provides software
components that enable development of software applications for
Asymmetric Multiprocessing (AMP) systems. The framework provides the
following key capabilities.

* Provides Life Cycle Management, and Inter Processor Communication
  capabilities for management of remote compute resources and their
  associated software contexts.
* Provides a stand alone library usable with RTOS and Baremetal software
  environments
* Compatibility with upstream Linux remoteproc and rpmsg components
* Following AMP configurations supported:
  a. Linux master/Generic(Baremetal) remote
  b. Generic(Baremetal) master/Linux remote
* Proxy infrastructure and supplied demos showcase ability of proxy on
  master to handle printf, scanf, open, close, read, write calls from
  Bare metal based remote contexts.

Dependencies:
   libmetal (https://github.com/OpenAMP/libmetal) - provides HAL layer
   between OpenAMP and RTOS or OS environment.

URL:
   https://github.com/OpenAMP/open-amp/

commit:
   de361adee09cd31793c60218a0ec49bc307a7410

Maintained-by:
   External

License:
   BSD-3-Clause
   BSD-2-Clause

Signed-off-by: Kumar Gala <[email protected]>
@galak galak force-pushed the openamp-sample branch from dc742d7 to 5ab35bd Compare May 18, 2018 00:11
@codecov-io
Copy link

codecov-io commented May 18, 2018

Codecov Report

Merging #7416 into master will decrease coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7416      +/-   ##
==========================================
- Coverage   55.01%   55.01%   -0.01%     
==========================================
  Files         483      483              
  Lines       53950    53950              
  Branches    10495    10495              
==========================================
- Hits        29680    29679       -1     
- Misses      19984    19985       +1     
  Partials     4286     4286
Impacted Files Coverage Δ
lib/posix/pthread.c 69.03% <0%> (-0.51%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aa26289...6cc6c83. Read the comment docs.

Copy link
Collaborator

@SebastianBoe SebastianBoe left a comment

Choose a reason for hiding this comment

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

NACK

Recursive-make must be avoided when possible.

For OpenThread it was not possible due to the sheer size of the OpenThread build system.

For libmetal it is possible to avoid recursive-make because the project is small and easy to build.

This commit adds a sample application using OpenAMP for remote procedure
calls on the LPCXpresso54114. It is adapted from the RPMsg-Lite sample
application added in PR zephyrproject-rtos#5960, and uses the IPM driver to provide
interprocessor interrupts.

Signed-off-by: Kristian Klomsten Skordal <[email protected]>
Signed-off-by: Kumar Gala <[email protected]>
@MaureenHelm
Copy link
Member

Fixed the checkpatch error and all of the warnings except for:

-:405: WARNING:PREFER_KERNEL_TYPES: Prefer kernel type 'u32_t' over 'uint32_t'
#405: FILE: samples/subsys/ipc/openamp/platform/resource_table.h:16:
+	uint32_t ver;

-:406: WARNING:PREFER_KERNEL_TYPES: Prefer kernel type 'u32_t' over 'uint32_t'
#406: FILE: samples/subsys/ipc/openamp/platform/resource_table.h:17:
+	uint32_t num;

-:407: WARNING:PREFER_KERNEL_TYPES: Prefer kernel type 'u32_t' over 'uint32_t'
#407: FILE: samples/subsys/ipc/openamp/platform/resource_table.h:18:
+	uint32_t reserved[2];

-:408: WARNING:PREFER_KERNEL_TYPES: Prefer kernel type 'u32_t' over 'uint32_t'
#408: FILE: samples/subsys/ipc/openamp/platform/resource_table.h:19:
+	uint32_t offset[2];

@MaureenHelm MaureenHelm dismissed SebastianBoe’s stale review May 19, 2018 17:50

Filed blocking issue #7673 to fix before 1.12 release

@MaureenHelm MaureenHelm merged commit 5eb8829 into zephyrproject-rtos:master May 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: IPC Inter-Process Communication
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants