Hello,
some time ago I purchased a TE0820 (1 GB version) that has a Zync Ultrascale+ ZU3EG-1E on top. The Trenz reference design for PetaLinux 2019.2 (3eg_1e_1gb) allowed me to successfully generate a working embedded Linux image for the Cortex-A53. Now, I'd like to execute code on the Cortex-R5 by using the remoteproc environment.
For this purpose I copy-pasted the cortex-r5 configuration from another device tree into mine, but - to be honest - without actually understanding what I am doing. The full device tree is attached to this question. The interesting part is the following:
reserved-memory {
#address-cells = <2>;
#size-cells = <2>;
ranges;
rproc_0_dma: rproc@46d00000 {
no-map;
compatible = "shared-dma-pool";
reg = <0x0 0x46d00000 0x0 0x100000>;
};
rproc_0_reserved: rproc@3ed00000 {
no-map;
reg = <0x0 0x3ed00000 0x0 0x8000000>;
};
};
zynqmp-rpu {
compatible = "xlnx,zynqmp-r5-remoteproc-1.0";
#address-cells = <2>;
#size-cells = <2>;
ranges;
core_conf = "split";
r5_0: r5@0 {
#address-cells = <2>;
#size-cells = <2>;
ranges;
memory-region = <&rproc_0_reserved>, <&rproc_0_dma>;
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@ff90000 {
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>;
};
};
};
Once PetaLinux starts I get promising kernel output, stating that the R5 is available:
[ 4.614052] zynqmp_r5_remoteproc zynqmp-rpu: RPU core_conf: split
[ 4.620294] r5@0: DMA mask not set
[ 4.623799] r5@0: assigned reserved memory node rproc@46d00000
[ 4.629852] remoteproc remoteproc0: r5@0 is available
I created a FreeRTOS-based HelloWorld program with Vitis and tried to execute it. Unfortunately, it fails
[ 326.738741] remoteproc remoteproc0: powering up r5@0
[ 326.753832] remoteproc remoteproc0: Booting fw image helloworld, size 588476
[ 326.764073] remoteproc remoteproc0: bad phdr da 0x100000 mem 0x24a70
[ 326.770422] remoteproc remoteproc0: Failed to load program segments: -22
[ 326.777206] remoteproc remoteproc0: Boot failed: -22
-sh: echo: write error: Invalid argument
I have the impression that the device tree is wrongly configured. Could you please explain me how to properly configure the cortex-r5 for 3eg_1e_1gb?
Thank you very much.