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 wsipak
Observer
792 Views
Registered: ‎03-05-2019

rpmsg device is not created in /sys/bus/rpmsg/devices - ZynqMP

Jump to solution

Hello, I am using UG1186 v2019.1 and Petalinux 2019.1 and I wan to run rpmsg echo with Linux on A53 and baremetal on R5.

There is no such device like 'rpmsg' in any place of the system (/dev too).
What I have is : Modules:

uio_pdrv_genirq, virtio_rpmsg_bus, rpmsg_core, rpmsg_char, zynqmp_r5_remoteproc

Virtio device:

 

# ls /sys/bus/virtio/devices/
virtio0

Uio device:

 

 

# ls /dev/ui*
/dev/uio0

 

this is empty:

# ls /sys/bus/rpmsg/devices

This is the output I get:

 

# modprobe zynqmp_r5_remoteproc
[   67.257962] zynqmp_r5_remoteproc ff9a0100.zynqmp_r5_rproc: RPU core_conf: split0
[   67.265301] zynqmp_r5_remoteproc ff9a0100.zynqmp_r5_rproc: IPI resource is not specified.
[   67.273659] remoteproc remoteproc0: ff9a0100.zynqmp_r5_rproc is available
# echo echo.elf  > /sys/class/remoteproc/remoteproc0/firmware 
# echo start > /sys/class/remoteproc/remoteproc0/state
[   93.960329] remoteproc remoteproc0: powering up ff9a0100.zynqmp_r5_rproc
[   94.003557] remoteproc remoteproc0: Booting fw image r5_openamp_echo.elf, size 707772
[   94.012802] zynqmp_r5_remoteproc ff9a0100.zynqmp_r5_rproc: RPU boot from TCM.
Starting application...
Initialize remoteproc successfully.
creating remoteproc virtio
initializing rpmsg shared buffer pool
initializing rpmsg vdev
initializing rpmsg vdev
Try to create rpmsg endpoint.
Successfully created rpmsg endpoint.
[   94.020700] virtio_rpmsg_bus virtio0: rpmsg host is online
[   94.047141] remoteproc remoteproc0: registered virtio0 (type 7)
[   94.053024] remoteproc remoteproc0: remote processor ff9a0100.zynqmp_r5_rproc is now up
## at this moment there should be a device ins /sys/bus/rpmsg/devices, or else the linux part returns this error: 

Echo test start 
Master>probe rpmsg_char
Open rpmsg dev virtio0.rpmsg-openamp-demo-channel.-1.0! 
Not able to access rpmsg device /sys/bus/rpmsg/devices/virtio0.rpmsg-openamp-demo-channel.-1.0, No such file or directory

I know I can pass another name of the device as arg, but there is no device.

 

Another thing:

I have set up my devicetree according to ug1186, but:

There are 3 nodes in dts in the manual: reserved-memory, zynqmp-rpu and zynqmp-ipi. zynqmp-rpu does not work that way, but I found another definition for remoteproc which works.
However, the zynqmp-ipi does  not seem to work, this is kernel output for zynqmp-ipi:

[    1.298822] zynqmp-ipi ff9905c0.mailbox: Probed ZynqMP IPI Mailbox driver.
[    1.298914] zynqmp-ipi amba:zynqmp_ipi: invalid resource
[    1.298919] zynqmp-ipi amba:zynqmp_ipi: Unable to map IPI buffer I/O memory
[    1.298929] zynqmp-ipi: probe of amba:zynqmp_ipi failed with error -22

 

What about other nodes that were used in dts in simpler (libmetal) demos? (shm_uio, vring_uio, ipi_uio) ? Do I need them?

 

1. I am looking for a solution for this, of course.

2. I would like to know which driver is supposed to create the specific device in /sys/bus/rpmsg

3. There is rpmsg_user_dev_driver mentioned in many resources, but as far as I know It's not up to date, and I don't even have this driver. Should I get It and use it? What resources should I use?

Thanks!

 

 

 

1 Solution

Accepted Solutions
Moderator
Moderator
744 Views
Registered: ‎05-10-2017

Re: rpmsg device is not created in /sys/bus/rpmsg/devices - ZynqMP

Jump to solution

To answer your questions

1. Solution - For 2019.1, Please use the device-tree (in the attachments).

2. The device that gets created is /sys/bus/rpmsg/devices/virtio0.rpmsg-openamp-demo-channel.-1.0/

The driver that is used is the rpmsg char driver

https://github.com/Xilinx/meta-openamp/blob/master/recipes-openamp/rpmsg-examples/rpmsg-echo-test/echo_test.c#L219

3. No. rpmsg_user_dev_driver was used in previous versions. This was changed to use rpmsg_char driver.

See the commit here for this change

https://github.com/Xilinx/meta-openamp/commit/742998900637d3dbf06ae7825c45c55cfe4d89cb#diff-a663fabf7dbdddc9bf7d9ab8eb585c75

Here is what your output should look like

root@xilinx-zcu102-2019_1:/lib/firmware# echo r50-echo-test.elf > /sys/class/remoteproc/remoteproc0/firmware
root@xilinx-zcu102-2019_1:/lib/firmware# echo start > /sys/class/remoteproc/remoteproc0/state
[ 52.368836] remoteproc remoteproc0: powering up r5@0
[ 52.374786] remoteproc remoteproc0: Booting fw image r50-echo-test.elf, size 814264
Starting application...
[ 52.394058] r5@0: RPU boot from TCM.
Initialize remoteproc successfully.
creating remoteproc virtio
[ 52.405291] remoteproc remoteproc0: registered virtio0 (type 7)
[ 52.422497] remoteproc remoteproc0: remote processor r5@0 is now upn
tializing rpmsg shared buffer pool
initializing rpmsg vdev
initializing rpmsg vdev
Try to create rpmsg endpoint.
Successfully created rpmsg endpoint.
[ 52.422879] virtio_rpmsg_bus virtio0: rpmsg host is online
[ 52.442264] virtio_rpmsg_bus virtio0: creating channel rpmsg-openamp-demo-channel addr 0x0
root@xilinx-zcu102-2019_1:/lib/firmware# echo_test

Echo test start

Master>probe rpmsg_char

Open rpmsg dev virtio0.rpmsg-openamp-demo-channel.-1.0!
Opening file rpmsg_ctrl0.
checking /sys/class/rpmsg/rpmsg_ctrl0/rpmsg0/name
svc_name: rpmsg-openamp-demo-channel
.

 

 

 

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------

View solution in original post

1 Reply
Moderator
Moderator
745 Views
Registered: ‎05-10-2017

Re: rpmsg device is not created in /sys/bus/rpmsg/devices - ZynqMP

Jump to solution

To answer your questions

1. Solution - For 2019.1, Please use the device-tree (in the attachments).

2. The device that gets created is /sys/bus/rpmsg/devices/virtio0.rpmsg-openamp-demo-channel.-1.0/

The driver that is used is the rpmsg char driver

https://github.com/Xilinx/meta-openamp/blob/master/recipes-openamp/rpmsg-examples/rpmsg-echo-test/echo_test.c#L219

3. No. rpmsg_user_dev_driver was used in previous versions. This was changed to use rpmsg_char driver.

See the commit here for this change

https://github.com/Xilinx/meta-openamp/commit/742998900637d3dbf06ae7825c45c55cfe4d89cb#diff-a663fabf7dbdddc9bf7d9ab8eb585c75

Here is what your output should look like

root@xilinx-zcu102-2019_1:/lib/firmware# echo r50-echo-test.elf > /sys/class/remoteproc/remoteproc0/firmware
root@xilinx-zcu102-2019_1:/lib/firmware# echo start > /sys/class/remoteproc/remoteproc0/state
[ 52.368836] remoteproc remoteproc0: powering up r5@0
[ 52.374786] remoteproc remoteproc0: Booting fw image r50-echo-test.elf, size 814264
Starting application...
[ 52.394058] r5@0: RPU boot from TCM.
Initialize remoteproc successfully.
creating remoteproc virtio
[ 52.405291] remoteproc remoteproc0: registered virtio0 (type 7)
[ 52.422497] remoteproc remoteproc0: remote processor r5@0 is now upn
tializing rpmsg shared buffer pool
initializing rpmsg vdev
initializing rpmsg vdev
Try to create rpmsg endpoint.
Successfully created rpmsg endpoint.
[ 52.422879] virtio_rpmsg_bus virtio0: rpmsg host is online
[ 52.442264] virtio_rpmsg_bus virtio0: creating channel rpmsg-openamp-demo-channel addr 0x0
root@xilinx-zcu102-2019_1:/lib/firmware# echo_test

Echo test start

Master>probe rpmsg_char

Open rpmsg dev virtio0.rpmsg-openamp-demo-channel.-1.0!
Opening file rpmsg_ctrl0.
checking /sys/class/rpmsg/rpmsg_ctrl0/rpmsg0/name
svc_name: rpmsg-openamp-demo-channel
.

 

 

 

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------

View solution in original post