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: 
Adventurer
Adventurer
881 Views
Registered: ‎10-14-2015

AMP - Direct firmware load issue

Hello,

 

I'm trying to start a firmware on CPU1 at boot of Petalinux 2017.2.

 

I successfully copied the firmware in /lib/firmware. I can execute it by those commands below :

    echo cpu1.elf > /sys/class/remoteproc/remoteproc0/firmware
    echo start > /sys/class/remoteproc/remoteproc0/state
    modprobe rpmsg_user_dev_driver

Here is my device tree:

/ {
	amba {
                elf_ddr_0: ddr@0 {
                        compatible = "mmio-sram";
                        reg = <0x100000 0x100000>; // memory range and size used by the firmware
                };

	};
	remoteproc0: remoteproc@0 {
		compatible = "xlnx,zynq_remoteproc";
		firmware = "cpu1.elf";
		// two separate interrupts used for signaling between the CPU cores.
		vring0 = <15>;
		vring1 = <14>;
		sram_0 = <&elf_ddr_0>;
	};
};

The problem is when linux boot up, I get these error messages:

remoteproc remoteproc0: remoteproc@0 is available
remoteproc remoteproc0: Note: remoteproc is still under development and considered experimental.
remoteproc remoteproc0: THE BINARY FORMAT IS NOT YET FINALIZED, and backward compatibility isn't yet guaranteed.
remoteproc remoteproc0: Direct firmware load for firmware failed with error -2
remoteproc remoteproc0: powering up remoteproc@0
NET: Registered protocol family 10
remoteproc remoteproc0: Direct firmware load for firmware failed with error -2
remoteproc remoteproc0: request_firmware failed: -2

I'm a bit confuse because the message still indicate the default firmware name "firmware" instead of "cpu1.elf". When I take a look at /sys/firmware/devicetree/base/remoteproc@0/firmware, I get "cup1.elf". When I do the same thing for /sys/class/remoteproc/remoteproc0/firmware, I get "firmware". So I guess the driver goes into the last path to get the firmware name, but I don't understand why the name is not updated as indicate in the device tree.

 

Right now, to make the linux and CPU1 boot, I change cup1.elf to firmware. I can now see

remoteproc remoteproc0: remoteproc@0 is available
remoteproc remoteproc0: Note: remoteproc is still under development and considered experimental.
remoteproc remoteproc0: THE BINARY FORMAT IS NOT YET FINALIZED, and backward compatibility isn't yet guaranteed.
remoteproc remoteproc0: powering up remoteproc@0
remoteproc remoteproc0: Booting fw image firmware, size 574812
virtio_rpmsg_bus virtio0: rpmsg host is online
NET: Registered protocol family 10
remoteproc remoteproc0: registered virtio0 (type 7)

Honestly, I would prefer find the right way to execute my firmware with the name cpu1.elf as "firmware" does not tell a lot to someone else tries to debug the linux...

 

If someone has a solution, I could be very appreciated.

 

 

 

 

0 Kudos
1 Reply
Adventurer
Adventurer
840 Views
Registered: ‎10-14-2015

Re: AMP - Direct firmware load issue

Nobody use direct firmware loading ?

0 Kudos