UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Observer mars_op
Observer
322 Views
Registered: ‎08-29-2018

my own OpenAMP application failed to load

I have learned the three application of OpenAMP (echo-test  mat-multiply  and  proxy) and run them on ZCU102 ES2 board. However, when I tried my own app, I found it failed to set up RPMSG channel after I typed echo start > /sys/class/remoteproc/remoteproc0/state on terminal. 

Here is my terminal info:

root@hw-rpssd:~# echo myapp > /sys/class/remoteproc/remoteproc0/firmware

root@hw-rpssd:~# echo start > /sys/class/remoteproc/remoteproc0/state

[  106.504604] remoteproc remoteproc0: powering up ff9a0100.zynqmp_r5_rproc

[  106.512478] remoteproc remoteproc0: Booting fw image myapp, size 1183272

[  106.522214] zynqmp_r5_remoteproc ff9a0100.zynqmp_r5_rproc: RPU boot from TCM.

[

***********************************************************

 

[!] MPU has been enabled.

 PCIe setup done

Starting application...

                       Try to init remoteproc resource

                                                      Init remoteproc resource done

                                                                                   Waiting for events...

[  106.529956] remoteproc remoteproc0: registered virtio0 (type 7)

[  106.532959] virtio_rpmsg_bus virtio0: Registered as RPMsg char device.

[  106.532965] virtio_rpmsg_bus virtio0: rpmsg host is online

[  106.566788] remoteproc remoteproc0: remote processor ff9a0100.zynqmp_r5_rproc is now up

root@hw-rpssd:~# modprobe rpmsg_user_dev_driver

[  176.402580] rpmsg_user_dev_driver: loading out-of-tree module taints kernel.

root@hw-rpssd:/run/media/mmcblk0p2/mnt# ./mylinuxapp

 

 ssd r/w demo start

 

 Open rpmsg dev!

Failed to open device /dev/rpmsg0.

********************************************************************************************************************************************************************************************************************************************************************************************************************************************

compared to standard echo-test demo:

root@xilinx-zcu102-zu9-es2-rev1_0-2018:~# echo echo-test.elf > /sys/class/remoteproc/remoteproc0/firmware

root@xilinx-zcu102-zu9-es2-rev1_0-2018:~# echo start > /sys/class/remoteproc/remoteproc0/state

[  109.720340] remoteproc remoteproc0: powering up ff9a0100.zynqmp_r5_rproc

[  109.728038] remoteproc remoteproc0: Booting fw image echo-test.elf, size 972500

[  109.738113] zynqmp_r5_remoteproc ff9a0100.zynqmp_r5_rproc: RPU boot from TCM.

[  Starting application...

                          Try to init remoteproc resource

                                                         Init remoteproc resource succeeded

                                                                                           Waiting for events...

[  109.745852] remoteproc remoteproc0: registered virtio0 (type 7)

[  109.748983] virtio_rpmsg_bus virtio0: Registered as RPMsg char device.

[  109.748989] virtio_rpmsg_bus virtio0: rpmsg host is online

[  109.773490] remoteproc remoteproc0: remote processor ff9a0100.zynqmp_r5_rproc is now up

[  109.781649] virtio_rpmsg_bus virtio0: creating channel rpmsg-openamp-demo-channel addr 0x1

[  109.789845] virtio_rpmsg_bus virtio0: Remote has announced service rpmsg-openamp-demo-channel, 1.

root@xilinx-zcu102-zu9-es2-rev1_0-2018:~# modprobe rpmsg_user_dev_driver

[405.798653] rpmsg_user_dev_driver: loading out-of-tree module taints kernel.

[405.806038] rpmsg_user_dev_driver virtio0.rpmsg-openamp-demo-channel.-1.1: rpmsg_user_dev_rpmsg_drv_probe

[405.815819] rpmsg_user_dev_driver virtio0.rpmsg-openamp-demo-channel.-1.1: new channel: 0x400 -> 0x1!

root@xilinx-zcu102-zu9-es2-rev1_0-2018:~# echo_test

 Echo test start

 Open rpmsg dev /dev/rpmsg0!

[473.218085] rpmsg_user_dev_driver virtio0.rpmsg-openamp-demo-channel.-1.1: Sent init_msg to target 0x1.

...

********************************************************************************************************************************************************************************************************************************************************************************************************************************************

It is obviously that some infomation lost in my app, I guess it was remote core name service advertisement function so master core did not receive message to build rpmsg channel. However, my app is almost the same to mat-multiply demo in code structure, the only difference is their functionality. So I couldn't figure out what I mistake.

Another info maybe useful, I build my petalinux project with "petalinux-create -t project --template zynqMP --name myapp" and "petalinux-config--get-hw-description=<PATH-TO-HDF>" which is different form standard OpenAMP echo-test project "petalinux-create -t project -s <PATH_TO_PETALINUX_ZYNQMP_PROJECT_BSP>", I have to do this because I need to import my HDF file in my app. 

0 Kudos
5 Replies
Moderator
Moderator
302 Views
Registered: ‎05-10-2017

Re: my own OpenAMP application failed to load

Make sure you have the necessary configs enabled in your rootfs. These may be enabled by default when you use the petalinux bsps.

Filesystem Packages --->
misc --->
packagegroup-petalinux-openamp --->
[*] packagegroup-petalinux-openamp

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Observer mars_op
Observer
287 Views
Registered: ‎08-29-2018

Re: my own OpenAMP application failed to load

Thanks for your reply. I am pretty sure I have enabled that configs in my rootfs.

0 Kudos
Observer mars_op
Observer
255 Views
Registered: ‎08-29-2018

Re: my own OpenAMP application failed to load

I found the problem, I did PCIE enumeration and NVME SSD read/write in my SDK application by RPU, here is the problem. Everything is OK when I did these without Linux on APU, but when I build it as my OpenAMP app, I can not access NVME controller configuation space. However, PCIE rootport and endpoint configuation space mapping were both OK.(NVME controller configuation space is also the PCIE endpoint's BAR0, I believe someone know about NVME will understand what I mean).

And here is my memory mapping figure contrast.

 

Snipaste_2019-03-15_11-02-11.png
0 Kudos
Moderator
Moderator
243 Views
Registered: ‎05-10-2017

Re: my own OpenAMP application failed to load

Could you please disable the PCIe node in the Linux device-tree and try this out?

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Observer mars_op
Observer
224 Views
Registered: ‎08-29-2018

Re: my own OpenAMP application failed to load

Sorry I forgot to say, Yes I have diabled the PCIE node in system-user.dtsi like this:

 

&pcie {
status = "disabled";
xlnx,pcie-mode = "Root Port";
};

I can not see any Pcie device when I input lspci command after embedded linux boot up.

 

0 Kudos