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
1,401 Views
Registered: ‎08-02-2018

unable to boot r5 core while Building Linux Applications Using OpenAMP RPMsg in Linux Userspace

Hello,

I am trying to run echo_test between r5 and a53 cores. I am following Building Linux Applications Using OpenAMP RPMsg in Linux

Userspace (UG1186). I built the Linux a53 side image using yocto and did the changes in device tree as per mentioned in UG1186 (userspace part page no. 39).

Also, I updated the bootgen.bif file by adding the line :

[destination_cpu=r5-0] <path to RPU firmware>

I created the RPU firmware elf file using Xilinx SDK and it also contains the echo_test along with openamp and libmetal. I did not include this elf file in my yocto project. It is just mentioned in the.bif file with proper path.

While booting the machine I did not see any logs for r5 booting as mention in ZynqMP Linux Master running on APU with RPMsg in userspace and 2 RPU slaves  of the link as shown :

Starting application...
Try to init remoteproc resource
Init remoteproc resource succeeded
Waiting for events...

Also, while booting the a53 core and running echo_test-openamp, I get the following output :

metal: info:      metal_uio_dev_open: No IRQ for device 3ed40000.vring.
metal: info:      metal_uio_dev_open: No IRQ for device 3ed40000.vring.
metal: info:      metal_uio_dev_open: No IRQ for device 3ed80000.shm.
 1 - Send data to remote core, retrieve the echo and validate its integrity ..
Remote proc resource initialized.

and then nothing. I had to press Ctrl+C to abort.

Can somebody explain what am I missing and how can I boot r5 core? Do I need to follow the multiboot tutorial to boot a53 and r5?

For further info and logs please ask.

Thanks

Tags (2)
0 Kudos
9 Replies
Moderator
Moderator
1,367 Views
Registered: ‎05-10-2017

Re: unable to boot r5 core while Building Linux Applications Using OpenAMP RPMsg in Linux Userspace

Which version of the tools are you using? 

Please share your device-tree and bif.

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
1,353 Views
Registered: ‎08-02-2018

Re: unable to boot r5 core while Building Linux Applications Using OpenAMP RPMsg in Linux Userspace

Thanks for your reply,

I am using xilinx SDK 2018.1. Please take a note that I am using meta-openamp layer and successfully compiled echo_test-openamp.

the dts file I appended is in UG1186(userspace section). the r5_app.elf file path is provided in bif file. It is not packaged in my yocto image. according to the userspace implementation given in ug1186. while booting I should see the r5 code being executed. BUt it is mot running. Should I enable multiboot in  my fsbl code for a53(ie yocto part).

the bif file code is :

the_ROM_image:
{
	 [fsbl_config] a53_x64
	 [bootloader] fsbl-#{MACHINE}.elf
	 [destination_cpu=pmu] pmu-firmware-#{MACHINE}.elf
         [destination_cpu=r5-0] /home/iepl/workspace/r5_app/Debug/r5_app.elf
	 [destination_cpu=a53-0,  exception_level=el-3,  trustzone] arm-trusted-firmware.elf
	 [destination_cpu=a53-0,  exception_level=el-2] u-boot-#{MACHINE}.elf
}

Please provide me the steps to use meta-openamp layer in userspace.

Thanks   

0 Kudos
Moderator
Moderator
1,342 Views
Registered: ‎05-10-2017

Re: unable to boot r5 core while Building Linux Applications Using OpenAMP RPMsg in Linux Userspace

Did you use the 2018.1 tag when you built the image from the meta-openamp layer? 

Could you please attach your device-tree? Just want to double check if it looks okay.

Also for your R5 application, make sure you modify the rsc table 

	/* Virtio device entry */
	{
	 RSC_VDEV, VIRTIO_ID_RPMSG_, 0, RPMSG_IPU_C0_FEATURES, 0, 0, VIRTIO_CONFIG_STATUS_DRIVER_OK,
	 NUM_VRINGS, {0, 0},
	 },
-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
1,275 Views
Registered: ‎08-02-2018

Re: unable to boot r5 core while Building Linux Applications Using OpenAMP RPMsg in Linux Userspace

Hi,

I've already enabled

Virtio device entry
    {
     RSC_VDEV, VIRTIO_ID_RPMSG_, 0, RPMSG_IPU_C0_FEATURES, 0, 0, VIRTIO_CONFIG_STATUS_DRIVER_OK,
     NUM_VRINGS, {0, 0},
     },


I also wanted to know what do I need to use UART1 for my r5 application or UART0 and add

XFsbl_UpdateMultiBoot()


with the user required count. For example count as 2 as explained in this link.

The dts files are attached.

There is no tag in meta-openamp layer related to 2018.1. Although I have seected the branch  remotes/origin/rel-v2018.1.

git tag

 is not giving any output.

Thanks

0 Kudos
Moderator
Moderator
1,217 Views
Registered: ‎05-10-2017

Re: unable to boot r5 core while Building Linux Applications Using OpenAMP RPMsg in Linux Userspace

You don't need to use uart1. If you R5 elf is included in the bif, you should see logs for it. Check the beginning of the log after the fsbl banner is printed? Did you modify the application? This should work out of the box.

To build and compile the userspace application using Yocto

  • Add the meta-openamp layer to your layers in your yocto build project's bblayers.conf file.
  • Add libmetal and open-amp to your packages list. E.g. add libmetal and open-amp to the IMAGE_INSTALL_append in the local.conf file.
-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
1,123 Views
Registered: ‎08-02-2018

Re: unable to boot r5 core while Building Linux Applications Using OpenAMP RPMsg in Linux Userspace

I've already done the steps mentioned by you. Also, rpmsg in kernel space is running fine. Is there any way to debug where the error is introduced. Can it be debugged at Uboot console? If so please specify the commands which I should use. One point to notice is that I am using the Linux-yocto-4.14.79 kernel and applying Xilinx patches over it. Is there a possibility of any missing patch related to this activity.

Attached here is my lscript for r5-application.

Thanks

0 Kudos
1,110 Views
Registered: ‎08-02-2018

Re: unable to boot r5 core while Building Linux Applications Using OpenAMP RPMsg in Linux Userspace

noticed one thing in the device tree

vring: vring@0 {
compatible = "vring_uio";
reg = <0x0 0x3ed40000 0x0 0x40000>;
};
elf_ddr_1: ddr@3ed40000 {
compatible = "mmio-sram";
reg = <0 0x3ed40000 0x0 0x40000>;
};

both have same register addresses. Will this have an effect on the program?

also, the tcm addresses in device tree are as follows:

 

r5_0_tcm_a: tcm@ffe00000 {
	compatible = "mmio-sram";
	reg = <0 0xFFE00000 0x0 0x10000>;
	pd-handle = <&pd_tcm_0_a>;
};

r5_0_tcm_b: tcm@ffe20000 {
	compatible = "mmio-sram";
	reg = <0 0xFFE20000 0x0 0x10000>;
	pd-handle = <&pd_tcm_0_b>;
};

while the linker script for r5 has the following addresses for tcm:

 

 

psu_r5_tcm_ram_0_S_AXI_BASEADDR : ORIGIN = 0x00000000, LENGTH = 0x00010000
psu_r5_tcm_ram_1_S_AXI_BASEADDR : ORIGIN = 0x00020000, LENGTH = 0x00010000

Also for ddr, the script shows:

 psu_ddr_S_AXI_BASEADDR : ORIGIN = 0x3ED00000, LENGTH = 0x00020000

and the reserved memory in dts is as follows:

reserved-memory {
		#address-cells = <2>;
		#size-cells = <2>;
		ranges;

        rproc_0_reserved: rproc@3ed000000 {
			no-map;
			reg = <0x0 0x3ed00000 0x0 0x1000000>;
   		};
	};

while in the script the length is 0x00020000 but device tree has length 0x1000000. Does the reserved memory has any relation with r5 DDR memory.

any help will be appreciated.

Thanks

0 Kudos
Moderator
Moderator
1,097 Views
Registered: ‎05-10-2017

Re: unable to boot r5 core while Building Linux Applications Using OpenAMP RPMsg in Linux Userspace

Do you have this working with one of the R5's? Please try just this first following the instructions in the userguide. Have only one elf (for the R5-0) processor in your bif. Make sure that this works.

When you are working with both R5 cores, you will need 2 linux applications as well - one which talks to R5-0 and the other which talks to R5-1.

Follow this section ZynqMP Linux Master running on APU with RPMsg in userspace and 2 RPU slaves in the wiki to set up your device-tree.

https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18842144/OpenAMP+2018.1#OpenAMP2018.1-ZynqMPLinuxMasterrunningonAPUwithRPMsginuserspaceand2RPUslaves.

The section also describes the necessary changes needed for the Linux application talking to R5-1 as well the changes needed for R5-1 firmware.

Please try this out with one processor first and make sure you have that working

 

 

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
737 Views
Registered: ‎08-02-2018

Re: unable to boot r5 core while Building Linux Applications Using OpenAMP RPMsg in Linux Userspace

I am able to boot the r5 code using a bif file. previously I was using mkimage to create BOOT.bin but somehow it was creating a corrupt bin file. Now I used Xilinx's bootgen to generate BOOT.bin.

the logs after FSBL loads are as shown:

 

Starting application...
Try to init remoteproc resource
Init remoteproc resource succeeded
Waiting for events...

but when I run echo_test-openamp (provided by meta-openamp) I get the following output:

 

 

metal: info:      metal_uio_dev_open: No IRQ for device 3ed40000.vring.
metal: info:      metal_uio_dev_open: No IRQ for device 3ed40000.vring.
metal: info:      metal_uio_dev_open: No IRQ for device 3ed80000.shm.
 1 - Send data to remote core, retrieve the echo and validate its integrity ..
Remote proc resource initialized.

and it gets stuck. I've already implemented this in the r5 app:

 

 

/* Virtio device entry */
	{
	 RSC_VDEV, VIRTIO_ID_RPMSG_, 0, RPMSG_IPU_C0_FEATURES, 0, 0, VIRTIO_CONFIG_STATUS_DRIVER_OK,
	 NUM_VRINGS, {0, 0},
	 },

One thing to notice is that I am using the kernel Linux-yocto-4.14.79. I am not using Linux-xlnx. Could you please explain to me which device tree file should I follow 2018.1, 2018.2 or 2018.3. 

Thanks

 

0 Kudos