cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
979 Views
Registered: ‎10-01-2019

bad phdr da 0x3e000000 mem 0x1af6c when loading remote app for zedboard

I have been trying to run the open amp echo example withe linux on cpu0 and baremetal on cpu1 and i keep getting following error

remoteproc remoteproc0: powering up remoteproc@0
remoteproc remoteproc0: Booting fw image image_echo_test, size 2704056
remoteproc remoteproc0: bad phdr da 0x3e000000 mem 0x1af6c
remoteproc remoteproc0: Failed to load program segments: -22
remoteproc remoteproc0: Boot failed: -22
-sh: echo: write error: Invalid argument

I have modified my linkerscript system_user.dtsi /platform.h and rsc_table.c (RING_TX ,RING_RX) to match zedboard.

 Appreciate any help . Thanks!

system-user.dtsi

/include/ "system-conf.dtsi"
/ {
};
/ {
reserved-memory {
#address-cells = <1>;
#size-cells = <1>;
ranges;
rproc_0_reserved: rproc@1e000000 {
no-map;
reg = <0x1e000000 0x400000>;
};

};

};
remoteproc0: remoteproc@0 {
compatible = "xlnx,zynq_remoteproc";
firmware = "firmware";
vring0 = <15>;
vring1 = <14>;

};
};

linker_script for cpu1

/* Define Memories in the system */

MEMORY
{
ps7_ddr_0_S_AXI_BASEADDR : ORIGIN = 0x1d000000, LENGTH = 0x00400000
ps7_ram_0_S_AXI_BASEADDR : ORIGIN = 0x00000000, LENGTH = 0x00030000
ps7_ram_1_S_AXI_BASEADDR : ORIGIN = 0xFFFF0000, LENGTH = 0x0000FE00
}

Platform_info.h

#ifndef PLATFORM_INFO_H_
#define PLATFORM_INFO_H_

#include <openamp/remoteproc.h>
#include <openamp/virtio.h>
#include <openamp/rpmsg.h>

#if defined __cplusplus
extern "C" {
#endif

/* SGIs */
#define SGI_TO_NOTIFY 15 /* SGI to notify the remote */
#define SGI_NOTIFICATION 14 /* SGI from the remote */

/* Memory attributes */
#define NORM_NONCACHE 0x11DE2 /* Normal Non-cacheable */
#define STRONG_ORDERED 0xC02 /* Strongly ordered */
#define DEVICE_MEMORY 0xC06 /* Device memory */
#define RESERVED 0x0 /* reserved memory */

/* Shared memory */
#define SHARED_MEM_PA 0x1e800000UL
#define SHARED_MEM_SIZE 0x80000UL
#define SHARED_BUF_OFFSET 0x80000UL

 

0 Kudos
17 Replies
Highlighted
Moderator
Moderator
867 Views
Registered: ‎05-10-2017

Re: bad phdr da 0x3e000000 mem 0x1af6c when loading remote app for zedboard

For 2019.2 version please use the device-tree as shown below

/ {
	reserved-memory {
		#address-cells = <1>;
		#size-cells = <1>;
		ranges;
		rproc_0_reserved: rproc@3e000000 {
			no-map;
			reg = <0x3e000000 0x400000>;
		};
		rproc_0_dma: rproc@3e800000 {
			no-map;
			compatible = "shared-dma-pool";
			reg = <0x3e800000 0x100000>;
		};
	};
		
	remoteproc0: remoteproc@0 {
		compatible = "xlnx,zynq_remoteproc";
		firmware = "firmware";
		vring0 = <15>;
		vring1 = <14>;
		memory-region = <&rproc_0_reserved>, <&rproc_0_dma>;
	};
	
	amba {
	/* Shared memory */
		shm0: shm@0 {
			compatible = "shm_uio";
			reg = <0x0 0x3ed80000 0x0 0x1000000>;
		};
	};
};
-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Highlighted
820 Views
Registered: ‎10-01-2019

Re: bad phdr da 0x3e000000 mem 0x1af6c when loading remote app for zedboard

The above dtsi file helps with loading the firmware but  it ends up in kernel panic . Below is my bootlog.

root@avnet-digilent-zedboard-2019_2:~# echo image_echo_test > /sys/class/re
regulator/ remoteproc/
root@avnet-digilent-zedboard-2019_2:~# echo image_echo_test > /sys/class/remoteproc/remoteproc0/firmware
root@avnet-digilent-zedboard-2019_2:~# echo start > /sys/class/remoteproc/remoteproc0/state
remoteproc remoteproc0: powering up remoteproc@0
remoteproc remoteproc0: Booting fw image image_echo_test, size 2704056
Unable to handle kernel paging request at virtual address e16ff03a
pgd = 9e2adeca
[e16ff03a] *pgd=00000000
Unable to handle kernel paging request at virtual address e16ff03a
Internal error: Oops - BUG: 5 [#1] PREEMPT SMP ARM
pgd = bb408558
Modules linked in:
[e16ff03a] *pgd=00000000
zynq_remoteproc
CPU: 1 PID: 1141 Comm: sh Not tainted 4.19.0-xilinx #1
Hardware name: Xilinx Zynq Platform
PC is at generic_handle_irq+0x10/0x28
LR is at __radix_tree_lookup+0x38/0xbc
pc : [<c005e768>] lr : [<c0590024>] psr: a00d0193
sp : de551d58 ip : c269eb78 fp : ddc75740
r10: ddef9000 r9 : de550000 r8 : de403600
r7 : 00000012 r6 : c269eb78 r5 : 00000000 r4 : 00000000
r3 : e16ff002 r2 : fcf0a300 r1 : 000000ff r0 : e16ff002
Flags: NzCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment none
Control: 18c5387d Table: 0200804a DAC: 00000051
Process sh (pid: 1141, stack limit = 0x61a84c40)
Stack: (0xde551d58 to 0xde552000)
1d40: 00000000 c005ed18
1d60: f8f00100 c26a3ff8 de551d90 c26b3c4c f8f01100 c022da08 c0587a2c 200d0013
1d80: ffffffff de551dc4 00000000 c0009a0c e13c1b20 e0c42b40 00042470 00000000
1da0: 00000000 00000000 00000000 00000000 00000000 ddef9020 ddef9000 ddc75740
1dc0: 00000000 de551de4 00000000 c0587a2c 200d0013 ffffffff 00000051 bf000000
1de0: ddc75740 00104010 00119ce0 e0a81000 00000002 e1300000 e0a81094 c0446d10
1e00: 00119ce0 00003000 c26a6e44 e1300000 c2109900 ddef9000 ddef9020 ddc75740
1e20: 00000001 ddef9020 c2109d00 c26a6e44 ddef91b8 c04449f4 ddef9000 ddef9020
1e40: ddef91c0 00000001 ddc75740 c2109d00 c26a6e44 c0445c8c 00000000 000081a4
1e60: ddef91c8 c26a3c48 00000002 00000040 ddc75740 fcf0a300 00000000 ddd73f00
1e80: ddef9020 ddef9000 00000006 c2109090 00000051 00000004 00000000 c044644c
1ea0: 00000006 c2109080 ddd73f00 de551f78 c2109090 c014998c 00000000 00000000
1ec0: 00000006 de6df300 c0149858 00000000 c26a3c48 00529d68 00000006 c00eab48
1ee0: 00000000 00000100 0000000a c01056b0 00000000 de4700c0 0000000a de4700c0
1f00: de4700c0 0000000a de4700c0 c26a3c48 00000002 00000001 de4700c0 c26a3c48
1f20: 0000000a c00f9e98 de653100 fcf0a300 00000006 de6df300 00000006 00000000
1f40: de551f78 00529d68 00000006 c00eade8 de6df300 00529d68 00000006 de6df300
1f60: 00529d68 c26a3c48 de6df300 00529d68 00000006 c00eaf94 00000000 00000000
1f80: 00000003 fcf0a300 00000000 0000006c 00529d68 b6ef2da0 00000004 c0009204
1fa0: de550000 c0009000 0000006c 00529d68 00000001 00529d68 00000006 00000000
1fc0: 0000006c 00529d68 b6ef2da0 00000004 00000006 b6ef0b14 00000000 00000000
1fe0: 00000004 bea41950 b6e8da6b b6e1a6c6 600d0030 00000001 00000000 00000000
[<c005e768>] (generic_handle_irq) from [<c005ed18>] (__handle_domain_irq+0xa0/0xb4)
[<c005ed18>] (__handle_domain_irq) from [<c022da08>] (gic_handle_irq+0x58/0x90)
[<c022da08>] (gic_handle_irq) from [<c0009a0c>] (__irq_svc+0x6c/0xa8)
Exception stack(0xde551d90 to 0xde551dd8)
1d80: e13c1b20 e0c42b40 00042470 00000000
1da0: 00000000 00000000 00000000 00000000 00000000 ddef9020 ddef9000 ddc75740
1dc0: 00000000 de551de4 00000000 c0587a2c 200d0013 ffffffff
[<c0009a0c>] (__irq_svc) from [<c0587a2c>] (memcpy+0x4c/0x330)
[<c0587a2c>] (memcpy) from [<c0446d10>] (rproc_elf_load_segments+0xe4/0x118)
[<c0446d10>] (rproc_elf_load_segments) from [<c04449f4>] (rproc_start+0x24/0x1e4)
[<c04449f4>] (rproc_start) from [<c0445c8c>] (rproc_boot+0x250/0x4a8)
[<c0445c8c>] (rproc_boot) from [<c044644c>] (state_store+0x40/0xb8)
[<c044644c>] (state_store) from [<c014998c>] (kernfs_fop_write+0x134/0x1a4)
[<c014998c>] (kernfs_fop_write) from [<c00eab48>] (__vfs_write+0x28/0x154)
[<c00eab48>] (__vfs_write) from [<c00eade8>] (vfs_write+0xb8/0x144)
[<c00eade8>] (vfs_write) from [<c00eaf94>] (ksys_write+0x4c/0x9c)
[<c00eaf94>] (ksys_write) from [<c0009000>] (ret_fast_syscall+0x0/0x54)
Exception stack(0xde551fa8 to 0xde551ff0)
1fa0: 0000006c 00529d68 00000001 00529d68 00000006 00000000 +-----------------------------+
1fc0: 0000006c 00529d68 b6ef2da0 00000004 00000006 b6ef0b14 00000000 00000000 | |
1fe0: 00000004 bea41950 b6e8da6b b6e1a6c6 | Cannot open /dev/ttyACM0! |
Code: e92d4010 ebfffff9 e2503000 0a000003 (e5933038) | |
Internal error: Oops - BUG: 5 [#2] PREEMPT SMP ARM +-----------------------------+
---[ end trace 6b4b65fe76cbb022 ]---
Kernel panic - not syncing: Fatal exception in interrupt
Modules linked in: zynq_remoteproc
CPU: 0 PID: 0 Comm: swapper/0 Tainted: G D 4.19.0-xilinx #1
Hardware name: Xilinx Zynq Platform
PC is at generic_handle_irq+0x10/0x28
LR is at __radix_tree_lookup+0x38/0xbc
pc : [<c005e768>] lr : [<c0590024>] psr: a00e0193
sp : c26a1eb8 ip : 0035f1a9 fp : 00000011
r10: 00000011 r9 : c26a0000 r8 : de403600
r7 : 00000012 r6 : c269eb78 r5 : 00000000 r4 : 00000000
r3 : e16ff002 r2 : fcf0a300 r1 : 000000ff r0 : e16ff002
Flags: NzCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment none
Control: 18c5387d Table: 0200404a DAC: 00000051
Process swapper/0 (pid: 0, stack limit = 0x0169d8c6)
Stack: (0xc26a1eb8 to 0xc26a2000)
1ea0: 00000000 c005ed18
1ec0: f8f00100 c26a3ff8 c26a1ef0 c26b3c4c f8f01100 c022da08 c04108b0 600e0013
1ee0: ffffffff c26a1f24 8848daee c0009a0c 00000000 00000011 1c530000 00000000
1f00: debce478 ffffe000 debce478 00000000 8848daee 88da762a 00000011 00000011
1f20: fffffff5 c26a1f40 c0410888 c04108b0 600e0013 ffffffff 00000051 00000000
1f40: 0091ec61 00000000 000000ff 00000000 debce6bc debce478 ffffe000 c26c9730
1f60: 00000001 c26a3c6c c26a3ca8 c269e470 00000000 c0047150 defffe00 c26a3c48
1f80: 006a1f94 fcf0a300 ffffe000 000000c5 c26d3440 ffffffff c26a3c48 c26a3c40
1fa0: defffe00 c0794a38 00000000 c004733c c26d3498 c0761c0c ffffffff ffffffff
1fc0: 00000000 c076158c 00000000 c0794a38 fcf4b000 00000000 c0761330 00000051
1fe0: 10c0387d 00000000 08008000 413fc090 18c5387d 00000000 00000000 00000000
[<c005e768>] (generic_handle_irq) from [<c005ed18>] (__handle_domain_irq+0xa0/0xb4)
[<c005ed18>] (__handle_domain_irq) from [<c022da08>] (gic_handle_irq+0x58/0x90)
[<c022da08>] (gic_handle_irq) from [<c0009a0c>] (__irq_svc+0x6c/0xa8)
Exception stack(0xc26a1ef0 to 0xc26a1f38)
1ee0: 00000000 00000011 1c530000 00000000
1f00: debce478 ffffe000 debce478 00000000 8848daee 88da762a 00000011 00000011
1f20: fffffff5 c26a1f40 c0410888 c04108b0 600e0013 ffffffff
[<c0009a0c>] (__irq_svc) from [<c04108b0>] (cpuidle_enter_state+0xf8/0x1d8)
[<c04108b0>] (cpuidle_enter_state) from [<c0047150>] (do_idle+0x1ac/0x23c)
[<c0047150>] (do_idle) from [<c004733c>] (cpu_startup_entry+0x18/0x1c)
[<c004733c>] (cpu_startup_entry) from [<c0761c0c>] (start_kernel+0x34c/0x3c4)
Code: e92d4010 ebfffff9 e2503000 0a000003 (e5933038)
---[ end trace 6b4b65fe76cbb023 ]---
SMP: failed to stop secondary CPUs
---[ end Kernel panic - not syncing: Fatal exception in interrupt ]---

0 Kudos
Highlighted
Moderator
Moderator
809 Views
Registered: ‎05-10-2017

Re: bad phdr da 0x3e000000 mem 0x1af6c when loading remote app for zedboard

Are you using the prebuilt echo-test application or have you built it using Vitis?

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Highlighted
772 Views
Registered: ‎10-01-2019

Re: bad phdr da 0x3e000000 mem 0x1af6c when loading remote app for zedboard

I have used prebuilt echo-test  for above error. Trying openamp-echo with vitis I get the same kernel panic message as prebuilt echo test

When i try to load the one built with Vitis  with rpc_demo i get

root@avnet-digilent-zedboard-2019_2:~# echo test.elf > /sys/class/remoteproc/remoteproc0/firmware
root@avnet-digilent-zedboard-2019_2:~# echo start > /sys/class/remoteproc/remoteproc0/state
remoteproc remoteproc0: powering up remoteproc@0
remoteproc remoteproc0: Booting fw image test.elf, size 2700912
remoteproc remoteproc0: Boot failed: -22
-sh: echo: write error: Invalid argument

I have tried going the yocto route adding meta-openamp layer . I get the this error

root@zedboard-zynq7:~# echo openamp.elf > /sys/class/remoteproc/remoteproc0/firmware
root@zedboard-zynq7:~# echo start > /sys/class/remoteproc/remoteproc0/state
remoteproc remoteproc0: powering up remoteproc@0
remoteproc remoteproc0: Booting fw image openamp.elf, size 2719840
zynq_remoteproc remoteproc@0: Bad carveout rsc configuration
remoteproc remoteproc0: Unable to allocate carveout vdev0vring0: -12
remoteproc remoteproc0: Failed to allocate associated carveouts: -12
remoteproc remoteproc0: Boot failed: -12
-sh: echo: write error: Cannot allocate memory

Tried to follow UG1186 page 44 instructions to assign RING_TX from FW_RSC_U32_ADDR_ANY to 0x3e800000 and RING_RX from FW_RSC_U32_ADDR_ANY to 0x3e840000

Thanks !

0 Kudos
Highlighted
Moderator
Moderator
728 Views
Registered: ‎05-10-2017

Re: bad phdr da 0x3e000000 mem 0x1af6c when loading remote app for zedboard

You don't need to do those changes in vitis. Those are for zynqmp platform and rpmsg in linux userspace.

For zynq7000, you will need to follow the section starting from page 30. The only change when you build the application in Vitis is -DUSE_AMP=1 flag that must be added.

Also you can enable the default images in petalinux by doing petalinux-config -c rootfs


Filesystem Packages --->
misc --->
openamp-fw-echo-testd --->
[*] openamp-fw-echo-testd
openamp-fw-mat-muld --->
[*] openamp-fw-mat-muld
openamp-fw-rpc-demo --->
[*] openamp-fw-rpc-demo

This will get included in /lib/firmware and then you can run image_echo_test

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Highlighted
705 Views
Registered: ‎10-01-2019

Re: bad phdr da 0x3e000000 mem 0x1af6c when loading remote app for zedboard

I have already enabled them in rootfs and i see them installed in lib/firmware as shown below

root@avnet-digilent-zedboard-2019_2:/lib/firmware# ls
image_echo_test image_matrix_multiply image_rpc_demo openamp.elf

As for vitis I have set the complier to use -DUSE_AMP=1

0 Kudos
Highlighted
696 Views
Registered: ‎10-01-2019

Re: bad phdr da 0x3e000000 mem 0x1af6c when loading remote app for zedboard

All the examples fail with same kernel panic

Unable to handle kernel paging request at virtual address 55b7ff5c

Unable to handle kernel paging request at virtual address 55b7ff5c

pgd = 27b6cb6a

pgd = 27b6cb6a

[55b7ff5c] *pgd=00000000

[55b7ff5c] *pgd=00000000

Internal error: Oops - BUG: 80000005 [#1] PREEMPT SMP ARM

0 Kudos
Highlighted
Visitor
Visitor
623 Views
Registered: ‎08-05-2018

Re: bad phdr da 0x3e000000 mem 0x1af6c when loading remote app for zedboard

Hello

 

I'm having exactly the same issue, using zynq zed 7000:

 

root@avnet-digilent-zedboard-2018_3:/lib/firmware# echo start > /sys/class/remoteproc/remoteproc0/state
remoteproc remoteproc0: powering up remoteproc@0
remoteproc remoteproc0: Booting fw image image_echo_test, size 2592148
Unable to handle kernel paging request at virtual address 0e497000
pgd = 87e8c000
[0e497000] *pgd=00000000
Internal error: Oops - BUG: 5 [#1] PREEMPT SMP ARM
Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = 80004000
[00000000] *pgd=00000000
Modules linked in: zynq_remoteproc uio_pdrv_genirq
CPU: 1 PID: 1209 Comm: sh Not tainted 4.14.0-xilinx-v2018.3 #1
Hardware name: Xilinx Zynq Platform
task: 8e8d0dc0 task.stack: 8e916000
PC is at kmem_cache_alloc+0x34/0xa0
LR is at radix_tree_node_alloc.constprop.7+0x94/0xd4
pc : [<801cc8f4>] lr : [<80638790>] psr: a00d0093
sp : 8e917d18 ip : 014000c0 fp : 00000000
r10: 014000c0 r9 : ffffffff r8 : 00000001
r7 : a00d0013 r6 : 014000c0 r5 : 8e800900 r4 : 8ebcd20c
r3 : 00000000 r2 : 8ebcd20c r1 : 0e497000 r0 : 8e800900
Flags: NzCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment none
Control: 18c5387d Table: 17e8c04a DAC: 00000051
Process sh (pid: 1209, stack limit = 0x8e916210)
Stack: (0x8e917d18 to 0x8e918000)
7d00: 8ebcd20c 00000000

 

Would you please tell me if were you able to fix this issue?

I'm using the same device tree suggested here, but it is not fixing my issue.

Thanks

 

0 Kudos
Highlighted
584 Views
Registered: ‎10-01-2019

Re: bad phdr da 0x3e000000 mem 0x1af6c when loading remote app for zedboard

I have not been able to fix this issue..waiting for response from Xilinx
0 Kudos
Highlighted
Moderator
Moderator
446 Views
Registered: ‎05-10-2017

Re: bad phdr da 0x3e000000 mem 0x1af6c when loading remote app for zedboard

Zedboard has 512MB of ddr. This is different from the zyn7000 examples in the userguide which have 1G of memory (on the zc702 and zc706 eval boards)

When you reserved memory in the device-tree, it should fall within your ddr region. For zedboard, you will need to carve out a different section of memory.

/ {
	reserved-memory {
		#address-cells = <1>;
		#size-cells = <1>;
		ranges;
		rproc_0_reserved: rproc@1e000000 {
			no-map;
			reg = <0x1e000000 0x400000>;
		};
		rproc_0_dma: rproc@1e800000 {
			no-map;
			compatible = "shared-dma-pool";
			reg = <0x1e800000 0x100000>;
		};
	};

	remoteproc0: remoteproc@0 {
		compatible = "xlnx,zynq_remoteproc";
		firmware = "firmware";
		vring0 = <15>;
		vring1 = <14>;
		memory-region = <&rproc_0_reserved>, <&rproc_0_dma>;
	};
};

Additionally for the echo_test application that you built in Vitis/SDK, you will need to change the

SHARED_MEM_PA in platform-info.h

#define SHARED_MEM_PA  0x1e800000U

 Extra compiler flag  -DUSE_AMP=1 must be added to bsp settings when building the application

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
Highlighted
Visitor
Visitor
425 Views
Registered: ‎08-05-2018

Re: bad phdr da 0x3e000000 mem 0x1af6c when loading remote app for zedboard

Hello

 

Thanks for your help. I already applied the changes you suggested, but now I'm having the following error:

remoteproc remoteproc0: powering up remoteproc@0
remoteproc remoteproc0: Booting fw image image_echo_test, size 2587708
remoteproc remoteproc0: bad phdr da 0x3e000000 mem 0x1e998
remoteproc remoteproc0: Failed to load program segments: -22
remoteproc remoteproc0: Boot failed: -22
-sh: echo: write error: Invalid argument

I'm changing the variable shared_mem_pa as follow:

SHARED_MEM_PA 0x1e800000UL

And also, I'm changing the lscrip.ld as follow:

ps7_ddr_0_S_AXI_BASEADDR 0x1e800000   0x00400000

Do you know what else do I need to change in order to have the firmware mapping the address 0x1e800000 instead the address 0x3e000000?

 

Thanks

Marco

 

0 Kudos
Highlighted
Moderator
Moderator
403 Views
Registered: ‎05-10-2017

Re: bad phdr da 0x3e000000 mem 0x1af6c when loading remote app for zedboard

Extra compiler flag  -DUSE_AMP=1 must be added to bsp settings when building the application.

After the application has been built in Vitis, follow steps in UG1186 to include the remote application in your Petalinux project.

Page 32, step 3 in the user guide shows how you can do this.

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Highlighted
Visitor
Visitor
387 Views
Registered: ‎08-05-2018

Re: bad phdr da 0x3e000000 mem 0x1af6c when loading remote app for zedboard

I'm already following all these steps, but I'm having the same error. 

Looks like the elf file is not updating the address, despite I'm changing the address in SDK.

I'm curious if in petalinux, I need to update in some config the address from 0x3e000000 to 0x1e800000 to notify the app the new address is not on 0x3e000000.

Would you please tell me if is there any other file or config I need to change?

Thanks

 

0 Kudos
Highlighted
Moderator
Moderator
382 Views
Registered: ‎05-10-2017

Re: bad phdr da 0x3e000000 mem 0x1af6c when loading remote app for zedboard

Looks like you are using 2018.3 version. Can you please use 2019.2 and try it out?

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Highlighted
Visitor
Visitor
288 Views
Registered: ‎08-05-2018

Re: bad phdr da 0x3e000000 mem 0x1af6c when loading remote app for zedboard

Thanks again for your support.

I download petalinux 2019.2 and Xilinx Vitis 2019.2

I did the same steps but using the 2019.2 version, and I got the same result:

remoteproc remoteproc0: powering up remoteproc@0
remoteproc remoteproc0: Booting fw image image_echo_test, size 2706000
remoteproc remoteproc0: bad phdr da 0x3e000000 mem 0x1afd4
remoteproc remoteproc0: Failed to load program segments: -22
remoteproc remoteproc0: Boot failed: -22
-sh: echo: write error: Invalid argument

Despite I'm modifying the app in Vitis with the address 0x1e800000 and fixing the device tree to have the change you provided me, petalinux continue looking the application in the address 0x3e000000 instead the provided it in the app and the device tree.

Do you have any other idea about why petalinux is not updating the address?

Thanks

0 Kudos
Highlighted
Moderator
Moderator
286 Views
Registered: ‎05-10-2017

Re: bad phdr da 0x3e000000 mem 0x1af6c when loading remote app for zedboard

You have to boot the image you built in Vitis. image_echo_test is the prebuilt application.

For example echo-a9-1.elf is the application I built in Vitis. In the user guide you will follow steps to include the remote application that you built in your petalinux project. This will be installed in /lib/firmware when you boot.

root@avnet-digilent-zedboard-2019_2:~# cd /lib/firmware/
root@avnet-digilent-zedboard-2019_2:/lib/firmware# ls
echo-test-a9-1.elf  image_echo_test
root@avnet-digilent-zedboard-2019_2:/lib/firmware# echo echo-test-a9-1.elf > /sys/class/remoteproc/remoteproc0/firmware
root@avnet-digilent-zedboard-2019_2:/lib/firmware# echo start > /sys/class/remoteproc/remoteproc0/state
remoteproc remoteproc0: powering up remoteproc@0
remoteproc remoteproc0: Booting fw image echo-test-a9-1.elf, size 2730644
Starting application...
                       Successfully initialize remoteproc.
Initialize remoteproc successfully.
creating remoteproc virtio

initializing rpmsg vdev
initializing rpmsg vdev
Try to crveaite rpmsg endpoint.
                               Successfully created rpmsg endpoint.
                                                                   virtio_rpmsg_bus virtio0: creating channel rpmsg-openamp-demo-channel addr 0x0
remoteproc remoteproc0: remote processor remoteproc@0 is now up
root@avnet-digilent-zedboard-2019_2:/lib/firmware# echo_test

 Echo test start
-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
Highlighted
Visitor
Visitor
256 Views
Registered: ‎08-05-2018

Re: bad phdr da 0x3e000000 mem 0x1af6c when loading remote app for zedboard

Really thanks!!!. Definitely it was my issue.

I was using the wrong app, because the xilinx guide does not explain this very well.

Using the elf file generated by me, I was able to have the app properly working:

remoteproc remoteproc0: powering up remoteproc@0
remoteproc remoteproc0: Booting fw image remoteproc2019.elf, size 2882184
Starting application...
Successfully initialize remoteproc.
Initialize remoteproc successfully.
creating remoteproc virtio
initializing rpmsg vdev
initializing rpmsg vdev
Try to create rpmsg endpoint.
Successfully created rpmsg endpoint.
virtio_rpmsg_bus virtio0: creating channel rpmsg-openamp-demo-cha0
remoteproc remoteproc0: registered virtio0 (type 7)
remoteproc remoteproc0: remote processor remoteproc@0 is now up

Then, executing the app, I got a succesfully result:

sending payload number 471 of size 480
echo test: sent : 480
received payload number 471 of size 480

**************************************

Echo Test Round 0 Test Results: Error count = 0

**************************************

I greatly appreciate your support on this issue.

 

0 Kudos