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: 
Visitor nerdomat
Visitor
10,366 Views
Registered: ‎08-13-2014

port microzed for openAMP

Jump to solution

I want to port the openAMP-sources on github for AVNets microzed-board. First thing I need is a suiteable system.dts file. In order to be able to create this system.dts file I want to create a hwd-file by vivado that fits the requirements of the openAMP-samples in github.

 

Now my question is: What would be the requirements for a suiteable hwd-file? Which IPs do I need (minimal requirements)? Can you help me with this issue? Or is there another way to create the system.dts file?

 

Kind regards
Andi

0 Kudos
1 Solution

Accepted Solutions
Visitor joshkern
Visitor
19,180 Views
Registered: ‎08-05-2015

Re: port microzed for openAMP

Jump to solution

Try the following in your DT:

 

ipino = <15>;
vring0 = <15>;
vring1 = <14>;

 

and let me know if that makes a difference.

9 Replies
Xilinx Employee
Xilinx Employee
10,327 Views
Registered: ‎09-10-2008

Re: port microzed for openAMP

Jump to solution
Hi Andi,

There should not be any porting to be done, it should work on the microzed board easily once you get a system built.

The systems running OpenAMP don't have any special h/w requirements so just get a basic system up and running on the microZed board. I'm assuming you know how to do this in Vivado or you can start with the Microzed board Petalinux BSP that is available for download from the zedboard.org.

Thanks
John
0 Kudos
Visitor nerdomat
Visitor
10,312 Views
Registered: ‎08-13-2014

Re: port microzed for openAMP

Jump to solution

I tested the samples on petalinux 2015.2. However nothing happens when I modprobe the zynq_remoteproc_driver firmware ="/lib/firmware/zc702evk/baremetal/matrix_multiply/firmware" (as mentioned in the getting started guide). When I type 

 

more /proc/cpuinfo

 

i get 

 

processor       : 0
model name      : ARMv7 Processor rev 0 (v7l)
BogoMIPS        : 1332.01
Features        : half thumb fastmult vfp edsp neon vfpv3 tls vfpd32 
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x3
CPU part        : 0xc09
CPU revision    : 0
 
processor       : 1
model name      : ARMv7 Processor rev 0 (v7l)
BogoMIPS        : 1332.01
Features        : half thumb fastmult vfp edsp neon vfpv3 tls vfpd32 
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x3
CPU part        : 0xc09
CPU revision    : 0
 
Hardware        : Xilinx Zynq Platform
Revision        : 0003
Serial          : 0000000000000000​
 
So linux still uses both cpus (cpu1, cpu2). Also the rpmsg driver seems not to work, since after testing the echo_test it says:
Failed to open rpmsg file /dev/rpmsg0: No such file or directory.

 

 

Can you give me a hint what I could test, to see whether everything compiled well? Can you give me some general hints?

0 Kudos
Xilinx Employee
Xilinx Employee
10,308 Views
Registered: ‎09-10-2008

Re: port microzed for openAMP

Jump to solution

Hi,

 

Xilinx is going to be releasing product that uses an implementation of OpenAMP but it's not released yet.  For now you should be reading all the docs in the OpenAMP repo on https://github.com/OpenAMP/open-amp/tree/master/docs.

 

Thanks

John

 

 

0 Kudos
Visitor nerdomat
Visitor
10,304 Views
Registered: ‎08-13-2014

Re: port microzed for openAMP

Jump to solution

Thank you John. Do you know when it will be released? Will freeRTOS also be supported?

0 Kudos
Xilinx Employee
Xilinx Employee
10,292 Views
Registered: ‎09-10-2008

Re: port microzed for openAMP

Jump to solution

They should both be supported in the 2015.4 release I'm told which will be before the end of the year.

 

Thanks

John

0 Kudos
Visitor joshkern
Visitor
10,277 Views
Registered: ‎08-05-2015

Re: port microzed for openAMP

Jump to solution

Try this:

 

modprobe zynq_remoteproc_driver firmware="/zc702evk/baremetal/matrix_multiply/firmware"

Visitor nerdomat
Visitor
10,198 Views
Registered: ‎08-13-2014

Re: port microzed for openAMP

Jump to solution

Thank joshkern, this helped a lot. I also followed the recommendations from issue #8 on openamp's github page:

https://github.com/OpenAMP/open-amp/issues/8

- I am using zynq_remoteproc (right out of petalinux) instead of zynq_remoteproc_driver from openamp's github sources

- I changed ipino <6> to ipino <8>

- perhaps it is useful to mention, that the device-tree seems to have changed slightly in petalinux 2015.2. There is no subsystems/linux/hw-description/system.dts, but subsystems/linux/configs/device-tree/system-top.dts. Further more the interrupts name probed in the device tree has changed from ps7_scugic_0 to intc. Consequently my system-top.dts looks like this:

 

/dts-v1/;
/include/ "system-conf.dtsi"
/ {

test: remoteproc-test@0 {
compatible = "xlnx,zynq_remoteproc";
reg = < 0x0 0x10000000 >;
interrupt-parent = <&intc>;
interrupts = < 0 37 4 0 38 4 >;
firmware = "firmware";
ipino = <8>;
vring0 = <2>;
vring1 = <3>;
} ;

};

 

By the way, I am still using petalinux 2015.2 (kernel 3.19).

With these changes, I am one step further, since at least I am able to modprobe zynq_remoteproc by following command:

 

modprobe zynq_remoteproc firmware="/zc702evk/baremetal/matrix_multiply/firmware"

 

According to its respond (and the output of more /proc/cpuinfo) it seems to shutdown cpu1 and load some applications to ram:

 

CPU1: shutdown
remoteproc0: 0.remoteproc-test is available
remoteproc0: Note: remoteproc is still under development and considered experimental.
remoteproc0: THE BINARY FORMAT IS NOT YET FINALIZED, and backward compatibility isn't yet guaranteed.
platform ci_hdrc.0: Driver ci_hdrc requests probe deferral
root@pl_2015_2:~# remoteproc0: registered virtio0 (type 7)
remoteproc0: powering up 0.remoteproc-test
remoteproc0: Booting fw image /zc702evk/baremetal/matrix_multiply/firmware, size 99188
remoteproc0: remote processor 0.remoteproc-test is now up
virtio_rpmsg_bus virtio0: rpmsg host is online
platform ci_hdrc.0: Driver ci_hdrc requests probe deferral

 

 

However rpmsg demos are still not working and I still have not device /dev/rpmsg0. Since having no response from rpmsg, I only can only presume, that cpu0 is working properly, but there still seems to be some issue about rpmsg.

Do you have any idea, what I could have missed?
And does anybody know why I have these strange messages about ci_hdrc probe deferral?

0 Kudos
Visitor joshkern
Visitor
19,181 Views
Registered: ‎08-05-2015

Re: port microzed for openAMP

Jump to solution

Try the following in your DT:

 

ipino = <15>;
vring0 = <15>;
vring1 = <14>;

 

and let me know if that makes a difference.

Visitor nerdomat
Visitor
10,133 Views
Registered: ‎08-13-2014

Re: port microzed for openAMP

Jump to solution

Thanks Josh. Getting a working openAMP troubles me for some time now. Your solution did the trick. I tested both, zynq_remoteproc.c of petalinux 2015.2 and 2014.4 (by just replacing the file in 2015.2 and recompile it). Both worked. Possibly it is useful to mention, that they seem to differ at some point between their kernels 3.17 and 3.19. Diff gives me:

53a54
> u32 ipino;
263,264c264
< /* Read vring0 ipi number */
< ret = of_property_read_u32(pdev->dev.of_node, "vring0", &local->vring0);
---
> ret = of_property_read_u32(pdev->dev.of_node, "ipino", &local->ipino);
267c267
< goto ipi_fault;
---
> goto irq_fault;
270c270
< ret = set_ipi_handler(local->vring0, ipi_kick, "Firmware kick");
---
> ret = set_ipi_handler(local->ipino, ipi_kick, "Firmware kick");
275a276,282
> /* Read vring0 ipi number */
> ret = of_property_read_u32(pdev->dev.of_node, "vring0", &local->vring0);
> if (ret < 0) {
> dev_err(&pdev->dev, "unable to read property");
> goto ipi_fault;
> }
>
311c318
< clear_ipi_handler(local->vring0);
---
> clear_ipi_handler(local->ipino);
337c344
< clear_ipi_handler(local->vring0);
---
> clear_ipi_handler(local->ipino);
362a370
> .owner = THIS_MODULE,

0 Kudos