cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Observer
Observer
523 Views
Registered: ‎01-17-2020

Why are there two applications in zynqmp_amp_demo repository? Please explain or send me a PM.

Jump to solution

I am a newbie to OpenAMP, Libmetal, and IPI.  I am trying to find out information about two libmetal/OpenAMP applications written by Xilinx that have very similar names: One application runs normally, the other one errors out with "device platform:ff310000.ipi not found."  Those files are taken from:

https://github.com/OpenAMP/libmetal/tree/master/examples/system/linux/zynqmp/zynqmp_amp_demo

Since my last forum post was flagged,I would hope someone might explain to me why my question regarding the difference between libmetal_amp_demod.c and libmetal_amp_demo.c files is inappropriate, or provide me with the contact information for an FAE who deals with OpenAMP so I can better be informed and post better questions. 

I have read through UG1186 (https://www.xilinx.com/support/documentation/sw_manuals/xilinx2019_1/ug1186-zynq-openamp-gsg.pdf)  and the Confluence page (https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/118358017/OpenAMP+2019.1)  and still have a few questions.

I am not using Petalinux, but Buildroot, so I had to manually compile the applications in the libmetal examples folder and manually make the test .elf for the R5 and deploy to my test platform.  As a result, I can't completely replicate the steps listed in UG1186 or on the 2019.1 Confluence page, which may be causing some confusion. 

For example, with Petalinux, perhaps the only built Linux application is libmetal_amp_demo (not demod), while in my case I have both applications built and linked against -lmetal because I manually compiled them from the sources in Github.

Here is my guess: It seems libmetal_amp_demod is intended for the remote processor, whereas libmetal_amp_demo is intended for the Linux platform.  Can someone confirm or deny this, or tell me where else I can look beyond UG1186 or the Confluence Pages shown above?  Is there a better forum page or user group for example, than Xilinx for these questions? The other question I had deals with libmetal vs OpenAMP, but I'll ask that later.

Thank you in advance for leading me in the right direction!

JKarch.

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Observer
Observer
455 Views
Registered: ‎01-17-2020

@jovitac  Thank you-- I think it is slowly starting to make sense to me.  I noticed looking through the device tree that when running libmetal-amp-demod vs libmetal-amp-demo that ipi@ff310000 only appears on the rpu side, and that ipi@ff340000 is used by the Linux side.  Furthermore, when I went to add the "echo-test" app I discovered I had to add additional memory blocks not needed for the libmetal-amp-demo to the device tree, then remove the ipi@ff340000 in favor of the mbox components:

https://github.com/OpenAMP/libmetal/issues/8 was quite helpful in debugging the multiple interrupt issues that resulted from having both

 

                /* IPI device Demo disable this if mboxes used below */
                /* THIS IS USED FOR running libmetal_amp_demo */
/*                ipi_amp: ipi@ff340000 {
                        compatible = "ipi_uio";
                        reg = <0x0 0xff340000 0x0 0x1000>;
                        interrupt-parent = <&gic>;
                        interrupts = <0 29 4>;
                };
*/
 
AND
 
 
                       //this has to be disabled for libmetal-amp-demo
                        zynqmp_ipi1 {
                        compatible = "xlnx,zynqmp-ipi-mailbox";
                        interrupt-parent = <&gic>;
                        interrupts = <0 29 4>;
                        xlnx,ipi-id = <7>;
                        #address-cells = <1>;
                        #size-cells = <1>;
                        ranges;
 
                        // APU<->RPU0 IPI mailbox controller
                        ipi_mailbox_rpu0: mailbox@ff90000 {
                                reg = <0xff990600 0x20>,
                                      <0xff990620 0x20>,
                                      <0xff9900c0 0x20>,
                                      <0xff9900e0 0x20>;
                                reg-names = "local_request_region",
                                            "local_response_region",
                                            "remote_request_region",
                                            "remote_response_region";
                                #mbox-cells = <1>;
                                xlnx,ipi-id = <1>;
                        };
                };

declared in the device tree.  So I couldn't easily switch from the libmetal-amp-demo to the echo-test Amp app without clearing the offending interrupt and mboxes from the device tree and r5_0 components.

"

from r5_0 section of zynqmp-rpu.

                                //IPI mailboxes (mboxes) may need to be disabled for  libmetal_amp demo
                                mboxes = <&ipi_mailbox_rpu0 0>, <&ipi_mailbox_rpu0 1>;
                                mbox-names = "tx", "rx";
"
 
So I'm slowly getting a hang of this.  Thank you for the response!  I hope the info up here is helpful too as it was a side effect of trying to figure out why one app worked and one didn't!

View solution in original post

0 Kudos
2 Replies
Highlighted
Moderator
Moderator
463 Views
Registered: ‎05-10-2017

libmetal_amp_demod is for the remote processors (R5) and libmetal_amp_demo is for Linux

Both demos can be built in Xilinx SDK as well. You will need to build and link it against the metal library. In Petalinux, we do this by enabling the libmetal package in the rootfs and building and packaging the sysroots

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
Highlighted
Observer
Observer
456 Views
Registered: ‎01-17-2020

@jovitac  Thank you-- I think it is slowly starting to make sense to me.  I noticed looking through the device tree that when running libmetal-amp-demod vs libmetal-amp-demo that ipi@ff310000 only appears on the rpu side, and that ipi@ff340000 is used by the Linux side.  Furthermore, when I went to add the "echo-test" app I discovered I had to add additional memory blocks not needed for the libmetal-amp-demo to the device tree, then remove the ipi@ff340000 in favor of the mbox components:

https://github.com/OpenAMP/libmetal/issues/8 was quite helpful in debugging the multiple interrupt issues that resulted from having both

 

                /* IPI device Demo disable this if mboxes used below */
                /* THIS IS USED FOR running libmetal_amp_demo */
/*                ipi_amp: ipi@ff340000 {
                        compatible = "ipi_uio";
                        reg = <0x0 0xff340000 0x0 0x1000>;
                        interrupt-parent = <&gic>;
                        interrupts = <0 29 4>;
                };
*/
 
AND
 
 
                       //this has to be disabled for libmetal-amp-demo
                        zynqmp_ipi1 {
                        compatible = "xlnx,zynqmp-ipi-mailbox";
                        interrupt-parent = <&gic>;
                        interrupts = <0 29 4>;
                        xlnx,ipi-id = <7>;
                        #address-cells = <1>;
                        #size-cells = <1>;
                        ranges;
 
                        // APU<->RPU0 IPI mailbox controller
                        ipi_mailbox_rpu0: mailbox@ff90000 {
                                reg = <0xff990600 0x20>,
                                      <0xff990620 0x20>,
                                      <0xff9900c0 0x20>,
                                      <0xff9900e0 0x20>;
                                reg-names = "local_request_region",
                                            "local_response_region",
                                            "remote_request_region",
                                            "remote_response_region";
                                #mbox-cells = <1>;
                                xlnx,ipi-id = <1>;
                        };
                };

declared in the device tree.  So I couldn't easily switch from the libmetal-amp-demo to the echo-test Amp app without clearing the offending interrupt and mboxes from the device tree and r5_0 components.

"

from r5_0 section of zynqmp-rpu.

                                //IPI mailboxes (mboxes) may need to be disabled for  libmetal_amp demo
                                mboxes = <&ipi_mailbox_rpu0 0>, <&ipi_mailbox_rpu0 1>;
                                mbox-names = "tx", "rx";
"
 
So I'm slowly getting a hang of this.  Thank you for the response!  I hope the info up here is helpful too as it was a side effect of trying to figure out why one app worked and one didn't!

View solution in original post

0 Kudos