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: 
Participant pharbanau
Participant
1,770 Views
Registered: ‎12-20-2016

Ultrascale+ AXI DMA loopback test

Jump to solution

Hi all,

 

I'm working with ZCU102 board (rev1.1), Vivado and Petalinux tools of version 2017.2.

I try to build basic system to test DMA, for this I wrote my custom driver (which actually was working pretty well with Zynq7000), but first I wanted to check that axidmatest doesn't report any errors. I compiled it into a kernel and accordingly it loads during boot process.

 

So, my hardware setup is pretty simple, as depicted below:

bd_dmatest.png

Unfortunately, I receive strange error during Linux boot and Linux crashes:

....

[    1.892689] xilinx-vdma a0000000.dma: Xilinx AXI VDMA Engine Driver Probed!!

....

[    2.838901] dmatest: Started 1 threads using dma1chan0 dma1chan1
[    2.844986] random: fast init done
[    2.856938] random: crng init done

[    2.935840] irq 52: nobody cared (try booting with the "irqpoll" option)
[    2.935845] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.9.0-xilinx-v2017.2 #1
[    2.935846] Hardware name: xlnx,zynqmp (DT)
[    2.935848] Call trace:
[    2.935858] [<ffffff8008088138>] dump_backtrace+0x0/0x198
[    2.935863] [<ffffff80080882e4>] show_stack+0x14/0x20
[    2.935868] [<ffffff80083de514>] dump_stack+0x94/0xb8
[    2.935873] [<ffffff80080de180>] __report_bad_irq+0x38/0xe8
[    2.935877] [<ffffff80080de504>] note_interrupt+0x20c/0x2e0
[    2.935880] [<ffffff80080db754>] handle_irq_event_percpu+0x44/0x58
[    2.935883] [<ffffff80080db7ac>] handle_irq_event+0x44/0x78
[    2.935887] [<ffffff80080df16c>] handle_fasteoi_irq+0xb4/0x1c0
[    2.935890] [<ffffff80080da774>] generic_handle_irq+0x24/0x38
[    2.935893] [<ffffff80080dadec>] __handle_domain_irq+0x5c/0xb8
[    2.935896] [<ffffff80080814cc>] gic_handle_irq+0x64/0xc0
[    2.935899] Exception stack(0xffffffc87ff7ee00 to 0xffffffc87ff7ef30)
[    2.935903] ee00: ffffffc87ff7ee30 0000008000000000 ffffffc87ff7ef60 ffffff800809f0d4
[    2.935907] ee20: 0000000040000145 ffffffc87b878000 0000000000000000 0000000000000000
[    2.935910] ee40: 00000000fffeddc3 ffffff80086d1ff8 00000000199988d3 0000000000000020
[    2.935913] ee60: 0000000040baf511 7fffffffffffffff 0000000000000020 0000000000000000
[    2.935917] ee80: ffffffc87ff85a30 ffffff80089494c8 000000000000000e 0000000000000000
[    2.935920] eea0: 0000000000000006 000000000000000e 0000000000000019 0000000000000001
[    2.935923] eec0: 0000000000000010 ffffff8008c67000 ffffff8008c63b08 0000000000000000
[    2.935927] eee0: ffffff8008d24600 ffffffc87b806000 ffffffc87b878000 00000000fffeddc2
[    2.935930] ef00: ffffffc87ff7f090 ffffff8008d27c68 0000000000000282 ffffffc87ff7ef60
[    2.935932] ef20: ffffff800809f52c ffffffc87ff7ef60
[    2.935935] [<ffffff80080827b0>] el1_irq+0xb0/0x140
[    2.935939] [<ffffff800809f52c>] irq_exit+0xac/0xf0
[    2.935942] [<ffffff80080dadf0>] __handle_domain_irq+0x60/0xb8
[    2.935945] [<ffffff80080814cc>] gic_handle_irq+0x64/0xc0
[    2.935947] Exception stack(0xffffffc87b87b8b0 to 0xffffffc87b87b9e0)
[    2.935949] b8a0:                                   ffffff8008d63e60 00000000000000c0
[    2.935953] b8c0: 0000000000000076 000000000000000a 0000000000000000 0000000000000006
[    2.935956] b8e0: ffffff8008d2821b 616d6420676e6973 6420306e61686331 0000000000000044
[    2.935959] b900: 0000000005f5e0ff ffffffc87b87b940 0000000000000134 ffffff8008d281e5
[    2.935962] b920: ffffff8088d281d7 0000000000000006 0000000000000019 0000000000000001
[    2.935966] b940: 0000000000000010 ffffff8008d27000 ffffff8008caa000 0000000000000040
[    2.935969] b960: ffffff8008d27c90 0000000000000001 ffffff8008c97000 ffffff8008d30194
[    2.935972] b980: 0000000000000000 ffffff8008d27c68 0000000000000000 ffffffc87b87b9e0
[    2.935976] b9a0: ffffff80080d8a80 ffffffc87b87b9e0 ffffff80080d8a84 0000000060000045
[    2.935979] b9c0: 0000000000000001 ffffff8008c97000 ffffffffffffffff 0000000000000000
[    2.935982] [<ffffff80080827b0>] el1_irq+0xb0/0x140
[    2.935985] [<ffffff80080d8a84>] console_unlock+0x26c/0x5c0
[    2.935988] [<ffffff80080d9094>] vprintk_emit+0x2bc/0x418
[    2.935991] [<ffffff80080d9364>] vprintk_default+0x34/0x40
[    2.935996] [<ffffff800812ebe4>] printk+0x54/0x5c
[    2.936001] [<ffffff800845f68c>] xilinx_axidmatest_probe+0x16c/0x458
[    2.936007] [<ffffff80085038a8>] platform_drv_probe+0x58/0xc0
[    2.936011] [<ffffff8008501d4c>] driver_probe_device+0x1fc/0x2a8
[    2.936015] [<ffffff8008501ea4>] __driver_attach+0xac/0xb0
[    2.936019] [<ffffff80084ffd9c>] bus_for_each_dev+0x64/0xa0
[    2.936022] [<ffffff8008501538>] driver_attach+0x20/0x28
[    2.936026] [<ffffff8008501088>] bus_add_driver+0x110/0x230
[    2.936029] [<ffffff8008502688>] driver_register+0x60/0xf8
[    2.936033] [<ffffff80085037e0>] __platform_driver_register+0x40/0x48
[    2.936040] [<ffffff8008c337a0>] axidma_init+0x18/0x20
[    2.936043] [<ffffff80080830b8>] do_one_initcall+0x38/0x128
[    2.936049] [<ffffff8008c10c94>] kernel_init_freeable+0x140/0x1e0
[    2.936054] [<ffffff8008932dc0>] kernel_init+0x10/0x100
[    2.936057] [<ffffff8008082e80>] ret_from_fork+0x10/0x50
[    2.936058] handlers:
[    2.936063] [<ffffff8008463028>] xilinx_dma_irq_handler
[    2.936064] Disabling IRQ #52
[    3.027074] irq 53: nobody cared (try booting with the "irqpoll" option)
[    3.027077] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.9.0-xilinx-v2017.2 #1
[    3.027079] Hardware name: xlnx,zynqmp (DT)
[    3.027079] Call trace:
[    3.027084] [<ffffff8008088138>] dump_backtrace+0x0/0x198
[    3.027088] [<ffffff80080882e4>] show_stack+0x14/0x20
[    3.027091] [<ffffff80083de514>] dump_stack+0x94/0xb8
[    3.027095] [<ffffff80080de180>] __report_bad_irq+0x38/0xe8
[    3.027098] [<ffffff80080de504>] note_interrupt+0x20c/0x2e0
[    3.027101] [<ffffff80080db754>] handle_irq_event_percpu+0x44/0x58
[    3.027104] [<ffffff80080db7ac>] handle_irq_event+0x44/0x78
[    3.027108] [<ffffff80080df16c>] handle_fasteoi_irq+0xb4/0x1c0
[    3.027111] [<ffffff80080da774>] generic_handle_irq+0x24/0x38
[    3.027114] [<ffffff80080dadec>] __handle_domain_irq+0x5c/0xb8
[    3.027117] [<ffffff80080814cc>] gic_handle_irq+0x64/0xc0
[    3.027119] Exception stack(0xffffffc87ff7ee00 to 0xffffffc87ff7ef30)
[    3.027123] ee00: ffffffc87ff7ee30 0000008000000000 ffffffc87ff7ef60 ffffff800809f0d4
[    3.027126] ee20: 0000000040000145 ffffffc87b878000 0000000000000000 0000000000000000
[    3.027129] ee40: 00000000fffeddc3 ffffff80086d1ff8 00000000199988d3 0000000000000020
[    3.027132] ee60: 0000000040baf511 7fffffffffffffff 0000000000000020 0000000000000000
[    3.027136] ee80: ffffffc87ff85a30 ffffff80089494c8 000000000000000e 0000000000000000
[    3.027139] eea0: 0000000000000006 000000000000000e 0000000000000019 0000000000000001
[    3.027142] eec0: 0000000000000010 ffffff8008c67000 ffffff8008c63b08 0000000000000000
[    3.027145] eee0: ffffff8008d24600 ffffffc87b806000 ffffffc87b878000 00000000fffeddc2
[    3.027149] ef00: ffffffc87ff7f090 ffffff8008d27c68 0000000000000282 ffffffc87ff7ef60
[    3.027151] ef20: ffffff800809f52c ffffffc87ff7ef60
[    3.027154] [<ffffff80080827b0>] el1_irq+0xb0/0x140
[    3.027157] [<ffffff800809f52c>] irq_exit+0xac/0xf0
[    3.027160] [<ffffff80080dadf0>] __handle_domain_irq+0x60/0xb8
[    3.027163] [<ffffff80080814cc>] gic_handle_irq+0x64/0xc0
[    3.027165] Exception stack(0xffffffc87b87b8b0 to 0xffffffc87b87b9e0)
[    3.027168] b8a0:                                   ffffff8008d63e60 00000000000000c0
[    3.027171] b8c0: 0000000000000076 000000000000000a 0000000000000000 0000000000000006
[    3.027174] b8e0: ffffff8008d2821b 616d6420676e6973 6420306e61686331 0000000000000044
[    3.027177] b900: 0000000005f5e0ff ffffffc87b87b940 0000000000000134 ffffff8008d281e5
[    3.027181] b920: ffffff8088d281d7 0000000000000006 0000000000000019 0000000000000001
[    3.027184] b940: 0000000000000010 ffffff8008d27000 ffffff8008caa000 0000000000000040
[    3.027187] b960: ffffff8008d27c90 0000000000000001 ffffff8008c97000 ffffff8008d30194
[    3.027191] b980: 0000000000000000 ffffff8008d27c68 0000000000000000 ffffffc87b87b9e0
[    3.027194] b9a0: ffffff80080d8a80 ffffffc87b87b9e0 ffffff80080d8a84 0000000060000045
[    3.027197] b9c0: 0000000000000001 ffffff8008c97000 ffffffffffffffff 0000000000000000
[    3.027200] [<ffffff80080827b0>] el1_irq+0xb0/0x140
[    3.027203] [<ffffff80080d8a84>] console_unlock+0x26c/0x5c0
[    3.027206] [<ffffff80080d9094>] vprintk_emit+0x2bc/0x418
[    3.027209] [<ffffff80080d9364>] vprintk_default+0x34/0x40
[    3.027213] [<ffffff800812ebe4>] printk+0x54/0x5c
[    3.027217] [<ffffff800845f68c>] xilinx_axidmatest_probe+0x16c/0x458
[    3.027221] [<ffffff80085038a8>] platform_drv_probe+0x58/0xc0
[    3.027225] [<ffffff8008501d4c>] driver_probe_device+0x1fc/0x2a8
[    3.027228] [<ffffff8008501ea4>] __driver_attach+0xac/0xb0
[    3.027232] [<ffffff80084ffd9c>] bus_for_each_dev+0x64/0xa0
[    3.027235] [<ffffff8008501538>] driver_attach+0x20/0x28
[    3.027239] [<ffffff8008501088>] bus_add_driver+0x110/0x230
[    3.027242] [<ffffff8008502688>] driver_register+0x60/0xf8
[    3.027247] [<ffffff80085037e0>] __platform_driver_register+0x40/0x48
[    3.027251] [<ffffff8008c337a0>] axidma_init+0x18/0x20
[    3.027254] [<ffffff80080830b8>] do_one_initcall+0x38/0x128
[    3.027258] [<ffffff8008c10c94>] kernel_init_freeable+0x140/0x1e0
[    3.027262] [<ffffff8008932dc0>] kernel_init+0x10/0x100
[    3.027265] [<ffffff8008082e80>] ret_from_fork+0x10/0x50
[    3.027266] handlers:
[    3.027270] [<ffffff8008463028>] xilinx_dma_irq_handler
[    3.027271] Disabling IRQ #53

 

 

Do you have any idea what is wrong with my design? I had doubts whether I need to use Master HPM bus in FPD or LPD, I tried both -- same result. DMA configured for simple mode use (with buffer length = 23bits).

I use standart petalinux setup to boot from sd-card.

Error seems to be related to GIC controller.

 

Any help is highly appreciated, I'm debugging this issue already quite a while...

 

br,

Pavel

0 Kudos
1 Solution

Accepted Solutions
Xilinx Employee
Xilinx Employee
1,956 Views
Registered: ‎10-04-2016

Re: Ultrascale+ AXI DMA loopback test

Jump to solution

Hi @pharbanau,

Please see the solution posted to this Forums thread:

https://forums.xilinx.com/t5/Embedded-Linux/AXI-DMA-test-error-zcu102-ES2-Petalinux-2017-4/td-p/825257/highlight/true/page/2

 

Regards,

 

Deanna

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
5 Replies
Participant pharbanau
Participant
1,734 Views
Registered: ‎12-20-2016

Re: Ultrascale+ AXI DMA loopback test

Jump to solution

I also attach my Linux kernel .config file, devicetree .dts (built as well by petalinux-tools), and hardware description files.

I have used standart petalinux flow (create project, get-hw-description, build). In config menu I set primary SD to boot BOOT.BIN, kernel image (Image), dtb image (system.dtb), at the end I extracted rootfs.ext4 into second partition of sd-card.

 

To buld BOOT.BIN, though, I didn't use u-boot.elf built by petalinux, but instead I have compiled it from scratch (with standart one I always receive messages like  MMC:   sdhci@ff170000 - probe failed: -70 and this behaviour is quite erratic because sometimes I can probe sdhci by playing with mmc command in u-boot shell).

 

Now I'm going to try Vivado and Petalinux of version 2017.4

 

Pavel

0 Kudos
Participant pharbanau
Participant
1,713 Views
Registered: ‎12-20-2016

Re: Ultrascale+ AXI DMA loopback test

Jump to solution

Ok, I resolved my problem by upgrading to 2017.4. 

 

But new problem has occured: axidmatest shows that rx data are always 0. I see messages like this:

...

dma16chan0-dma1: dstbuf[0x0] mismatch! Expected 1f, got 00

...

This issue was already reported on forum

https://forums.xilinx.com/t5/Embedded-Linux/AXI-DMA-test-error-zcu102-ES2-Petalinux-2017-4/td-p/825257

https://forums.xilinx.com/t5/Embedded-Linux/AXI-DMA-test-failure/td-p/805245

 

Is there any solution for Vivado and Petalinux 2017.4? It would be nice as well if anyone can explain what is going wrong with received data (always 0).

 

Pavel

0 Kudos
Participant pharbanau
Participant
1,690 Views
Registered: ‎12-20-2016

Re: Ultrascale+ AXI DMA loopback test

Jump to solution

In Hardware manager I tried to debug S2MM channel signals and S_AXI_HP_FPD bus signals (which is connected to Master port of AXI SmartConnect). Below are pictures of these signals.

1) S2MM signals

s2mm_channel.png

 

2) S_AXI_HP_FPD signals

axi_hp0_bus.png

 

The output from axidmatest is like this:

[    2.739209] dmatest: Started 1 threads using dma1chan0 dma1chan1
[    2.742210] dma1chan0-dma1c: dstbuf[0x0] mismatch! Expected 1f, got 00
[    2.742213] dma1chan0-dma1c: dstbuf[0x1] mismatch! Expected 1e, got 00
[    2.742215] dma1chan0-dma1c: dstbuf[0x2] mismatch! Expected 1d, got 00
[    2.742217] dma1chan0-dma1c: dstbuf[0x3] mismatch! Expected 1c, got 00
[    2.742219] dma1chan0-dma1c: dstbuf[0x4] mismatch! Expected 1b, got 00
[    2.742221] dma1chan0-dma1c: dstbuf[0x5] mismatch! Expected 1a, got 00
....

The screenshots above clearly show that data are being transmitted by DMA, so the issue is either in Processing System IP or in software (might be related to cache configuration, or CMA region config, or IOMMU configuration (which is by default disabled in device-tree)...

 

Any suggestions? Thanks.

 

 

0 Kudos
Xilinx Employee
Xilinx Employee
1,957 Views
Registered: ‎10-04-2016

Re: Ultrascale+ AXI DMA loopback test

Jump to solution

Hi @pharbanau,

Please see the solution posted to this Forums thread:

https://forums.xilinx.com/t5/Embedded-Linux/AXI-DMA-test-error-zcu102-ES2-Petalinux-2017-4/td-p/825257/highlight/true/page/2

 

Regards,

 

Deanna

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Participant pharbanau
Participant
1,580 Views
Registered: ‎12-20-2016

Re: Ultrascale+ AXI DMA loopback test

Jump to solution

Perfect, it works. Thank you so much for help!

 

 

0 Kudos