Improve the porting guide page#86
Conversation
d959cdc to
3dcae1d
Compare
having duplicated embedded doxygen content results in the warning WARNING: Duplicate C++ declaration As these APIs are already detailed in the remoteproc documentation make a reference to them rather than repeat the embed. Signed-off-by: Sipke Vriend <sipke@direktembedded.com>
add some hw acronymns that will be used in porting guide changes to the glossary. Signed-off-by: Sipke Vriend <sipke@direktembedded.com>
different implementation will use varying combinations of hardware, RPMsg and Remoteproc so provide an overview of these. Signed-off-by: Sipke Vriend <sipke@direktembedded.com>
To further detail what a resource table contains, embed the doxygen from the remoteproc.h structure definitions. Signed-off-by: Sipke Vriend <sipke@direktembedded.com>
Use sphinx's literalinclude to add code snippets from examples rather than having code in the documentation. This helps in the documentation being updated when the code is and shows the user where an example can be studied further. This uses line numbers, which may need adjusting each release, but there would be an option to change code to include start and end tags as follows to avoid line updates. e.g. .. literalinclude:: example.py :start-after: "# start function_x" :end-before: "# end function_y" Signed-off-by: Sipke Vriend <sipke@direktembedded.com>
Reword this section slightly and link to an example rather than include a code snippet. Signed-off-by: Sipke Vriend <sipke@direktembedded.com>
3dcae1d to
0778cc5
Compare
|
During review note also the comment for 47ae5ad which includes a snippet from source in openamp-system-reference. If we think this is a good direction for other snippets, it would be better to use the start and end tags as detailed in that comment, rather than line numbers. |
| Shared memory forms the :ref:`physical layer<rpmsg-layers-work-label>` for | ||
| :doc:`RPMsg <../docs/rpmsg_design>` protocol. | ||
| The specific memory type and layout are implementation dependent, but should be a dedicated | ||
| SRAM or DDR region accessible by both cores, with caching disabled. |
There was a problem hiding this comment.
open-amp supports cache management
| ******** | ||
|
|
||
| The porting of OpenAMP to a new :doc:`multicore system <../openamp/overview>` requires | ||
| configuring the hardware on each core so it aligns with the OpenAMP architecture. |
There was a problem hiding this comment.
Proposal ```suggestion
The porting of OpenAMP to a new :doc:multicore system <../openamp/overview> requires
some hardware for inter-processor communication.
| :ref:`Resource Table<resource-table>`. | ||
|
|
||
| Memory and interrupt assignments are critical design choices for any port. For a broader overview, refer to | ||
| :doc:`../protocol_details/system_considerations`. |
There was a problem hiding this comment.
From hardware perspective the OpenAMP require
- a shared memory for
- the RPmsg buffer
- the virtio rings
- the resource table (optioal if the rpmsg host is not the Linux kernel)
- an optional mailboxes ( burt recommanded ) acting a a ring bell interrupt on processors to inform about message reception
| Memory requirements are generally modest because RPMsg is a control‑oriented protocol | ||
| rather than a high‑bandwidth streaming channel. For example, using the Linux RPMsg packet | ||
| size of 512 bytes, a 64kB shared memory region can hold roughly 128 messages — sufficient | ||
| for most applications. Larger or smaller allocations can be chosen based on system needs. |
There was a problem hiding this comment.
you need also memory for the virtio rings , with Linux you should add 2* 4K for the vrings.. for other can be less
| Shared memory forms the :ref:`physical layer<rpmsg-layers-work-label>` for | ||
| :doc:`RPMsg <../docs/rpmsg_design>` protocol. | ||
| The specific memory type and layout are implementation dependent, but should be a dedicated | ||
| SRAM or DDR region accessible by both cores, with caching disabled. |
There was a problem hiding this comment.
it work with or without cache. the cache management can be enabled in open-amp using the WITH_DCACHE cmake configuration
|
|
||
| .. _driver-lcm-remoteproc: | ||
|
|
||
| Driver Lifecycle Management via Remoteproc |
There was a problem hiding this comment.
| Driver Lifecycle Management via Remoteproc | |
| Remote processor Lifecycle Management via Remoteproc |
| Driver Lifecycle Management via Remoteproc | ||
| ========================================== | ||
|
|
||
| Some systems do not require IPC or use an alternative IPC mechanism. In these cases, only |
There was a problem hiding this comment.
to remove the remoteproc framework is independent from the rpmsg
|
|
||
| Some systems do not require IPC or use an alternative IPC mechanism. In these cases, only | ||
| :ref:`Remoteproc<overview-remoteproc-work-label>` may be ported (or reused, as on Linux) | ||
| on both the main and remote processors. |
There was a problem hiding this comment.
the remoteproc framework is optional
- need on main processor if it need to manage the remote processor live cyccle
- can be used on remoteprocessor to manage the resource table for IPC
|
|
||
| - Pros: Very lightweight. | ||
| - Cons: Highly custom and less portable. | ||
|
|
There was a problem hiding this comment.
I wonder if we should not restructure the chapters.. here is a proposal (from .. _driver-lcm-remoteproc: regerence)
i just put titles and list content
Don't hesitate to challenge this , it look to me that we woill probably need few iterations with some other reviewers to land to a good porting guide
Remoteproc framework
====================
- remote processor management
- resource table management
driver role
---------------
- remoteprocessor livecycle management
- resource table discovery
- example: https://github.com/OpenAMP/openamp-system-reference/tree/main/examples/legacy_apps/examples/load_fw
device role
---------------
- optional
- can be use for the resource table management
example: https://github.com/OpenAMP/openamp-system-reference/blob/main/examples/legacy_apps/machine/xlnx/zynqmp_r5/platform_info.c
- alternative is to managea static resource table directly
example https://github.com/OpenAMP/openamp-system-reference/blob/main/examples/zephyr/rpmsg_multi_services/src/main_remote.c
Remoteproc virtio framework
========================
This is the virtio transport layer ( virtio MMIO is another)
driver role
---------------
- get resource table information and configure it
- create virtio driver
device role
---------------
- get resource table information filled by the virtio driver
- create virtio device
example https://github.com/OpenAMP/openamp-system-reference/blob/main/examples/zephyr/rpmsg_multi_services/src/main_remote.c
RPMsg framework
===============
- IPC
- based on VirtIO
- remoteproc virtio
- static vring transport layer
example:https://github.com/zephyrproject-rtos/zephyr/tree/main/samples/subsys/ipc/openamp
reference to https://github.com/OpenAMP/openamp-system-reference examples for the driver and devices implementation
| `remoteproc header <https://github.com/OpenAMP/open-amp/blob/main/lib/include/openamp/remoteproc.h>`_. | ||
| The resource table is effectively a list of resource definitions, with each entry detailed by the | ||
| corresponding :ref:`resource structure<resource-structure>`, and the Remoteproc framework | ||
| is responsible for configuring the relevant drivers and/or bare metal hardware. |
There was a problem hiding this comment.
is responsible for configuring the resource need by the remote processor ( shared memory, traces buffers, vendor specific resources)
Changes to address #85
Added high level overview attempting to address suggestions in the issue to get feedback on direction.
Also added some questions to the issue to get more input for future changes to this PR.