cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
hawkroot
Visitor
Visitor
4,689 Views
Registered: ‎03-14-2016

ZYNQ-7010 OpenAMP Linux Ubuntu + Bare-Metal (Echo-test example)

Hello,

 

I'm try to install meta-openamp driver from https://github.com/OpenAMP/meta-openamp.git but I get error:

insmod: ERROR: could not insert module rpmsg_user_dev_driver.ko: Unknown symbol in module

the same for rpmsg_proxy_dev_driver.ko

What I doing wrong?

For driver compilation I use arm-linux-gnueabi- compiler

The kernel version is 4.9.0-xilinx-v2017.4.

rootfs - https://rcn-ee.com/rootfs/eewiki/minfs/ubuntu-16.04.3-minimal-armhf-2017-10-07.tar.xz

u-boot - https://github.com/Xilinx/u-boot-xlnx.git

kernel - https://github.com/Xilinx/linux-xlnx.git

for building images use petalinux-v2017.4-final-installer

 

Thank you!

 

0 Kudos
10 Replies
jovitac
Moderator
Moderator
4,648 Views
Registered: ‎05-10-2017

How are you trying to install this?

 

If you have a petalinux project, the kernel modules can be installed by using petalinux-config -c kernel

This is described in Ug1186, page 32.

https://www.xilinx.com/support/documentation/sw_manuals/xilinx2017_4/ug1186-zynq-openamp-gsg.pdf

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
hawkroot
Visitor
Visitor
4,638 Views
Registered: ‎03-14-2016

Hi!

 

I try to use default rootfs and now I see modules, but after loading echo-test example I get another errors:

(PetaLinux 2017.4)

Log file and device tree in the attachment

 

Linux boot log

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 rproc-remoteproc@0-fw failed with error -2
remoteproc remoteproc0: powering up remoteproc@0
remoteproc remoteproc0: Direct firmware load for rproc-remoteproc@0-fw failed with error -2
remoteproc remoteproc0: request_firmware failed: -2

 

and when I try to load amp_project.elf

/lib/firmware# echo amp_project.elf > /sys/class/remoteproc/remoteproc0/firmware

/lib/firmware# echo start > /sys/class/remoteproc/remoteproc0/state
remoteproc remoteproc0: powering up remoteproc@0
remoteproc remoteproc0: Booting fw image amp_project.elf, size 2556564
remoteproc remoteproc0: failed to declare rproc mem as DMA mem.
remoteproc remoteproc0: Failed to declare rproc memory resource: -12
remoteproc remoteproc0: Boot failed: -12
-sh: echo: write error: Cannot allocate memory

 

And one question

1. How I can move modules to another rootfs? Can I copy these modules to another rootfs from default?

 

Thanks!

0 Kudos
jovitac
Moderator
Moderator
4,605 Views
Registered: ‎05-10-2017

One thing I noticed in your device-tree was srams attribute in the remoteproc0 node

This should be (also in page 35 in the user-guide)

remoteproc0: remoteproc@0 {

  compatible = "xlnx,zynq_remoteproc";

  firmware = "firmware"; vring0 = ; vring1 = ;

  srams = <&elf_ddr_0>;

};

 

Additionally when you are building the SDK application make sure you have -DUSE_AMP=1 to disable initialization of shared resources.

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
hawkroot
Visitor
Visitor
4,593 Views
Registered: ‎03-14-2016

 

I have added to device tree

/ {
	reserved-memory {
		#address-cells = <1>;
		#size-cells = <1>;
		ranges;
		rproc_0_reserved: rproc@3e000000 {
			no-map;
			reg =  <0x3e000000 0x01000000>;
		};
	};

	amba {
		elf_ddr_0: ddr@0 {
			compatible = "mmio-sram";
			reg = <0x3e000000 0x400000>;
		};
	};
	remoteproc0: remoteproc@0 {
		compatible = "xlnx,zynq_remoteproc";
		firmware = "firmware";
		vring0 = <15>;
		vring1 = <14>;
		srams = <&elf_ddr_0>;

	};
};

and install driver

rpmsg_user_dev_driver

and now it works!

Thanks!

 

0 Kudos
hawkroot
Visitor
Visitor
4,542 Views
Registered: ‎03-14-2016

Hello,

 

I try to change Vivado (WINDOWS) design and add AXI GPIO block for LEDs. Test block by LED blinking with use hello world example and all is works correctly. After this, I added LED ON code to echo-test OpenAMP compile project, change device tree and try to load project by remoteproc. The result what I get:

 

~# echo start > /sys/class/remoteproc/remoteproc0/state
Unable to handle kernel paging request at virtual address f2e6d004
** 37 printk messages dropped ** pgd = (null)
Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = (null)
Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = (null)
Unable to handle kernel NULL pointer dereference at virtual address 000003e4
pgd = 80004000
[000003e4] *pgd=00000000
Internal error: Oops - BUG: 17 [#1] PREEMPT SMP ARM
Modules linked in: zynq_remoteproc remoteproc virtio virtio_ring uio_pdrv_genirq
CPU: 0 PID: 676 Comm: ipv6_addrconf Not tainted 4.9.0-xilinx-v2017.4 #1
Hardware name: Xilinx Zynq Platform
task: 8e9ca000 task.stack: 8e0a0000
PC is at do_page_fault+0x2c/0x318
LR is at do_DataAbort+0x38/0xb8
pc : [<80112d04>] lr : [<8010128c>] psr: 20050193
sp : 8ea8c0c0 ip : 00000007 fp : 8e1718c0
r10: 00000000 r9 : 00000017 r8 : 000001a4
r7 : 8ea8c1a8 r6 : 80a08734 r5 : 000003e4 r4 : 8ea8c1a8
r3 : ffffe000 r2 : 20050193 r1 : 00000017 r0 : 000003e4
Flags: nzCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment none
Control: 18c5387d Table: 1d5b804a DAC: 00000051
Process ipv6_addrconf (pid: 676, stack limit = 0x8e0a0210)
Stack: (0x8ea8c0c0 to 0x8e0a2000)
[<80112d04>] (do_page_fault) from [<8010128c>] (do_DataAbort+0x38/0xb8)
[<8010128c>] (do_DataAbort) from [<8010adf8>] (__dabt_svc+0x58/0x80)
Exception stack(0x8ea8c1a8 to 0x8ea8c1f0)
c1a0: 000003e4 00000017 20050193 ffffe000 8ea8c2e0 000003e4
c1c0: 80a08734 8ea8c2e0 000001a4 00000017 00000000 8e1718c0 00000007 8ea8c1f8
c1e0: 8010128c 80112d04 20050193 ffffffff
[<8010adf8>] (__dabt_svc) from [<80112d04>] (do_page_fault+0x2c/0x318)
[<80112d04>] (do_page_fault) from [<8010128c>] (do_DataAbort+0x38/0xb8)
[<8010128c>] (do_DataAbort) from [<8010adf8>] (__dabt_svc+0x58/0x80)
Exception stack(0x8ea8c2e0 to 0x8ea8c328)
c2e0: 000003e4 00000017 20050193 ffffe000 8ea8c418 000003e4 80a08734 8ea8c418
c300: 000001a4 00000017 00000000 8e1718c0 00000007 8ea8c330 8010128c 80112d04
c320: 20050193 ffffffff
[<8010adf8>] (__dabt_svc) from [<80112d04>] (do_page_fault+0x2c/0x318)
[<80112d04>] (do_page_fault) from [<8010128c>] (do_DataAbort+0x38/0xb8)
[<8010128c>] (do_DataAbort) from [<8010adf8>] (__dabt_svc+0x58/0x80)
Exception stack(0x8ea8c418 to 0x8ea8c460)
c400: 000003e4 00000017
c420: 20050193 ffffe000 8ea8c550 000003e4 80a08734 8ea8c550 000001a4 00000017
c440: 00000000 8e1718c0 00000007 8ea8c468 8010128c 80112d04 20050193 ffffffff
[<8010adf8>] (__dabt_svc) from [<80112d04>] (do_page_fault+0x2c/0x318)
[<80112d04>] (do_page_fault) from [<8010128c>] (do_DataAbort+0x38/0xb8)
[<8010128c>] (do_DataAbort) from [<8010adf8>] (__dabt_svc+0x58/0x80)
Exception stack(0x8ea8c550 to 0x8ea8c598)
c540: 000003e4 00000017 20050193 ffffe000
c560: 8ea8c688 000003e4 80a08734 8ea8c688 000001a4 00000017 00000000 8e1718c0
c580: 00000007 8ea8c5a0 8010128c 80112d04 20050193 ffffffff
[<8010adf8>] (__dabt_svc) from [<80112d04>] (do_page_fault+0x2c/0x318)
[<80112d04>] (do_page_fault) from [<8010128c>] (do_DataAbort+0x38/0xb8)
[<8010128c>] (do_DataAbort) from [<8010adf8>] (__dabt_svc+0x58/0x80)
Exception stack(0x8ea8c688 to 0x8ea8c6d0)
c680: 000003e4 00000017 20050193 ffffe000 8ea8c7c0 000003e4
c6a0: 80a08734 8ea8c7c0 000001a4 00000017 00000000 8e1718c0 00000007 8ea8c6d8
c6c0: 8010128c 80112d04 20050193 ffffffff
[<8010adf8>] (__dabt_svc) from [<80112d04>] (do_page_fault+0x2c/0x318)
[<80112d04>] (do_page_fault) from [<8010128c>] (do_DataAbort+0x38/0xb8)
[<8010128c>] (do_DataAbort) from [<8010adf8>] (__dabt_svc+0x58/0x80)
Exception stack(0x8ea8c7c0 to 0x8ea8c808)
c7c0: 000003e4 00000017 20050193 ffffe000 8ea8c8f8 000003e4 80a08734 8ea8c8f8
c7e0: 000001a4 00000017 00000000 8e1718c0 00000007 8ea8c810 8010128c 80112d04
c800: 20050193 ffffffff
[<8010adf8>] (__dabt_svc) from [<80112d04>] (do_page_fault+0x2c/0x318)
[<80112d04>] (do_page_fault) from [<8010128c>] (do_DataAbort+0x38/0xb8)
[<8010128c>] (do_DataAbort) from [<8010adf8>] (__dabt_svc+0x58/0x80)
Exception stack(0x8ea8c8f8 to 0x8ea8c940)
c8e0: 000003e4 00000017
c900: 20050193 ffffe000 8ea8ca30 000003e4 80a08734 8ea8ca30 000001a4 00000017
c920: 00000000 8e1718c0 00000007 8ea8c948 8010128c 80112d04 20050193 ffffffff
[<8010adf8>] (__dabt_svc) from [<80112d04>] (do_page_fault+0x2c/0x318)
[<80112d04>] (do_page_fault) from [<8010128c>] (do_DataAbort+0x38/0xb8)
[<8010128c>] (do_DataAbort) from [<8010adf8>] (__dabt_svc+0x58/0x80)
Exception stack(0x8ea8ca30 to 0x8ea8ca78)
ca20: 000003e4 00000017 20050193 ffffe000
ca40: 8ea8cb68 000003e4 80a08734 8ea8cb68 000001a4 00000017 00000000 8e1718c0
ca60: 00000007 8ea8ca80 8010128c 80112d04 20050193 ffffffff
[<8010adf8>] (__dabt_svc) from [<80112d04>] (do_page_fault+0x2c/0x318)
[<80112d04>] (do_page_fault) from [<8010128c>] (do_DataAbort+0x38/0xb8)
[<8010128c>] (do_DataAbort) from [<8010adf8>] (__dabt_svc+0x58/0x80)
Exception stack(0x8ea8cb68 to 0x8ea8cbb0)
cb60: 000003e4 00000017 20050193 ffffe000 8ea8cca0 000003e4
cb80: 80a08734 8ea8cca0 000001a4 00000017 00000000 8e1718c0 00000007 8ea8cbb8
cba0: 8010128c 80112d04 20050193 ffffffff
[<8010adf8>] (__dabt_svc) from [<80112d04>] (do_page_fault+0x2c/0x318)
[<80112d04>] (do_page_fault) from [<8010128c>] (do_DataAbort+0x38/0xb8)
[<8010128c>] (do_DataAbort) from [<8010adf8>] (__dabt_svc+0x58/0x80)
Exception stack(0x8ea8cca0 to 0x8ea8cce8)
cca0: 000003e4 00000017 20050193 ffffe000 8ea8cdd8 000003e4 80a08734 8ea8cdd8
ccc0: 000001a4 00000017 00000000 8e1718c0 00000007 8ea8ccf0 8010128c 80112d04
cce0: 20050193 ffffffff
[<8010adf8>] (__dabt_svc) from [<80112d04>] (do_page_fault+0x2c/0x318)
[<80112d04>] (do_page_fault) from [<8010128c>] (do_DataAbort+0x38/0xb8)
[<8010128c>] (do_DataAbort) from [<8010adf8>] (__dabt_svc+0x58/0x80)
Exception stack(0x8ea8cdd8 to 0x8ea8ce20)
cdc0: 000003e4 00000017
cde0: 20050193 ffffe000 8ea8cf10 000003e4 80a08734 8ea8cf10 000001a4 00000017
ce00: 00000000 8e1718c0 00000007 8ea8ce28 8010128c 80112d04 20050193 ffffffff
[<8010adf8>] (__dabt_svc) from [<80112d04>] (do_page_fault+0x2c/0x318)
[<80112d04>] (do_page_fault) from [<8010128c>] (do_DataAbort+0x38/0xb8)
[<8010128c>] (do_DataAbort) from [<8010adf8>] (__dabt_svc+0x58/0x80)
Exception stack(0x8ea8cf10 to 0x8ea8cf58)
cf00: 000003e4 00000017 20050193 ffffe000
cf20: 8ea8d048 000003e4 80a08734 8ea8d048 000001a4 00000017 00000000 8e1718c0
cf40: 00000007 8ea8cf60 8010128c 80112d04 20050193 ffffffff
[<8010adf8>] (__dabt_svc) from [<80112d04>] (do_page_fault+0x2c/0x318)
[<80112d04>] (do_page_fault) from [<8010128c>] (do_DataAbort+0x38/0xb8)
[<8010128c>] (do_DataAbort) from [<8010adf8>] (__dabt_svc+0x58/0x80)
Exception stack(0x8ea8d048 to 0x8ea8d090)
d040: 000003e4 00000017 20050193 ffffe000 8ea8d180 000003e4
d060: 80a08734 8ea8d180 000001a4 00000017 00000000 8e1718c0 00000007 8ea8d098
d080: 8010128c 80112d04 20050193 ffffffff
[<8010adf8>] (__dabt_svc) from [<80112d04>] (do_page_fault+0x2c/0x318)
[<80112d04>] (do_page_fault) from [<8010128c>] (do_DataAbort+0x38/0xb8)
[<8010128c>] (do_DataAbort) from [<8010adf8>] (__dabt_svc+0x58/0x80)
Exception stack(0x8ea8d180 to 0x8ea8d1c8)
d180: 000003e4 00000017 20050193 ffffe000 8ea8d2b8 000003e4 80a08734 8ea8d2b8
d1a0: 000001a4 00000017 00000000 8e1718c0 00000007 8ea8d1d0 8010128c 80112d04
d1c0: 20050193 ffffffff
[<8010adf8>] (__dabt_svc) from [<80112d04>] (do_page_fault+0x2c/0x318)
[<80112d04>] (do_page_fault) from [<8010128c>] (do_DataAbort+0x38/0xb8)
[<8010128c>] (do_DataAbort) from [<8010adf8>] (__dabt_svc+0x58/0x80)
Exception stack(0x8ea8d2b8 to 0x8ea8d300)
d2a0: 000003e4 00000017
d2c0: 20050193 ffffe000 8ea8d3f0 000003e4 80a08734 8ea8d3f0 000001a4 00000017
d2e0: 00000000 8e1718c0 00000007 8ea8d308 8010128c 80112d04 20050193 ffffffff
[<8010adf8>] (__dabt_svc) from [<80112d04>] (do_page_fault+0x2c/0x318)
[<80112d04>] (do_page_fault) from [<8010128c>] (do_DataAbort+0x38/0xb8)
[<8010128c>] (do_DataAbort) from [<8010adf8>] (__dabt_svc+0x58/0x80)
Exception stack(0x8ea8d3f0 to 0x8ea8d438)
d3e0: 000003e4 00000017 20050193 ffffe000
d400: 8ea8d528 000003e4 80a08734 8ea8d528 000001a4 00000017 00000000 8e1718c0
d420: 00000007 8ea8d440 8010128c 80112d04 20050193 ffffffff
[<8010adf8>] (__dabt_svc) from [<80112d04>] (do_page_fault+0x2c/0x318)
[<80112d04>] (do_page_fault) from [<8010128c>] (do_DataAbort+0x38/0xb8)
[<8010128c>] (do_DataAbort) from [<8010adf8>] (__dabt_svc+0x58/0x80)
Exception stack(0x8ea8d528 to 0x8ea8d570)
d520: 000003e4 00000017 20050193 ffffe000 8ea8d660 000003e4
d540: 80a08734 8ea8d660 000001a4 00000017 00000000 8e1718c0 00000007 8ea8d578
d560: 8010128c 80112d04 20050193 ffffffff
[<8010adf8>] (__dabt_svc) from [<80112d04>] (do_page_fault+0x2c/0x318)
[<80112d04>] (do_page_fault) from [<8010128c>] (do_DataAbort+0x38/0xb8)
[<8010128c>] (do_DataAbort) from [<8010adf8>] (__dabt_svc+0x58/0x80)
Exception stack(0x8ea8d660 to 0x8ea8d6a8)
d660: 000003e4 00000017 20050193 ffffe000 8ea8d798 000003e4 80a08734 8ea8d798
d680: 000001a4 00000017 00000000 8e1718c0 00000007 8ea8d6b0 8010128c 80112d04
d6a0: 20050193 ffffffff
[<8010adf8>] (__dabt_svc) from [<80112d04>] (do_page_fault+0x2c/0x318)
[<80112d04>] (do_page_fault) from [<8010128c>] (do_DataAbort+0x38/0xb8)
[<8010128c>] (do_DataAbort) from [<8010adf8>] (__dabt_svc+0x58/0x80)
Exception stack(0x8ea8d798 to 0x8ea8d7e0)
d780: 000003e4 00000017
d7a0: 20050193 ffffe000 8ea8d8d0 000003e4 80a08734 8ea8d8d0 000001a4 00000017
d7c0: 00000000 8e1718c0 00000007 8ea8d7e8 8010128c 80112d04 20050193 ffffffff
[<8010adf8>] (__dabt_svc) from [<80112d04>] (do_page_fault+0x2c/0x318)
[<80112d04>] (do_page_fault) from [<8010128c>] (do_DataAbort+0x38/0xb8)
[<8010128c>] (do_DataAbort) from [<8010adf8>] (__dabt_svc+0x58/0x80)
Exception stack(0x8ea8d8d0 to 0x8ea8d918)
d8c0: 000003e4 00000017 20050193 ffffe000
d8e0: 8ea8da08 000003e4 80a08734 8ea8da08 000001a4 00000017 00000000 8e1718c0
d900: 00000007 8ea8d920 8010128c 80112d04 20050193 ffffffff
[<8010adf8>] (__dabt_svc) from [<80112d04>] (do_page_fault+0x2c/0x318)
[<80112d04>] (do_page_fault) from [<8010128c>] (do_DataAbort+0x38/0xb8)
[<8010128c>] (do_DataAbort) from [<8010adf8>] (__dabt_svc+0x58/0x80)
Exception stack(0x8ea8da08 to 0x8ea8da50)
da00: 000003e4 00000017 20050193 ffffe000 8ea8db40 000003e4
da20: 80a08734 8ea8db40 000001a4 00000017 00000000 8e1718c0 00000007 8ea8da58
da40: 8010128c 80112d04 20050193 ffffffff
[<8010adf8>] (__dabt_svc) from [<80112d04>] (do_page_fault+0x2c/0x318)
[<80112d04>] (do_page_fault) from [<8010128c>] (do_DataAbort+0x38/0xb8)
[<8010128c>] (do_DataAbort) from [<8010adf8>] (__dabt_svc+0x58/0x80)
Exception stack(0x8ea8db40 to 0x8ea8db88)
db40: 000003e4 00000017 20050193 ffffe000 8ea8dc78 000003e4 80a08734 8ea8dc78
db60: 000001a4 00000017 00000000 8e1718c0 00000007 8ea8db90 8010128c 80112d04
db80: 20050193 ffffffff
[<8010adf8>] (__dabt_svc) from [<80112d04>] (do_page_fault+0x2c/0x318)
[<80112d04>] (do_page_fault) from [<8010128c>] (do_DataAbort+0x38/0xb8)
[<8010128c>] (do_DataAbort) from [<8010adf8>] (__dabt_svc+0x58/0x80)
Exception stack(0x8ea8dc78 to 0x8ea8dcc0)
dc60: 000003e4 00000017
dc80: 20050193 ffffe000 8ea8ddb0 000003e4 80a08734 8ea8ddb0 000001a4 00000017
dca0: 00000000 8e1718c0 00000007 8ea8dcc8 8010128c 80112d04 20050193 ffffffff
[<8010adf8>] (__dabt_svc) from [<80112d04>] (do_page_fault+0x2c/0x318)
[<80112d04>] (do_page_fault) from [<8010128c>] (do_DataAbort+0x38/0xb8)
[<8010128c>] (do_DataAbort) from [<8010adf8>] (__dabt_svc+0x58/0x80)
Exception stack(0x8ea8ddb0 to 0x8ea8ddf8)
dda0: 000003e4 00000017 20050193 ffffe000
ddc0: 8ea8dee8 000003e4 80a08734 8ea8dee8 000001a4 00000017 00000000 8e1718c0
dde0: 00000007 8ea8de00 8010128c 80112d04 20050193 ffffffff
[<8010adf8>] (__dabt_svc) from [<80112d04>] (do_page_fault+0x2c/0x318)
[<80112d04>] (do_page_fault) from [<8010128c>] (do_DataAbort+0x38/0xb8)
[<8010128c>] (do_DataAbort) from [<8010adf8>] (__dabt_svc+0x58/0x80)
Exception stack(0x8ea8dee8 to 0x8ea8df30)
dee0: 00000240 00000017 20050193 ffffe000 8ea8e020 00000240
df00: 80a08734 8ea8e020 000001a4 00000017 00000000 8e1718c0 00000007 8ea8df38
df20: 8010128c 80112d04 20050193 ffffffff
[<8010adf8>] (__dabt_svc) from [<80112d04>] (do_page_fault+0x2c/0x318)
[<80112d04>] (do_page_fault) from [<8010128c>] (do_DataAbort+0x38/0xb8)
Code: e1a09001 e592800c e5942040 e3120080 (e598b240)
---[ end trace 2912a9a5f05ef2ba ]---
note: ipv6_addrconf[676] exited with preempt_count 2
pgd = 3e00d0c8

Thank you!

0 Kudos
hawkroot
Visitor
Visitor
4,503 Views
Registered: ‎03-14-2016

After all files rebuild and create a new vivado project in linux, at this time I get:

 

~# echo start > /sys/class/remoteproc/remoteproc0/state
remoteproc remoteproc0: powering up remoteproc@0
remoteproc remoteproc0: Booting fw image open-amp-linux.elf, size 2560228
virtio_rpmsg_bus virtio0: rpmsg host is online
remoteproc remoteproc0: registered virtio0 (type 7)
CPU1: shutdown
remoteproc remoteproc0: remote processor remoteproc@0 is now up

 

 

But after few time reboot I get the same:

 

~# echo start > /sys/class/remoteproc/remoteproc0/state
remoteproc remoteproc0: powering up remoteproc@0
remoteproc remoteproc0: Booting fw image open-amp-linux.elf, size 2559756
remoteproc remoteproc0: registered virtio0 (type 7)
Unable to handle kernel paging request at virtual address e38320cc
Unable to handle kernel paging request at virtual address e25ef038
pgd = 991e8000
[e25ef038] *pgd=00000000
Internal error: Oops - BUG: 5 [#1] PREEMPT SMP ARM
Modules linked in: rpmsg_core(+) zynq_remoteproc remoteproc virtio virtio_ring
CPU: 0 PID: 736 Comm: udevd Not tainted 4.9.0-xilinx #2
Hardware name: Xilinx Zynq Platform
task: 9e60a640 task.stack: 99166000
PC is at generic_handle_irq+0x10/0x28
LR is at __radix_tree_lookup+0x2c/0x98
pc : [<80153c1c>]    lr : [<802e0614>]    psr: a00f0193
sp : 99167e30  ip : 81e40d90  fp : 00000000
r10: 00000000  r9 : 99166000  r8 : 9e402600
r7 : 00000012  r6 : 81e40d90  r5 : 00000000  r4 : 00000000
r3 : e25ef004  r2 : 00000000  r1 : 00000fff  r0 : e25ef004
Flags: NzCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment none
Control: 18c5387d  Table: 191e804a  DAC: 00000051
Process udevd (pid: 736, stack limit = 0x99166210)
Stack: (0x99167e30 to 0x99168000)
7e20:                                     00000000 80154134 f8f00100 81f03b1c
7e40: 99167e68 81f13e00 f8f01100 801013f8 8060876c 200f0013 ffffffff 99167e9c
7e60: 81f32500 8010ae8c 9e002848 00000000 0000e283 00003f52 9e002848 9916ab5c
7e80: 9916ab44 99166000 81f32500 00000000 00000000 00000000 e58d300c 99167eb8
7ea0: 802e5004 8060876c 200f0013 ffffffff 00000051 7f000000 81948640 9916ab5c
7ec0: 9916ab44 99166000 81f32500 801f5350 9e66c240 9916ab40 01200011 80118f58
7ee0: 00000051 80511360 76f24068 7ec3b350 7ec3b34c 9e66c518 80106e24 80512748
7f00: 99166000 00000000 00000000 00000000 00000010 00000000 00000000 00000000
7f20: bffba5f5 00000013 99166000 00000000 000651f0 00000001 01200011 00000000
7f40: 00000000 80106e24 00000000 00000000 7ec3b3f4 80119ee8 00000000 00000000
7f60: ffffffff 7ec3b3e4 00000004 9e3a2980 99166000 00000000 76f24068 00000000
7f80: 76f244c0 00000078 80106e24 99166000 00000000 8011a22c 76f24068 00000000
7fa0: 00000000 80106c60 76f24068 00000000 01200011 00000000 00000000 00000000
7fc0: 76f24068 00000000 76f244c0 00000078 00000000 76e92000 000002e0 7ec3b3f4
7fe0: 000002e0 7ec3b3c8 76f24000 76df65c0 600f0010 01200011 0484a000 10002a10
[<80153c1c>] (generic_handle_irq) from [<80154134>] (__handle_domain_irq+0xa0/0xb4)
[<80154134>] (__handle_domain_irq) from [<801013f8>] (gic_handle_irq+0x50/0x94)
[<801013f8>] (gic_handle_irq) from [<8010ae8c>] (__irq_svc+0x6c/0xa8)
Exception stack(0x99167e68 to 0x99167eb0)
7e60:                   9e002848 00000000 0000e283 00003f52 9e002848 9916ab5c
7e80: 9916ab44 99166000 81f32500 00000000 00000000 00000000 e58d300c 99167eb8
7ea0: 802e5004 8060876c 200f0013 ffffffff
[<8010ae8c>] (__irq_svc) from [<8060876c>] (_raw_spin_lock+0x4c/0x58)
[<8060876c>] (_raw_spin_lock) from [<802e5004>] (lockref_get+0x24/0x88)
[<802e5004>] (lockref_get) from [<801f5350>] (copy_fs_struct+0x68/0x94)
[<801f5350>] (copy_fs_struct) from [<80118f58>] (copy_process.part.3+0x518/0x1360)
[<80118f58>] (copy_process.part.3) from [<80119ee8>] (_do_fork+0xa8/0x330)
[<80119ee8>] (_do_fork) from [<8011a22c>] (SyS_clone+0x1c/0x24)
[<8011a22c>] (SyS_clone) from [<80106c60>] (ret_fast_syscall+0x0/0x3c)
Code: e92d4010 ebfffff9 e2503000 0a000003 (e5933034)
---[ end trace 1ffc51f621712d4a ]---
Kernel panic - not syncing: Fatal exception in interrupt
pgd = 81468000
[e38320cc] *pgd=00000000
Internal error: Oops - BUG: 5 [#2] PREEMPT SMP ARM
Modules linked in: rpmsg_core(+) zynq_remoteproc remoteproc virtio virtio_ring
CPU: 1 PID: 1245 Comm: udevd Tainted: G      D         4.9.0-xilinx #2
Hardware name: Xilinx Zynq Platform
task: 9e66d840 task.stack: 81466000
PC is at locks_remove_posix+0x18/0x28
LR is at filp_close+0x58/0x68
pc : [<8020ca8c>]    lr : [<801cb6c4>]    psr: a0030013
sp : 81467f90  ip : 9e532250  fp : 0005c5b0
r10: 00000000  r9 : 81466000  r8 : 80106e24
r7 : 00000006  r6 : 9e532200  r5 : 9c7d6780  r4 : 00000000
r3 : e38320c0  r2 : 00000000  r1 : 9e532200  r0 : 9c7d6780
Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
Control: 18c5387d  Table: 0146804a  DAC: 00000051
Process udevd (pid: 1245, stack limit = 0x81466210)
Stack: (0x81467f90 to 0x81468000)
7f80:                                     0005c530 000641f0 00064c40 801cb6f4
7fa0: 0005c530 80106c60 0005c530 000641f0 00000006 76e927cc 00000000 00000001
7fc0: 0005c530 000641f0 00064c40 00000006 0005d008 00066018 0005c530 0005c5b0
7fe0: 00000000 7ec3b3f4 00013628 76e1b450 60030010 00000006 e7fddef0 e7fddef0
[<8020ca8c>] (locks_remove_posix) from [<801cb6c4>] (filp_close+0x58/0x68)
[<801cb6c4>] (filp_close) from [<801cb6f4>] (SyS_close+0x20/0x48)
[<801cb6f4>] (SyS_close) from [<80106c60>] (ret_fast_syscall+0x0/0x3c)
Code: e59330d0 f57ff05b e3530000 012fff1e (e5b3200c)
---[ end trace 1ffc51f621712d4b ]---
CPU1: stopping
CPU: 1 PID: 1245 Comm: udevd Tainted: G      D         4.9.0-xilinx #2
Hardware name: Xilinx Zynq Platform
[<8010e244>] (unwind_backtrace) from [<8010a4a4>] (show_stack+0x10/0x14)
[<8010a4a4>] (show_stack) from [<802dc2b0>] (dump_stack+0x80/0x9c)
[<802dc2b0>] (dump_stack) from [<8010c9f8>] (ipi_cpu_stop+0x3c/0x70)
[<8010c9f8>] (ipi_cpu_stop) from [<8010d210>] (handle_IPI+0x64/0x84)
[<8010d210>] (handle_IPI) from [<80101420>] (gic_handle_irq+0x78/0x94)
[<80101420>] (gic_handle_irq) from [<8010ae8c>] (__irq_svc+0x6c/0xa8)
Exception stack(0x81467cd8 to 0x81467d20)
7cc0:                                                       9e2baef8 9e2baf00
7ce0: 00000036 00000110 992bdbb0 9bcb9480 9e2baf04 9e2baeec 00000000 00010000
7d00: 81f07da8 8020ca8c 00000036 81467d28 801b65dc 80608b64 60030113 ffffffff
[<8010ae8c>] (__irq_svc) from [<80608b64>] (_raw_spin_unlock_irq+0x1c/0x50)
[<80608b64>] (_raw_spin_unlock_irq) from [<801b65dc>] (unlink_file_vma+0x34/0x40)
[<801b65dc>] (unlink_file_vma) from [<801b1388>] (free_pgtables+0x3c/0x9c)
[<801b1388>] (free_pgtables) from [<801b769c>] (exit_mmap+0xd8/0x1bc)
[<801b769c>] (exit_mmap) from [<80118700>] (mmput+0x40/0xe8)
[<80118700>] (mmput) from [<8011cf40>] (do_exit+0x36c/0x860)
[<8011cf40>] (do_exit) from [<8010a778>] (die+0x2d0/0x3d4)
[<8010a778>] (die) from [<801171b4>] (__do_kernel_fault.part.0+0x54/0x74)
[<801171b4>] (__do_kernel_fault.part.0) from [<80113064>] (do_bad_area+0x74/0x78)
[<80113064>] (do_bad_area) from [<80113114>] (do_translation_fault+0x9c/0xa8)
[<80113114>] (do_translation_fault) from [<8010128c>] (do_DataAbort+0x38/0xb8)
[<8010128c>] (do_DataAbort) from [<8010adf8>] (__dabt_svc+0x58/0x80)
Exception stack(0x81467f40 to 0x81467f88)
7f40: 9c7d6780 9e532200 00000000 e38320c0 00000000 9c7d6780 9e532200 00000006
7f60: 80106e24 81466000 00000000 0005c5b0 9e532250 81467f90 801cb6c4 8020ca8c
7f80: a0030013 ffffffff
[<8010adf8>] (__dabt_svc) from [<8020ca8c>] (locks_remove_posix+0x18/0x28)
[<8020ca8c>] (locks_remove_posix) from [<801cb6c4>] (filp_close+0x58/0x68)
[<801cb6c4>] (filp_close) from [<801cb6f4>] (SyS_close+0x20/0x48)
[<801cb6f4>] (SyS_close) from [<80106c60>] (ret_fast_syscall+0x0/0x3c)
---[ end Kernel panic - not syncing: Fatal exception in interrupt

 

 

 

0 Kudos
jovitac
Moderator
Moderator
4,480 Views
Registered: ‎05-10-2017

I'm not sure why you are adding the LED on code to the echo-test example.

You could create an application using the hello world template and add your led on code to that and target the remote processor.

Next you can install this application in rootfs similar to the echo-test application that you would build from SDK. And then load the firmware using remote proc when linux boots. You will need to make sure that the elf_ddr address in the lscript.ld matches the one you have in your device-tree

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
hawkroot
Visitor
Visitor
4,468 Views
Registered: ‎03-14-2016

Hello!

 

I need to transfer data between Linux (Master) and Bare-metal project with use rpmsg protocol so I use echo-test like reference design for understanding how it works. I need execute simple commands on Bare-Metal side, but with very high speed. For example GPIO-AXI from Linux can not give me this speed but in GPIO-AXI Bare-Metal I can get 250ns latency time pin switching. LED I added like status Bare-metal project control. I added only this lines:

/***************************** Include Files *********************************/
#include "xparameters.h"
#include "xgpio.h"
#include "xparameters.h"
#include <stdio.h>
#include "xil_io.h"
#include "xil_mmu.h"
#include "xil_cache.h"
#include "xil_printf.h"
#include "xil_exception.h"
#include "xscugic.h"
#include "sleep.h"
#include "xpseudo_asm.h"

/************************** Constant Definitions *****************************/
#define LED 0x01   /* Assumes bit 0 of GPIO is connected to an LED  */
#define GPIO_EXAMPLE_DEVICE_ID  0
#define LED_CHANNEL 1
XGpio Gpio; /* The Instance of the GPIO Driver */

and to main

status = XGpio_Initialize(&Gpio, GPIO_EXAMPLE_DEVICE_ID);
if (Status != XST_SUCCESS) {
	return XST_FAILURE;
}

XGpio_SetDataDirection(&Gpio, LED_CHANNEL, 0x00);

XGpio_DiscreteWrite(&Gpio, LED_CHANNEL, 0x01);

And tested like standalone project for check LED turn on.

 

I get the same fail (sometimes) when I use Echo-OpenAMP project without any changes(without LED). Where is a problem in driver? Or it's not correct device-tree?

memory {
		device_type = "memory";
		reg = <0x0 0x20000000>;
	};

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

		rproc@3e000000 {
			no-map;
			reg = <0x3e000000 0x1000000>;
		};
	};

	remoteproc@0 {
		compatible = "xlnx,zynq_remoteproc";
		firmware = "firmware";
		vring0 = <0xf>;
		vring1 = <0xe>;
		srams = <0x6>;
	};

In device-tree 

reg = <0x3e000000 0x1000000

Why it's should be 0x3e000000 not 0x1e000000? 

My device tree in the attachment

 

Thank you!

0 Kudos
hawkroot
Visitor
Visitor
4,401 Views
Registered: ‎03-14-2016

This board have 512MB DDR memory. When I set in "processing system" 1Gb memory and recompile (kernel u-boot device-tree) my project starts work properly (echo-test with LED). What I should change in echo-test example for 512MB?

0 Kudos
hawkroot
Visitor
Visitor
3,067 Views
Registered: ‎03-14-2016

I found solution for 512M please correct me if it's not correct :)

 

In lscript.ld change Available Memory Regions to:

 

ps7_ddr_0_AXI_BASEADDR		0x1e000000	0x00400000

In rsc_table.c file change to:

 

 

#define RING_TX                     0x1e600000
#define RING_RX                     0x1e604000

{RSC_RPROC_MEM, 0x1e600000, 0x1e600000, 0x100000, 0},

For device-tree change to:

 

 

/ {
	reserved-memory {
		#address-cells = <1>;
		#size-cells = <1>;
		ranges;
		rproc_0_reserved: rproc@1e000000 {
			no-map;
			reg =  <0x1e000000 0x01000000>;
		};
	};
	amba {
		elf_ddr_0: ddr@0 {
			compatible = "mmio-sram";
			reg = <0x1e000000 0x400000>;
		};
	};
	remoteproc0: remoteproc@0 {
		compatible = "xlnx,zynq_remoteproc";
		firmware = "firmware";
		vring0 = <15>;
		vring1 = <14>;
		srams = <&elf_ddr_0>;
	};
};

and add bootargs = "mem=510M" in device-tree

 

Thanks!

 

0 Kudos