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: 
Visitor cemalakarsu
Visitor
9,919 Views
Registered: ‎03-23-2010

xilinx_axidma.c modprobe error

Hello everybody;

 

I am using zedbeord with petalinux. What i try to do is using AXI DMA Stream between PS and PL. However, at the beginning i couldnot load the module.


When i do modprobe xilinx_axidma.ko i get the following error at the dma reset function:

 

Unhandled fault: imprecise external abort (0x406) at 0xbf000000
Internal error: : 406 [#1] PREEMPT SMP ARM
Modules linked in: xilinx_axidma(+)
CPU: 0 Not tainted (3.8.11 #19)
PC is at dma_reset+0x1c/0x4c [xilinx_axidma]
LR is at xilinx_dma_probe+0x28c/0x420 [xilinx_axidma]
pc : [<bf00001c>] lr : [<bf000370>] psr: 20000013
sp : dfbffce0 ip : dfbffcf8 fp : dfbffcf4
r10: ddb8f910 r9 : 00000003 r8 : c1cf3fcc
r7 : df89c210 r6 : c1cf40d0 r5 : 00000000 r4 : ddb8f910
r3 : e0ca0000 r2 : 00100001 r1 : 00000000 r0 : ddb8f910
Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
Control: 18c5387d Table: 1d40804a DAC: 00000015
Process insmod (pid: 805, stack limit = 0xdfbfe238)
Stack: (0xdfbffce0 to 0xdfc00000)
fce0: ddb8f850 00000000 dfbffd44 dfbffcf8 bf000370 bf00000c df8ddc48 00000000
fd00: df89c210 df89c218 00000000 ddb8f860 00000000 00000020 dfbffd34 df89c210
fd20: df89c244 bf0015a4 c01c90d0 bf00162c 00000000 bf003000 dfbffd54 dfbffd48
fd40: c01ca078 bf0000f0 dfbffd74 dfbffd58 c01c8f84 c01ca068 00000000 df89c210
fd60: df89c244 bf0015a4 dfbffd94 dfbffd78 c01c9140 c01c8ee8 00000000 00000000
fd80: dfbffd98 bf0015a4 dfbffdbc dfbffd98 c01c75f0 c01c90dc df85a618 df898574
fda0: bf0015a4 ddbf19c0 c18c21a0 00000000 dfbffdcc dfbffdc0 c01c8ae4 c01c75a0
fdc0: dfbffdfc dfbffdd0 c01c8698 c01c8ad0 bf001560 00000001 dfbffdfc bf0015a4
fde0: dfbfff48 00000000 00000001 bf00162c dfbffe24 dfbffe00 c01c9444 c01c85d0
fe00: bf0015e4 dfbfff48 00000000 00000001 bf00162c bf003000 dfbffe34 dfbffe28
fe20: c01ca1ec c01c93ac dfbffe44 dfbffe38 bf003014 c01ca1ac dfbffe84 dfbffe48
fe40: c000865c bf00300c dfbffe74 bf0015e4 dfbfff48 00000000 00000001 bf0015e4
fe60: dfbfff48 00000000 00000001 bf00162c 00000001 df92ccc0 dfbfff44 dfbffe88
fe80: c005b314 c00085cc bf0015f0 00007fff c0057d84 00000003 000002d2 00000000
fea0: 0000001c 000a3008 dfbffed4 c036e048 e0c92cd2 00000077 bf00170c bf0015f0
fec0: dfbfff0c dfbffed0 c008cf4c c008b378 ff000000 000000d2 c005b5fc 00000000
fee0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
ff00: 00000000 00000000 00000000 00000000 00000000 00000000 ffffffff 000a3018
ff20: 00002ce7 000a3008 00000080 c000e1c4 dfbfe000 00000000 dfbfffa4 dfbfff48
ff40: c005b678 c0059b08 e0c90000 00002ce7 e0c91974 e0c918a5 e0c927a4 00001720
ff60: 00001a90 00000000 00000000 00000000 00000014 00000015 0000000c 00000000
ff80: 00000008 00000000 c0010fc4 00002ce7 beff7ed6 0009a53f 00000000 dfbfffa8
ffa0: c000e040 c005b5bc 00002ce7 beff7ed6 000a3018 00002ce7 000a3008 000a07c4
ffc0: 00002ce7 beff7ed6 0009a53f 00000080 0000017d beff7de4 00000002 00000000
ffe0: beff7c10 beff7c00 00015894 b6eb4850 60000010 000a3018 00077588 00100008
Backtrace: 
[<bf000000>] (dma_reset+0x0/0x4c [xilinx_axidma]) from [<bf000370>] (xilinx_dma_probe+0x28c/0x420 [xilinx_axidma])
r5:00000000 r4:ddb8f850
[<bf0000e4>] (xilinx_dma_probe+0x0/0x420 [xilinx_axidma]) from [<c01ca078>] (platform_drv_probe+0x1c/0x20)
[<c01ca05c>] (platform_drv_probe+0x0/0x20) from [<c01c8f84>] (driver_probe_device+0xa8/0x1f4)
[<c01c8edc>] (driver_probe_device+0x0/0x1f4) from [<c01c9140>] (__driver_attach+0x70/0x94)
r6:bf0015a4 r5:df89c244 r4:df89c210 r3:00000000
[<c01c90d0>] (__driver_attach+0x0/0x94) from [<c01c75f0>] (bus_for_each_dev+0x5c/0x98)
r6:bf0015a4 r5:dfbffd98 r4:00000000 r3:00000000
[<c01c7594>] (bus_for_each_dev+0x0/0x98) from [<c01c8ae4>] (driver_attach+0x20/0x28)
r7:00000000 r6:c18c21a0 r5:ddbf19c0 r4:bf0015a4
[<c01c8ac4>] (driver_attach+0x0/0x28) from [<c01c8698>] (bus_add_driver+0xd4/0x228)
[<c01c85c4>] (bus_add_driver+0x0/0x228) from [<c01c9444>] (driver_register+0xa4/0x134)
r8:bf00162c r7:00000001 r6:00000000 r5:dfbfff48 r4:bf0015a4
[<c01c93a0>] (driver_register+0x0/0x134) from [<c01ca1ec>] (platform_driver_register+0x4c/0x60)
[<c01ca1a0>] (platform_driver_register+0x0/0x60) from [<bf003014>] (xilinx_dma_driver_init+0x14/0x1c [xilinx_axidma])
[<bf003000>] (xilinx_dma_driver_init+0x0/0x1c [xilinx_axidma]) from [<c000865c>] (do_one_initcall+0x9c/0x16c)
[<c00085c0>] (do_one_initcall+0x0/0x16c) from [<c005b314>] (load_module+0x1818/0x1ab4)
[<c0059afc>] (load_module+0x0/0x1ab4) from [<c005b678>] (sys_init_module+0xc8/0xe0)
[<c005b5b0>] (sys_init_module+0x0/0xe0) from [<c000e040>] (ret_fast_syscall+0x0/0x30)
r6:0009a53f r5:beff7ed6 r4:00002ce7
Code: e5903000 e1a04000 e5935000 f57ff04f (e3855004) 
---[ end trace 63160d1758e777bd ]---
Segmentation fault

 

When i examined the code step by step, i found out that error is getting at the dma_read function in the dma_reset. I added the .dts file also. 

 

Furhtermore when i look at the /proc/iomem i see that the axidma is registered btw the correct address.

 

So help me!!!

 

Best Regards

0 Kudos
19 Replies
Xilinx Employee
Xilinx Employee
9,907 Views
Registered: ‎09-10-2008

Re: xilinx_axidma.c modprobe error

Are you confident the PL got loaded with the bitstream (the DONE LED is on)? You could also try to use devmem from the command line to peek and poke at the h/w if you take the driver out of the kernel and then let it boot up into Linux.

 

If you have any issue in Linux then you should step back and make sure the h/w is working in a simpler way such as a standalone app in the SDK, or using XMD to peek/poke.

 

I'm using AXI DMA myself but am on a newer kernel, 3.14.2, as I'm using the 2014.2 release.

 

You're likely to get more and better help if you don't appear as demanding ("help me!!!") as it's a community, not tech support. I realize it may not have been your intention and that's why I was explaining.

 

Thanks

John

0 Kudos
Visitor cemalakarsu
Visitor
9,890 Views
Registered: ‎03-23-2010

Re: xilinx_axidma.c modprobe error

Hello Linnj;

 

- FPGA Done LED is on, so i am confident that bitstream is loaded.

- Then i was tried devmem but it turns me : 

 

devmem 0x40400000  (by the way 0x40400000 is the address at the .dts file)

 

Before module  loaded :

Unhandled fault: external abort on non-linefetch (0x018) at 0xb6ffa000
Bus error

 

After module loaded : 

Unhandled fault: external abort on non-linefetch (0x018) at 0xb6f13000
Bus error

 

-Today i hope i am going to try baremetal application.

 

Yeah my intention is not that helping me is your obligatory issue, i am demaning help because the problem remained unsolved on linux side no matter i have tried many different solution.

 

If you have a comment about devmem error, it would be appreciated

 

Best Regards 

0 Kudos
Visitor cemalakarsu
Visitor
9,881 Views
Registered: ‎03-23-2010

Re: xilinx_axidma.c modprobe error

We tried baremetal application and it is working. But the problem with the linux didnt change : 

 

Unhandled fault: imprecise external abort (0x406) at 0xbf000000
Internal error: : 406 [#1] PREEMPT SMP ARM

Best Regards

0 Kudos
Xilinx Employee
Xilinx Employee
9,866 Views
Registered: ‎09-10-2008

Re: xilinx_axidma.c modprobe error

Hi,

 

Can you provide more details about what kernel and version of Petalinux you are using (or I missed it if you did already)?

 

The device tree generator looks to be quite old if I'm reading it right,  * Version: Xilinx EDK 14.4 EDK_P.49d".

 

Thanks

John

 

0 Kudos
Xilinx Employee
Xilinx Employee
9,863 Views
Registered: ‎09-10-2008

Re: xilinx_axidma.c modprobe error

If you are not using the PS DMA you might take it out of the device tree just to make sure there is nothing going on between the DMA but I doubt it's an issue. Sometimes isolating the system down some is helpful.

ps7_dma_s: ps7-dma@f8003000
0 Kudos
Visitor cemalakarsu
Visitor
9,862 Views
Registered: ‎03-23-2010

Re: xilinx_axidma.c modprobe error

Hi,

Petalinux version 2013.10,
uname -a :
Linux Xilinx-ZC702-2013_3 3.8.11 #19 SMP PREEMPT Wed Oct 1 15:24:14 EEST 2014 armv7l GNU/Linux

Thanks for your interest

Cemal
0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
9,853 Views
Registered: ‎09-10-2008

Re: xilinx_axidma.c modprobe error

That's definitely an older version of the kernel than I'm using now as we've been on 3.14 for a while.

Again, I don't know this is a problem, but it's another thing to consider as others including myself are using it in Linux successfully.

I was relooking at your other post. If you are not using SG then you should turn it off in the h/w build especially if you are not connecting some signals.

I can't explain why it would work in standalone but not in Linux other than the fact that it's a different driver.

Thanks
John
0 Kudos
Xilinx Employee
Xilinx Employee
9,852 Views
Registered: ‎09-10-2008

Re: xilinx_axidma.c modprobe error

Did you try the devmem without trying to load the module as that was not clear to me with your post?
0 Kudos
Visitor cemalakarsu
Visitor
9,852 Views
Registered: ‎03-23-2010

Re: xilinx_axidma.c modprobe error

By the way i should point out some more infos : 

 

root@Xilinx-ZC702-2013_3:~# cat /proc/iomem 
00000000-1fffffff : System RAM
  00008000-004f4fd3 : Kernel code
  00bda000-00c236ef : Kernel data
40400000-4040ffff : /amba@0/axidma@40400000
e0001000-e0001ffe : xuartps
e0002000-e0002fff : /amba@0/ps7-usb@e0002000
  e0002000-e0002fff : e0002000.ps7-usb
e000a000-e000afff : e000a000.ps7-gpio
e000d000-e000dfff : e000d000.ps7-qspi
e0100000-e0100fff : mmc0
f8003000-f8003fff : /amba@0/ps7-dma@f8003000
  f8003000-f8003fff : dma-pl330
f8007000-f80070ff : xdevcfg
f8007100-f800711f : f8007100.ps7-xadc

 as you can see axidma is in the system

 

lsmod
    Tainted: G  
xilinx_axidma 12083 1 - Loading 0xbf000000

 

But driver is still loading.

 

And if i include the xilinx_axidma.ko driver into kernel instead of modprobe it (making * instead of M at the kernel config) result is below : 

 

 

jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
msgmni has been set to 990
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
dma-pl330 f8003000.ps7-dma: Loaded driver for PL330 DMAC-267056
dma-pl330 f8003000.ps7-dma: 	DBUFF-128x8bytes Num_Chans-8 Num_Peri-4 Num_Events-16
Xilinx DMA CHAN PROBE
Xilinx DMA RESET
Xilinx DMA CHAN PROBE
Xilinx DMA RESET
xilinx-dma 40400000.axidma: Probing xilinx axi dma engine...Successful
e0001000.serial: ttyPS0 at MMIO 0xe0001000 (irq = 82) is a xuartps
console [ttyPS0] enabled
xdevcfg f8007000.ps7-dev-cfg: ioremap f8007000 to e08ba000 with size 100
st: Version 20101219, fixed bufsize 32768, s/g segs 256
osst :I: Tape driver with OnStream support version 0.99.4
osst :I: $Id: osst.c,v 1.73 2005/01/01 21:13:34 wriede Exp $
SCSI Media Changer driver v0.25 
xqspips e000d000.ps7-qspi: master is unqueued, this is deprecated
m25p80 spi32766.0: found s25fl256s1, expected m25p80
m25p80 spi32766.0: fallback to 3-byte address mode
m25p80 spi32766.0: maximum accessible size is 16MB
m25p80 spi32766.0: s25fl256s1 (32768 Kbytes)
4 ofpart partitions found on MTD device spi32766.0
Creating 4 MTD partitions on "spi32766.0":
0x000000000000-0x000000500000 : "boot"
0x000000500000-0x000000520000 : "bootenv"
0x000000520000-0x000000fa0000 : "image"
0x000000fa0000-0x000002000000 : "spare"
xqspips e000d000.ps7-qspi: at 0xE000D000 mapped to 0xE08BC000, irq=51
libphy: XEMACPS mii bus: probed
xemacps e000b000.ps7-ethernet: pdev->id -1, baseaddr 0xe000b000, irq 54
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ULPI transceiver vendor/product ID 0x0451/0x1507
Found TI TUSB1210 ULPI transceiver.
ULPI integrity check: passed.
xusbps-ehci xusbps-ehci.0: Xilinx PS USB EHCI Host Controller
xusbps-ehci xusbps-ehci.0: new USB bus registered, assigned bus number 1
xusbps-ehci xusbps-ehci.0: irq 53, io mem 0x00000000
xusbps-ehci xusbps-ehci.0: USB 2.0 started, EHCI 1.00
usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: Xilinx PS USB EHCI Host Controller
usb usb1: Manufacturer: Linux 3.8.11 ehci_hcd
usb usb1: SerialNumber: xusbps-ehci.0
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
i2c /dev entries driver
xadcps f8007100.ps7-xadc: enabled:	yes	reference:	external
xwdtps f8005000.ps7-wdt: Xilinx Watchdog Timer at e08da000 with timeout 10s
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
sdhci-pltfm: SDHCI platform and OF driver helper
mmc0: SDHCI controller on e0100000.ps7-sdio [e0100000.ps7-sdio] using ADMA
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
TCP: cubic registered
NET: Registered protocol family 10
sit: IPv6 over IPv4 tunneling driver
NET: Registered protocol family 17
NET: Registered protocol family 40
VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
Registering SWP/SWPB emulation handler
dmatest: tx match is 100001
Xilinx DMA ALLOC CHAN RESOURCES
dmatest: rx match is 100002
Xilinx DMA ALLOC CHAN RESOURCES
dmatest: Started 1 threads using dma1chan0 dma1chan1
Xilinx DMA DEVICE CONTROL
Unhandled fault: imprecise external abort (0x406) at 0xb6f85f50
Internal error: : 406 [#1] PREEMPT SMP ARM
Modules linked in:
CPU: 1    Not tainted  (3.8.11 #22)
PC is at xilinx_dma_device_control+0x88/0xec
LR is at vprintk_emit+0x420/0x4b4
pc : [<c019ed00>]    lr : [<c001e2dc>]    psr: 60000013
sp : de9cfc58  ip : de9cfbd0  fp : de9cfc74
r10: 00000001  r9 : 00000000  r8 : 0000000b
r7 : de9cff00  r6 : 00000003  r5 : 00000000  r4 : dfb47db4
r3 : e08c0030  r2 : 00000000  r1 : 60000013  r0 : 00000019
Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
Control: 18c5387d  Table: 1eff004a  DAC: 00000015
Process dma1chan0-dma1c (pid: 570, stack limit = 0xde9ce238)
Stack: (0xde9cfc58 to 0xde9d0000)
fc40:                                                       defb9300 00000000
fc60: 0000002c 00000000 de9cff5c de9cfc78 c019fea4 c019ec84 00000002 00000000
fc80: 87654321 00000000 00000000 000000c1 1fb51c0a 87654321 00000000 00000000
fca0: 000000c1 1fb5180a 87654321 00000000 00000000 000000c1 1fb5140a 87654321
fcc0: 00000000 00000000 000000c1 1fb5100a 87654321 00000000 00000000 000000c1
fce0: 1fb52c0a 87654321 00000000 00000000 000000c1 1fb5280a 87654321 00000000
fd00: 00000000 000000c1 1fb5240a 87654321 00000000 00000000 000000c1 1fb5200a
fd20: 87654321 00000000 00000000 000000c1 1fb53c0a 87654321 00000000 00000000
fd40: 000000c1 1fb5380a 87654321 00000002 00000000 000000c1 1fb5340a 00000000
fd60: 87654321 00000000 00000000 000000c1 1f8ad8d0 87654321 00000000 00000000
fd80: 000000c1 1f8ad4d0 87654321 00000000 00000000 000000c1 1f8ad0d0 87654321
fda0: 00000000 00000000 000000c1 1fb4ecd0 87654321 00000000 00000000 000000c1
fdc0: 1fb4e8d0 87654321 00000000 00000000 000000c1 1fb4e4d0 87654321 00000000
fde0: 00000000 000000c1 1fb4e0d0 87654321 00000000 00000000 000000c1 1fb4acd0
fe00: 87654321 00000000 00000000 000000c1 1fb4a8d0 87654321 00000000 00000000
fe20: 000000c1 1fb4a4d0 87654321 00000002 00000000 000000c1 1fb4a0d0 de9cfe48
fe40: 1fb51c00 1fb51800 1fb51400 1fb51000 1fb52c00 1fb52800 1fb52400 1fb52000
fe60: 1fb53c00 1fb53800 1fb53400 c0363cb8 1f8ad8d0 1f8ad4d0 1f8ad0d0 1fb4ecd0
fe80: 1fb4e8d0 1fb4e4d0 1fb4e0d0 1fb4acd0 1fb4a8d0 1fb4a4d0 1fb4a0d0 00000000
fea0: de9cfed4 de9cfeb0 de9cff24 de9cff14 00000bb8 00007530 00000001 de9cfe98
fec0: de9cfc80 de9cfd60 de9cfe70 de9cfe40 dfb47f18 dfb47db4 dfb47e74 df9e4b98
fee0: dfb47f18 0000000a 000000d0 000000c1 7c174736 c0363d18 ffffffff c0bd8380
ff00: df9e49c0 00000001 00000000 de9cff18 c0362d40 c0040498 c019f888 c0bd8380
ff20: 00000000 df861e88 00000000 defb9300 c019f888 df861e88 00000000 defb9300
ff40: c019f888 00000000 00000000 00000000 de9cffac de9cff60 c00378fc c019f894
ff60: ffffffff 00000000 de9cff94 defb9300 00000000 00000000 de9cff78 de9cff78
ff80: 00000000 00000000 de9cff88 de9cff88 df861e88 c0037848 00000000 00000000
ffa0: 00000000 de9cffb0 c000e0d8 c0037854 00000000 00000000 00000000 00000000
ffc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
ffe0: 00000000 00000000 00000000 00000000 00000013 00000000 00104001 00002020
Backtrace: 
[<c019ec78>] (xilinx_dma_device_control+0x0/0xec) from [<c019fea4>] (dmatest_slave_func+0x61c/0xc40)
 r7:00000000 r6:0000002c r5:00000000 r4:defb9300
[<c019f888>] (dmatest_slave_func+0x0/0xc40) from [<c00378fc>] (kthread+0xb4/0xc4)
[<c0037848>] (kthread+0x0/0xc4) from [<c000e0d8>] (ret_from_fork+0x14/0x3c)
 r7:00000000 r6:00000000 r5:c0037848 r4:df861e88
Code: 1a000017 e5143024 e5935000 f57ff04f (e5973004) 
---[ end trace e049344641891bbf ]---
Freeing init memory: 7036K
mmc0: new high speed SDHC card at address 0007
�h�,+R��/�Eѕ��ѕ���Z���J���*��э����‚������TUstoppingxb6fa7888
h�����2�B"յ�}�����Ʌ����z�‚2ɽ���*���B"յ�}�х�����z���������҂��������҂��������Ҳ�����ʚh���*���B"յ�}�х����z��2ɽ������BJ��}���}�ѽ��¢z�‚JDh��������BJ��}���}�ѽ���z�‚J2ɽ��������BB�����}%A%�¢z�¢J��
                                      ��������Dh������BB�����}%A%��z�¢J2ɽ���ª���B:��}������}��ł‚z���J�"������22����h���¢�B:��}������}��ł�z���J2ɽ���"���B��}�ٍ�����"���ѥ���х���‘�������‘����JD��&               c1033a18 00000000 00000003 00000000 df87a000 c0367568
        ��’"�������
                       ���2�ʂ��������"�����"����"����&H4 c000eb68 60000113 ffffffff
��*�B"���ձ�}������z�¢J2ɽ���*���B��}�����‚z�‘�Bh���*���B��}������z�‘�2ɽ������B���������}�х��}��ɹ���‚�š�J҂�������������Dh������B���������}�х��}��ɹ����z�š�J2ɽ��������B�ª��JҊ��º"�҂��������Ҋ2����
                                          ������WV--+RV�������$�Z�\YSDHC card at address 0007
Unhandled fault: imprecise external abort (0x406) at 0xb6fa7888
Kernel panic - not syncing: Attempted to kill init! exit

 

0 Kudos
Visitor cemalakarsu
Visitor
9,601 Views
Registered: ‎03-23-2010

Re: xilinx_axidma.c modprobe error

Yes i tried. Result is :

root@Xilinx-ZC702-2013_3:~# devmem 0x40400000
/dev/mem opened.
Memory mapped at address 0xb6f0e000.
Unhandled fault: external abort on non-linefetch (0x018) at 0xb6f0e000
Bus error
root@Xilinx-ZC702-2013_3:~#
0 Kudos
Xilinx Employee
Xilinx Employee
9,600 Views
Registered: ‎09-10-2008

Re: xilinx_axidma.c modprobe error

Can you take out the PS DMA in the device tree like I suggested and turn off the DMA test for the AXI DMA in the kernel configuration so we can see what it does?

Also, do you have any other IP cores in the PL that are being used succesfully? I'm trying to figure out if there could be a clocking issue with the PL? I don't see the issue we ran into the other day (fclk=<0>) in another thread with the newer kernel, but don't want to ignore the possibility.

Thanks
John
0 Kudos
Visitor cemalakarsu
Visitor
9,596 Views
Registered: ‎03-23-2010

Re: xilinx_axidma.c modprobe error

I disable PS DMA in the device tree and result is the same. I also added the device tree i disabled PS DMA, maybe i do something wrong.

 

About clocking issue i read that post before i open this issue. We checked we only use fclk_0.  

 

We dont have other IP cores in the PL. We can add more IP but how it affects the result ?

 

I also checked the LVL_SHFT_EN register with the devmem 0xf8000900 it turns 0xF (enable) result.

 

root@Xilinx-ZC702-2013_3:~# devmem 0x40400000
/dev/mem opened.
Memory mapped at address 0xb6fe4000.
Unhandled fault: external abort on non-linefetch (0x018) at 0xb6fe4000
Bus error
root@Xilinx-ZC702-2013_3:~# modprobe xilinx_axidma
Xilinx DMA CHAN PROBE
Xilinx DMA RESET
Unhandled fault: imprecise external abort (0x406) at 0xbf000000
Internal error: : 406 [#1] PREEMPT SMP ARM
Modules linked in: xilinx_axidma(+)
CPU: 0    Not tainted  (3.8.11 #26)
PC is at dma_reset+0x24/0xcc [xilinx_axidma]
LR is at console_unlock+0x324/0x338
pc : [<bf0009f0>]    lr : [<c001dd70>]    psr: 60000013
sp : de82dce0  ip : de82dc08  fp : de82dcf4
r10: defbe6d0  r9 : 00000003  r8 : c101ffcc
r7 : df89c210  r6 : c10200b8  r5 : 00000000  r4 : defbe6d0
r3 : e08e0000  r2 : c0be2bc4  r1 : 60000013  r0 : 00000010
Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
Control: 18c5387d  Table: 1f03804a  DAC: 00000015
Process modprobe (pid: 794, stack limit = 0xde82c238)
Stack: (0xde82dce0 to 0xde82e000)
dce0: defbed90 00000000 de82dd44 de82dcf8 bf000d2c bf0009d8 df8e2c48 00000000
dd00: df89c210 df89c218 00000000 defbeda0 00000000 00000020 de82dd34 df89c210
dd20: df89c244 bf0019a0 c01bf7e8 bf001a28 00000000 bf004000 de82dd54 de82dd48
dd40: c01c0790 bf000aa4 de82dd74 de82dd58 c01bf69c c01c0780 00000000 df89c210
dd60: df89c244 bf0019a0 de82dd94 de82dd78 c01bf858 c01bf600 00000000 00000000
dd80: de82dd98 bf0019a0 de82ddbc de82dd98 c01bdd08 c01bf7f4 df85a618 df898674
dda0: bf0019a0 de8377c0 c0bee050 00000000 de82ddcc de82ddc0 c01bf1fc c01bdcb8
ddc0: de82ddfc de82ddd0 c01bedb0 c01bf1e8 bf00195c 00000001 de82ddfc bf0019a0
dde0: de82df48 00000000 00000001 bf001a28 de82de24 de82de00 c01bfb5c c01bece8
de00: bf0019e0 de82df48 00000000 00000001 bf001a28 bf004000 de82de34 de82de28
de20: c01c0904 c01bfac4 de82de44 de82de38 bf004014 c01c08c4 de82de84 de82de48
de40: c000865c bf00400c de82de74 bf0019e0 de82df48 00000000 00000001 bf0019e0
de60: de82df48 00000000 00000001 bf001a28 00000001 defec340 de82df44 de82de88
de80: c005b314 c00085cc bf0019ec 00007fff c0057d84 00000004 000002d2 00000000
dea0: 0000001c 000a35d0 de82ded4 c0364048 e08cf2f6 00000081 bf001b08 bf0019ec
dec0: de82df0c de82ded0 c008cf4c c008b378 ff000000 000000d2 c005b5fc 00000000
dee0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
df00: 00000000 00000000 00000000 00000000 00000000 00000000 ffffffff 000a3738
df20: 0000330b 000a35d0 00000080 c000e1c4 de82c000 00000000 de82dfa4 de82df48
df40: c005b678 c0059b08 e08cc000 0000330b e08cdd70 e08cdca1 e08cedc8 00001b1c
df60: 00001f2c 00000000 00000000 00000000 00000014 00000015 0000000c 00000000
df80: 00000008 00000000 c0010fc4 0000330b 000a3718 000a35d0 00000000 de82dfa8
dfa0: c000e040 c005b5bc 0000330b 000a3718 000a3738 0000330b 000a35d0 000a35e0
dfc0: 0000330b 000a3718 000a35d0 00000080 0000000d 00000000 000a29d4 000a374e
dfe0: bef0aaf0 bef0aae0 00015894 b6f58850 600f0010 000a3738 00000000 00000000
Backtrace: 
[<bf0009cc>] (dma_reset+0x0/0xcc [xilinx_axidma]) from [<bf000d2c>] (xilinx_dma_probe+0x294/0x42c [xilinx_axidma])
 r5:00000000 r4:defbed90
[<bf000a98>] (xilinx_dma_probe+0x0/0x42c [xilinx_axidma]) from [<c01c0790>] (platform_drv_probe+0x1c/0x20)
[<c01c0774>] (platform_drv_probe+0x0/0x20) from [<c01bf69c>] (driver_probe_device+0xa8/0x1f4)
[<c01bf5f4>] (driver_probe_device+0x0/0x1f4) from [<c01bf858>] (__driver_attach+0x70/0x94)
 r6:bf0019a0 r5:df89c244 r4:df89c210 r3:00000000
[<c01bf7e8>] (__driver_attach+0x0/0x94) from [<c01bdd08>] (bus_for_each_dev+0x5c/0x98)
 r6:bf0019a0 r5:de82dd98 r4:00000000 r3:00000000
[<c01bdcac>] (bus_for_each_dev+0x0/0x98) from [<c01bf1fc>] (driver_attach+0x20/0x28)
 r7:00000000 r6:c0bee050 r5:de8377c0 r4:bf0019a0
[<c01bf1dc>] (driver_attach+0x0/0x28) from [<c01bedb0>] (bus_add_driver+0xd4/0x228)
[<c01becdc>] (bus_add_driver+0x0/0x228) from [<c01bfb5c>] (driver_register+0xa4/0x134)
 r8:bf001a28 r7:00000001 r6:00000000 r5:de82df48 r4:bf0019a0
[<c01bfab8>] (driver_register+0x0/0x134) from [<c01c0904>] (platform_driver_register+0x4c/0x60)
[<c01c08b8>] (platform_driver_register+0x0/0x60) from [<bf004014>] (xilinx_dma_driver_init+0x14/0x1c [xilinx_axidma])
[<bf004000>] (xilinx_dma_driver_init+0x0/0x1c [xilinx_axidma]) from [<c000865c>] (do_one_initcall+0x9c/0x16c)
[<c00085c0>] (do_one_initcall+0x0/0x16c) from [<c005b314>] (load_module+0x1818/0x1ab4)
[<c0059afc>] (load_module+0x0/0x1ab4) from [<c005b678>] (sys_init_module+0xc8/0xe0)
[<c005b5b0>] (sys_init_module+0x0/0xe0) from [<c000e040>] (ret_fast_syscall+0x0/0x30)
 r6:000a35d0 r5:000a3718 r4:0000330b
Code: eb4d63a1 e5943000 e5935000 f57ff04f (e3855004) 
---[ end trace f9a255e6e4ee9e68 ]---
Segmentation fault
root@Xilinx-ZC702-2013_3:~# devmem 0x40400000
/dev/mem opened.
Memory mapped at address 0xb6f77000.
Unhandled fault: external abort on non-linefetch (0x018) at 0xb6f77000
Bus error
root@Xilinx-ZC702-2013_3:~# 

 

0 Kudos
Xilinx Employee
Xilinx Employee
9,590 Views
Registered: ‎09-10-2008

Re: xilinx_axidma.c modprobe error

what standalone tests did you run and did you run?
You can also do a read of that device from u-boot to see if it's ok before Linux is up assuming you are using FSBL to load the bitstream. In u-boot you can use help to get the command to display memory, but only dump a word or two as otherwise it dumps a lot and causes other issues.
0 Kudos
Visitor cemalakarsu
Visitor
9,578 Views
Registered: ‎03-23-2010

Re: xilinx_axidma.c modprobe error

Hello John;

 

Is this what you want ???

 

U-Boot-PetaLinux> md 0x40400000 4       
40400000:data abort

    MAYBE you should read doc/README.arm-unaligned-accesses

pc : [<1ffa3494>]	   lr : [<1ffa346c>]
sp : 1fb64d90  ip : 40400000	 fp : 00000008
r10: 40400000  r9 : 40400000	 r8 : 1fb64f48
r7 : 00000004  r6 : 00000004	 r5 : 00000004  r4 : 00000004
r3 : 00000000  r2 : 00000802	 r1 : 1fb64da4  r0 : 00000009
Flags: nZCv  IRQs off  FIQs off  Mode SVC_32
Resetting CPU ...

 

0 Kudos
Xilinx Employee
Xilinx Employee
9,576 Views
Registered: ‎09-10-2008

Re: xilinx_axidma.c modprobe error

Yes, that shows it's not a Linux issue, but a system issue as it does not work in u-boot either. I'm assuming the DONE LED was on and the bitstream was loaded when you did this.
0 Kudos
Visitor cemalakarsu
Visitor
9,570 Views
Registered: ‎03-23-2010

Re: xilinx_axidma.c modprobe error

Yes FPGA done LED is on and bitstream was loaded. 

 

So, what do you mean by system issue ? Could you explain it more, so i can check the correct configurations.

And how the baremetal application is working if it is a system issue. We connect TLAST and TVALID signals to the LED and both of them are lighting up.

0 Kudos
Xilinx Employee
Xilinx Employee
9,564 Views
Registered: ‎09-10-2008

Re: xilinx_axidma.c modprobe error

Did you run the standalone app in the debugger or put it in the boot.bin? Just trying to see if there's something different in the process.

I'm just thinking PL is either in reset, level shifters not setup, or clock not on as the usual symptoms.
0 Kudos
Visitor cemalakarsu
Visitor
9,547 Views
Registered: ‎03-23-2010

Re: xilinx_axidma.c modprobe error

At the baremetal application, There is one more FPGA module that is connected to AXI DMA's PL side. TLAST and TVALID signals are going to FPGA that module and this module triggers the LEDs. Therefore, clocking is working properlyi n the PL side and PL cannot be at reset
0 Kudos
Xilinx Employee
Xilinx Employee
9,525 Views
Registered: ‎09-10-2008

Re: xilinx_axidma.c modprobe error

I realize this sounds crazy, but you did verify the address is correct for the device between standalone and Linux?

If you ran standalone in the debugger you could always run it then load the u-boot.elf and try that u-boot test again.
0 Kudos