Jump to content
  • 0

RPU Hello World Application fails on ZU3EG r5_0


Manoj Dahal

Question

Hi,

I used the platform file sw/3eg_hw_pf/hw/system_wrapper.xsa from https://digilent.com/reference/lib/exe/fetch.php?tok=3832a5&media=https%3A%2F%2Fgithub.com%2FDigilent%2FGenesys-ZU%2Freleases%2Fdownload%2F3EG%2FHELLO-WORLD%2F2020.1-2%2FGenesys-ZU-3EG-HELLO-WORLD-sw.ide.zip

to build the Hello World Application rpu_app_r5_0 on R5_0 using Vitis 2020.1. Then copied the rpu_app_r5_0.elf file to /lib/firmware/ on the device. And ran it as following:

echo rpu_app_r5_0 > /sys/class/remoteproc/remoteproc0/firmware
echo start /sys/class/remoteproc/remoteproc0/state



It does not display anything. Looking into /var/log/messages, I can see the following error:

Mar 18 18:49:06 GenesysZU user.info kernel: [ 1145.985079] remoteproc remoteproc0: powering up r5@0
Mar 18 18:49:06 GenesysZU user.warn kernel: [ 1145.990094] remoteproc remoteproc0: Direct firmware load for rpu_app_r5_0 failed with error -2
Mar 18 18:49:06 GenesysZU user.err kernel: [ 1145.998712] remoteproc remoteproc0: request_firmware failed: -2
Mar 18 18:49:06 GenesysZU user.err kernel: [ 1146.004631] remoteproc remoteproc0: Boot failed: -2


I added following dtsi details to system-user.dtsi for building the linux image with PetaLinix v2020.1:
 

/ {
        reserved-memory {
                #address-cells = <2>;
                #size-cells = <2>;
                ranges;
                rpu0vdev0vring0: rpu0vdev0vring0@3ed40000 {
                        no-map;
                        reg = <0x0 0x3ed40000 0x0 0x4000>;
                };
                rpu0vdev0vring1: rpu0vdev0vring1@3ed44000 {
                        no-map;
                        reg = <0x0 0x3ed44000 0x0 0x4000>;
                };
                rpu0vdev0buffer: rpu0vdev0buffer@3ed48000 {
                        no-map;
                        reg = <0x0 0x3ed48000 0x0 0x100000>;
                };
                rproc_0_reserved: rproc@3ed00000 {
                        no-map;
                        reg = <0x0 0x3ed00000 0x0 0x40000>;
                };
        };

        zynqmp-rpu {
                compatible = "xlnx,zynqmp-r5-remoteproc-1.0";
                #address-cells = <2>;
                #size-cells = <2>;
                ranges;
                core_conf = "split";
                reg = <0x0 0xFF9A0000 0x0 0x10000>;
                r5_0: r5@0 {
                        #address-cells = <2>;
                        #size-cells = <2>;
                        ranges;
                        memory-region = <&rproc_0_reserved>, <&rpu0vdev0buffer>, <&rpu0vdev0vring0>, <&rpu0vdev0vring1>;
                        pnode-id = <0x7>;
                        mboxes = <&ipi_mailbox_rpu0 0>, <&ipi_mailbox_rpu0 1>;
                        mbox-names = "tx", "rx";
                        tcm_0_a: tcm_0@0 {
                                reg = <0x0 0xFFE00000 0x0 0x10000>;
                                pnode-id = <0xf>;
                        };
                        tcm_0_b: tcm_0@1 {
                                reg = <0x0 0xFFE20000 0x0 0x10000>;
                                pnode-id = <0x10>;
                        };
                };
        };

        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@ff990600 {
                        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>;
                        };
                };
};

Anything wrong?
I will be grateful for any help to resolve the issue.

~Manoj

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0
On 3/18/2024 at 10:29 PM, Manoj Dahal said:
Mar 18 18:49:06 GenesysZU user.warn kernel: [ 1145.990094] remoteproc remoteproc0: Direct firmware load for rpu_app_r5_0 failed with error -2

This line most likely means that file rpu_app_r5_0 was not find  in /lib/firmware/ are you sure the file to be place there is an .elf and not a plain binary file?
Note: the remoteproc0 is looking for rpu_app_5_0 not searching for file rpu_app_r5_0.elf

Link to comment
Share on other sites

  • 0

Yes it's elf file only.
 

root@GenesysZU:/lib/firmware# ls -lt
total 300
-rwxr-xr-x 1 root root 303428 Mar 20 01:10 rpu_app_r5_0.elf
drwxr-xr-x 2 root root      0 Mar 18 18:30 mchp
root@GenesysZU:/lib/firmware# mv rpu_app_r5_0.elf rpu_app_r5_0
root@GenesysZU:/lib/firmware# echo rpu_app_r5_0 > /sys/class/remoteproc/remoteproc0/firmware; echo start /sys/class/remoteproc/remoteproc0/state

 

Link to comment
Share on other sites

  • 0

I rebooted the device and tried again.
This time I see different error:
 

Mar 25 04:55:07 GenesysZU user.info kernel: [  931.996881] remoteproc remoteproc0: powering up r5@0
Mar 25 04:55:07 GenesysZU user.info kernel: [  932.002254] remoteproc remoteproc0: Booting fw image rpu_app_r5_0.elf, size 379744
Mar 25 04:55:07 GenesysZU user.err kernel: [  932.016237] remoteproc remoteproc0: bad phdr da 0x100000 mem 0xd740
Mar 25 04:55:07 GenesysZU user.err kernel: [  932.022503] remoteproc remoteproc0: Failed to load program segments: -22
Mar 25 04:55:07 GenesysZU user.err kernel: [  932.029248] remoteproc remoteproc0: Boot failed: -22

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...