________________________________ Von: Tanmay Shah tanmay.shah@amd.com Gesendet: Donnerstag, 6. Juni 2024 17:44 An: Andreas Pankoke APankoke@comprion.com Betreff: Re: AW: [Openamp-rp] c++ in xlinx linux
Hello,
On 6/6/24 10:24 AM, Andreas Pankoke wrote:
Hello, thanks for your reply.
Are you trying to load R5 firmware written in C++ from Linux kernel? Or R5 firmware for one core in C++ is getting loaded from another R5 core in split mode?
No. Iam loading the R5 Program via OpenAMP from the Linux Kernel in R5_0 like this. The R5 should be running in split-Mode. This is configured via the Device-tree:
echo CLWaveNFC_Test02.elf > /sys/class/remoteproc/remoteproc0/firmware echo start > state
If you are executing these steps, then OpenAMP loader isn't used at all if I understand correctly. Instead it's elf loader in linux kernel.
Here: https://github.com/torvalds/linux/blob/v6.10-rc2/drivers/remoteproc/remotepr...
As of now, on Xilinx platform C++ loading isn't tested.
Thanks.
Yes this one is failing I think. BR Andreas
The Program has been written in C++.
"these things" could you please explain specifics?
Were working on the Xilinx branch. I mean the fix in the OpenAMP branch regarding the fix: #27 https://github.com/OpenAMP/open-amp/issues/27
I would like to know, if it is possible to get this, c++ loading, running on the Xilinx side.
Xilinx's Petalinux releases usually rely on upstream OpenAMP and Libmetal library releases. As of now once changes are merged in upstream OpenAMP and Libmetal libraries, they are picked up in .1 release cycle of Petalinux.
I get the error with every Release of petalinux I've tested (2021.2 & 2024.1)
the error(s) is(are) essentially the following: [ 801.017356][ T1162] remoteproc remoteproc0: trace0 added: da 0x3ee00220, len 0x1000 [ 801.027989][ T1162] remoteproc remoteproc0: bad phdr da 0x0 mem 0x19680 [ 801.034608][ T1162] remoteproc remoteproc0: Failed to load program segments: -22 [ 801.047128][ T1162] remoteproc remoteproc0: Boot failed: -22
BR Andreas
Von: Tanmay Shah tanmay.shah@amd.com Gesendet: Donnerstag, 6. Juni 2024 16:32 An: Andreas Pankoke APankoke@comprion.com; openamp-rp@lists.openampproject.org openamp-rp@lists.openampproject.org Betreff: Re: [Openamp-rp] c++ in xlinx linux
Hello,
I would like you understand your use case first. Please find my questions inline.
On 6/6/24 8:29 AM, Andreas Pankoke via Openamp-rp wrote:
We are COMPRION GmbH from Germany, and we are using the Xilinx FPGA ZynqMP XCZU3EG for our new testing-devices.
I'am an embedded engineer, with the responsibillity to program the ZynqMP Linux and R5 Progs.
Currently I've the problem, that a load of a c++ program via remoteproc doesnot work in the xilinx petalinux.
Are you trying to load R5 firmware written in C++ from linux kernel? Or R5 firmware for one core in C++ is getting loaded from another R5 core in split mode?
Maybe there is someone how can help me out....
We are working with the petalinux 2021.2 release.
I've tested the new 2024.1 release, but there are no changes to the issue.
The c++ prog. doesnot load.
I've searched the openAMP github for such issues, and I found this one:
https://github.com/OpenAMP/open-amp/issues/27
which has been closed in 2018.
My question is now: How to get these things in the xilinx branch, or is there a branch which has been fixed this issue?
"these things" could you please explain specifics?
Xilinx's Petalinux releases usually rely on upstream OpenAMP and Libmetal library releases. As of now once changes are merged in upstream OpenAMP and Libmetal libraries, they are picked up in .1 release cycle of Petalinux.
Thank you in advance.
BR Andreas
__________________________________________________________________
Von: Tanmay Shah tanmay.shah@amd.com Gesendet: Donnerstag, 6. Juni 2024 17:44 An: Andreas Pankoke APankoke@comprion.com Betreff: Re: AW: [Openamp-rp] c++ in xlinx linux
Hello, On 6/6/24 10:24 AM, Andreas Pankoke wrote:
Hello, thanks for your reply.
Are you trying to load R5 firmware written in C++ from Linux kernel? Or R5 firmware for one core in C++ is getting loaded from another R5
core in split mode?
No. Iam loading the R5 Program via OpenAMP from the Linux Kernel in
R5_0 like this. The R5 should be running in split-Mode. This is configured via the Device-tree:
echo CLWaveNFC_Test02.elf >
/sys/class/remoteproc/remoteproc0/firmware
echo start > state
If you are executing these steps, then OpenAMP loader isn't used at all if I understand correctly. Instead it's elf loader in linux kernel.
Here: [1]https://github.com/torvalds/linux/blob/v6.10-rc2/drivers/remoteproc/ remoteproc_elf_loader.c
As of now, on Xilinx platform C++ loading isn't tested. Thanks.
Yes this one is failing I think.
BR
Andreas
The Program has been written in C++.
"these things" could you please explain specifics?
Were working on the Xilinx branch. I mean the fix in the OpenAMP branch regarding the fix: #27 [2]https://github.com/OpenAMP/open-amp/issues/27
I would like to know, if it is possible to get this, c++ loading,
running on the Xilinx side.
Xilinx's Petalinux releases usually rely on upstream OpenAMP and
Libmetal library releases.
As of now once changes are merged in upstream OpenAMP and Libmetal
libraries,
they are picked up in .1 release cycle of Petalinux.
I get the error with every Release of petalinux I've tested (2021.2 &
2024.1)
the error(s) is(are) essentially the following: [ 801.017356][ T1162] remoteproc remoteproc0: trace0 added: da
0x3ee00220, len 0x1000
[ 801.027989][ T1162] remoteproc remoteproc0: bad phdr da 0x0 mem
0x19680
[ 801.034608][ T1162] remoteproc remoteproc0: Failed to load program
segments: -22
[ 801.047128][ T1162] remoteproc remoteproc0: Boot failed: -22
BR Andreas
Von: Tanmay Shah tanmay.shah@amd.com Gesendet: Donnerstag, 6. Juni 2024 16:32 An: Andreas Pankoke APankoke@comprion.com;
openamp-rp@lists.openampproject.org openamp-rp@lists.openampproject.org
Betreff: Re: [Openamp-rp] c++ in xlinx linux
Hello,
I would like you understand your use case first. Please find my questions inline.
On 6/6/24 8:29 AM, Andreas Pankoke via Openamp-rp wrote:
We are COMPRION GmbH from Germany, and we are using the Xilinx
FPGA
ZynqMP XCZU3EG for our new testing-devices.
I'am an embedded engineer, with the responsibillity to program
the
ZynqMP Linux and R5 Progs.
Currently I've the problem, that a load of a c++ program via
remoteproc
doesnot work in the xilinx petalinux.
Are you trying to load R5 firmware written in C++ from linux kernel? Or R5 firmware for one core in C++ is getting loaded from another R5
core in split mode?
Maybe there is someone how can help me out....
We are working with the petalinux 2021.2 release.
I've tested the new 2024.1 release, but there are no changes to
the
issue.
The c++ prog. doesnot load.
I've searched the openAMP github for such issues, and I found
this one:
[3]https://github.com/OpenAMP/open-amp/issues/27
which has been closed in 2018.
My question is now: How to get these things in the xilinx branch,
or is
there a branch which has been fixed this issue?
"these things" could you please explain specifics?
Xilinx's Petalinux releases usually rely on upstream OpenAMP and
Libmetal library releases.
As of now once changes are merged in upstream OpenAMP and Libmetal
libraries,
they are picked up in .1 release cycle of Petalinux.
Thank you in advance.
BR Andreas
References
1. https://github.com/torvalds/linux/blob/v6.10-rc2/drivers/remoteproc/remotepr... 2. https://github.com/OpenAMP/open-amp/issues/27 3. https://github.com/OpenAMP/open-amp/issues/27