-
Notifications
You must be signed in to change notification settings - Fork 19
Align libmetal demo with openamp vendor support #93
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
base: main
Are you sure you want to change the base?
Align libmetal demo with openamp vendor support #93
Conversation
099f49f to
35dad11
Compare
|
Hello - ping for review @arnopo @edmooring |
35dad11 to
4702659
Compare
examples/libmetal/machine/host/amd_linux_userspace/platform_init.c
Outdated
Show resolved
Hide resolved
4702659 to
f29e681
Compare
|
Hi @arnopo ok this branch is now:
|
f29e681 to
ceedb12
Compare
arnopo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
few typos to fix, else LGTM
examples/libmetal/machine/remote/amd_rpu/system/generic/amp_demo_os.h
Outdated
Show resolved
Hide resolved
| #define DEFAULT_PAGE_SHIFT (-1UL) | ||
| #define DEFAULT_PAGE_MASK (-1UL) | ||
|
|
||
| #define SHM_TOTAL_SIZE SHM0_DESC_SIZE + SHM1_DESC_SIZE +SHM_PAYLOAD_SIZE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| #define SHM_TOTAL_SIZE SHM0_DESC_SIZE + SHM1_DESC_SIZE +SHM_PAYLOAD_SIZE | |
| #define SHM_TOTAL_SIZE (SHM0_DESC_SIZE + SHM1_DESC_SIZE + SHM_PAYLOAD_SIZE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will fix
| metal_io_block_write(shm_io, tx_data_offset, msg_hdr, | ||
| sizeof(struct msg_hdr_s) + msg_hdr->len); | ||
| ret = metal_io_block_write(payload_io, tx_data_offset, msg_hdr, | ||
| sizeof(struct msg_hdr_s) + msg_hdr->len); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alignment should match open parenthesis
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will fix
| /* copy message to shared buffer */ | ||
| metal_io_block_write(shm_io, tx_data_offset, msg_hdr, | ||
| ret = metal_io_block_write(payload_io, tx_data_offset, msg_hdr, | ||
| sizeof(struct msg_hdr_s) + msg_hdr->len); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alignment should match open parenthesis
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will fix
As the resume condition clears the flag, this should check if clear. Signed-off-by: Ben Levinsky <ben.levinsky@amd.com>
…PIPSU driver AMD BSP recommended usage recommends using IPI driver to hook in IPIPSU driver. Reference example here: https://github.com/xilinx/embeddedsw/blob/master/XilinxProcessorIPLib/drivers/ipipsu/examples/xipipsu_self_test_example.c As part of this remove unneeded lines. Also use config.h provided IPI value to get the IPIPSU instance. Signed-off-by: Ben Levinsky <ben.levinsky@amd.com>
Move the libmetal host/remote demo off the legacy single 3ed80000.shm window to the OpenAMP-style carveouts at 0x09860000 with separate descriptor UIOs (9860000.shm_desc, 9864000.shm_desc) and payload (9868000.shm), update the platform init code to open/map the new descriptor regions, add optional config-driven IPI overrides, and match the RPU defaults to the same layout. As part of this, mimic OpenAMP vendor-specific demos in that they will also support support use of unified CMake-driven symbols. This enables external tooling to generate a .cmake file from the system device tree that configures the demo for the target platform without manual edits to source files. Key changes: - Add config.h.in templates for both Linux host and RPU remote that use #cmakedefine to optionally override defaults from common.h - Separate monolithic SHM_BASE_ADDR/SHM_SIZE into distinct carveouts: * SHM0_DESC_BASE/SIZE - descriptor ring 0 * SHM1_DESC_BASE/SIZE - descriptor ring 1 * SHM_PAYLOAD_BASE/SIZE - data payload area - Wrap all platform-specific IPI symbols in #ifndef guards: * IPI_DEV_NAME, IPI_BASE_ADDR, IPI_MASK - Wrap all platform-specific TTC symbols in #ifndef guards: * TTC_DEV_NAME, TTC0_BASE_ADDR, TTC_NODEID - Include demo-specific specific symbols for IPI, Shared memory and TTC as provided by configure-time generated config.h file. - Configure linker script via .cmake metadata too. Signed-off-by: Ben Levinsky <ben.levinsky@amd.com>
UIO C file is dead code. remove it. Signed-off-by: Ben Levinsky <ben.levinsky@amd.com>
Simplify build as it was previously based off legacy Libmetal Linux AMP Demo. Streamline it to just pick up and deliver a statically linked executable. Signed-off-by: Ben Levinsky <ben.levinsky@amd.com>
96f1a93 to
08d5351
Compare
|
Hi @arnopo thanks for your quick review. apologies on those few nits left. I have cleaned them AFAICT one thing to note - the github render seems to differ from my editor. I have tab indented aligned for the changes but in git it shows differently. |
No worries that part of my job ;-)
You can run check patch on your pull request or generating local patch In term should be nice that we add the checkpatch in system-reference repository |
This is based off PR #87
The third and second commits for Linux build.
The top commit has the aim of having the Libmetal Demo converge with the OpenAMP Legacy demo in terms of: