cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
CobusR
Visitor
Visitor
408 Views
Registered: ‎03-15-2021

ZCU102 R5_1 echo test launch fail, but works with QEMU

Jump to solution

Hi,

So I can get the echo test to run on R5_1 using QEMU. I've now received my ZCU102 board and using the same petalinux image I used for QEMU the R5_1 processor fails when launched for the echo test:

 

[   64.674257] SError Interrupt on CPU0, code 0xbf000002 -- SError
[   64.674259] CPU: 0 PID: 919 Comm: udevd Not tainted 5.4.0-xilinx-v2020.2 #1
[   64.674261] Hardware name: ZynqMP ZCU102 Rev1.0 (DT)
[   64.674262] pstate: 60000085 (nZCv daIf -PAN -UAO)
[   64.674264] pc : zynqmp_ipi_send_data+0x60/0x140
[   64.674265] lr : zynqmp_ipi_send_data+0xd8/0x140
[   64.674266] sp : ffff800011c2b7c0
[   64.674267] x29: ffff800011c2b7c0 x28: 0000000000000100
[   64.674271] x27: ffff80001013f510 x26: 0000000000000100
[   64.674274] x25: 0000000000040000 x24: ffff000879ea4478
[   64.674276] x23: ffff000879ea4828 x22: 0000000000000000
[   64.674279] x21: ffff00087a183600 x20: ffff00087a01a0a0
[   64.674282] x19: ffff000875f76080 x18: 0000000000000001
[   64.674285] x17: 0000000000000000 x16: 0000000000000fff
[   64.674287] x15: ffff000875f764a8 x14: ffff000879e86828
[   64.674290] x13: ffff800011be0000 x12: 0000000000000040
[   64.674293] x11: 0000000000000100 x10: 0000000000000001
[   64.674296] x9 : 0000000000000228 x8 : 0000000000000220
[   64.674299] x7 : 0000000000000000 x6 : 0000000000000000
[   64.674301] x5 : ffff00087a01a410 x4 : ffff800011c2b7e8
[   64.674304] x3 : ffff800010065b04 x2 : 0000000000001003
[   64.674307] x1 : 0000000000000002 x0 : ffff00087a01a080
[   64.674310] Kernel panic - not syncing: Asynchronous SError Interrupt
[   64.674312] CPU: 0 PID: 919 Comm: udevd Not tainted 5.4.0-xilinx-v2020.2 #1
[   64.674314] Hardware name: ZynqMP ZCU102 Rev1.0 (DT)
[   64.674314] Call trace:
[   64.674316]  dump_backtrace+0x0/0x140
[   64.674317]  show_stack+0x14/0x20
[   64.674318]  dump_stack+0xac/0xd0
[   64.674319]  panic+0x140/0x30c
[   64.674320]  __stack_chk_fail+0x0/0x18
[   64.674321]  arm64_serror_panic+0x74/0x80
[   64.674323]  do_serror+0x114/0x118
[   64.674324]  el1_error+0x84/0xf8
[   64.674325]  zynqmp_ipi_send_data+0x60/0x140
[   64.674326]  msg_submit+0xd4/0x130
[   64.674327]  mbox_send_message+0xa0/0x150
[   64.674329]  zynqmp_r5_rproc_kick+0x78/0xf0 [zynqmp_r5_remoteproc]
[   64.674330]  rproc_virtio_notify+0x24/0x30
[   64.674332]  virtqueue_notify+0x20/0x48
[   64.674333]  rpmsg_probe+0x24c/0x318 [virtio_rpmsg_bus]
[   64.674334]  virtio_dev_probe+0x15c/0x208
[   64.674336]  really_probe+0xd8/0x2f8
[   64.674337]  driver_probe_device+0x54/0xe8
[   64.674338]  device_driver_attach+0x6c/0x78
[   64.674339]  __driver_attach+0x54/0xd0
[   64.674341]  bus_for_each_dev+0x6c/0xc0
[   64.674342]  driver_attach+0x20/0x28
[   64.674343]  bus_add_driver+0x148/0x1e0
[   64.674344]  driver_register+0x60/0x110
[   64.674345]  register_virtio_driver+0x20/0x38
[   64.674347]  rpmsg_init+0x18/0x1000 [virtio_rpmsg_bus]
[   64.674348]  do_one_initcall+0x50/0x190
[   64.674349]  do_init_module+0x50/0x1f0
[   64.674350]  load_module+0x1ca4/0x2218
[   64.674352]  __do_sys_finit_module+0xd0/0xe8
[   64.674353]  __arm64_sys_finit_module+0x1c/0x28
[   64.674354]  el0_svc_common.constprop.0+0x68/0x160
[   64.674356]  el0_svc_handler+0x6c/0x88
[   64.674357]  el0_svc+0x8/0xc
[   64.697148] SMP: stopping secondary CPUs
[   64.697150] Kernel Offset: disabled
[   64.697151] CPU features: 0x0002,20002004
[   64.697152] Memory Limit: none

 

 

The device tree file I used is attached.

I have also attached the source for the application running on R5_1.

Any suggestions as to why this might be happening on the ZCU102 and not QEMU?

I used the ZCU102 BSP for all my QEMU tests as well.

I use 2020.2 of petalinux and vitis.

 

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
CobusR
Visitor
Visitor
340 Views
Registered: ‎03-15-2021

So it is now running on the ZCU102.

I made the following changes to the mailbox setup in my system-user.dtsi file:

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@ff90400 {
			reg = <0xff990400 0x20>,
			      <0xff990420 0x20>,
			      <0xff990080 0x20>,
			      <0xff9900a0 0x20>;
			reg-names = "local_request_region",
				    "local_response_region",
				    "remote_request_region",
				    "remote_response_region";
			#mbox-cells = <1>;
			xlnx,ipi-id = <1>;
		};
	};

 zynqmp_ipi2 {
        compatible = "xlnx,zynqmp-ipi-mailbox";
        interrupt-parent = <&gic>;
        interrupts = <0 30 4>;
        xlnx,ipi-id = <8>;
        #address-cells = <1>;
        #size-cells = <1>;
        ranges;
      /* APU<->RPU1 IPI mailbox controller */
		ipi_mailbox_rpu1: mailbox@ff990440 {
			reg = <0xff990440 0x20>,
			      <0xff990460 0x20>,
			      <0xff990280 0x20>,
			      <0xff9902a0 0x20>;
			reg-names = "local_request_region",
				    "local_response_region",
				    "remote_request_region",
				    "remote_response_region";
			#mbox-cells = <1>;
			xlnx,ipi-id = <2>;
		};
    };

};

 

This is after I found the example setup here:

https://github.com/Xilinx/linux-xlnx/blob/master/Documentation/devicetree/bindings/mailbox/xlnx%2Czynqmp-ipi-mailbox.txt 

Only the above example does not work directly as the channels under /sys/bus/rpmsg/devices are not created when using it like that.

It seems the register address values did the trick.

View solution in original post

0 Kudos
2 Replies
CobusR
Visitor
Visitor
406 Views
Registered: ‎03-15-2021

Looks like my .dsti somehow when missing in the attachments.

Here it is:

/ {
	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>;
		};
		rpu1vdev0vring0: rpu1vdev0vring0@3ef40000 {
		no-map;
		reg = <0x0 0x3ef40000 0x0 0x4000>;
		};
		rpu1vdev0vring1: rpu1vdev0vring1@3ef44000 {
		no-map;
		reg = <0x0 0x3ef44000 0x0 0x4000>;
		};
		rpu1vdev0buffer: rpu1vdev0buffer@3ef48000 {
	        no-map;
        	reg = <0x0 0x3ef48000 0x0 0x100000>;
        	};
		rproc_1_reserved: rproc@3ef00000{
         	no-map;
         	reg = <0x0 0x3ef00000 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>;
			};
		};
		 r5_1: r5@1 {
            		#address-cells = <2>;
            		#size-cells = <2>;
            		ranges;
		        memory-region = <&rproc_1_reserved>, <&rpu1vdev0buffer>, <&rpu1vdev0vring0>, <&rpu1vdev0vring1>;
		        pnode-id = <0x8>;
	                mboxes = <&ipi_mailbox_rpu1 0>, <&ipi_mailbox_rpu1 1>;
            		mbox-names = "tx", "rx";
            		r5_1_tcm_a: tcm@ffe90000 {
				reg = <0x0 0xFFE90000 0x0 0x10000>;
		                pnode-id = <0x11>;
        	        };
        	        r5_1_tcm_b: tcm@ffeb0000 {
		                reg = <0x0 0xFFEB0000 0x0 0x10000>;
        		        pnode-id = <0x12>;
       		        };
        	};	
	};


	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>;
		};
	};

 zynqmp_ipi2 {
        compatible = "xlnx,zynqmp-ipi-mailbox";
        interrupt-parent = <&gic>;
        interrupts = <0 30 4>;
        xlnx,ipi-id = <8>;
        #address-cells = <1>;
        #size-cells = <1>;
        ranges;
        /* APU<->RPU1 IPI mailbox controller */
        ipi_mailbox_rpu1: mailbox@ff3f0b00 {
            reg = <0xff3f0b00 0x20>,
                  <0xff3f0b20 0x20>,
                  <0xff3f0940 0x20>,
                  <0xff3f0960 0x20>;
            reg-names = "local_request_region",
                    "local_response_region",
                    "remote_request_region",
                    "remote_response_region";
            #mbox-cells = <1>;
            xlnx,ipi-id = <2>;
        };
    };

};
0 Kudos
CobusR
Visitor
Visitor
341 Views
Registered: ‎03-15-2021

So it is now running on the ZCU102.

I made the following changes to the mailbox setup in my system-user.dtsi file:

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@ff90400 {
			reg = <0xff990400 0x20>,
			      <0xff990420 0x20>,
			      <0xff990080 0x20>,
			      <0xff9900a0 0x20>;
			reg-names = "local_request_region",
				    "local_response_region",
				    "remote_request_region",
				    "remote_response_region";
			#mbox-cells = <1>;
			xlnx,ipi-id = <1>;
		};
	};

 zynqmp_ipi2 {
        compatible = "xlnx,zynqmp-ipi-mailbox";
        interrupt-parent = <&gic>;
        interrupts = <0 30 4>;
        xlnx,ipi-id = <8>;
        #address-cells = <1>;
        #size-cells = <1>;
        ranges;
      /* APU<->RPU1 IPI mailbox controller */
		ipi_mailbox_rpu1: mailbox@ff990440 {
			reg = <0xff990440 0x20>,
			      <0xff990460 0x20>,
			      <0xff990280 0x20>,
			      <0xff9902a0 0x20>;
			reg-names = "local_request_region",
				    "local_response_region",
				    "remote_request_region",
				    "remote_response_region";
			#mbox-cells = <1>;
			xlnx,ipi-id = <2>;
		};
    };

};

 

This is after I found the example setup here:

https://github.com/Xilinx/linux-xlnx/blob/master/Documentation/devicetree/bindings/mailbox/xlnx%2Czynqmp-ipi-mailbox.txt 

Only the above example does not work directly as the channels under /sys/bus/rpmsg/devices are not created when using it like that.

It seems the register address values did the trick.

View solution in original post

0 Kudos