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: 
Highlighted
Visitor tru_work
Visitor
9,884 Views
Registered: ‎11-05-2013

AC701 Base TRD drivers in 64-bit Linux

Hello,

 

we are trying to use the XDMA driver from the a7_base_trd (UG964, v1.0) with a custom kernel.

It seems, the driver works only with the Fedora 16 Live CD (32-Bit). On all other linux kernels we tried (64-Bit) we have the following problem (after building the kernel module from the sources supplied by Xilinx):

 

We get the following kernel crash on insmod ./xdma_a7.ko:

[   53.269668] XDMA: Inserting Xilinx base DMA driver in kernel.
[   53.269716] xdma_driver 0000:20:00.0: setting latency timer to 64
[   53.269756] BUG: unable to handle kernel paging request at 00000000058a0000
[   53.269811] IP: [<ffffffffa04aa7df>] xdma_probe+0x2b2/0x571 [xdma_a7]
[   53.269860] PGD 0 
[   53.269876] Oops: 0000 [#1] SMP 
[   53.269902] CPU 0 
[   53.269916] Modules linked in: xdma_a7(O+) bnep rfcomm bluetooth binfmt_misc nfsd nfs nfs_acl auth_rpcgss fscache lockd sunrpc loop tpm_infineon hp_wmi snd_hda_codec_realtek sparse_keymap rfkill psmouse snd_hda_intel snd_hda_codec i915 snd_hwdep snd_pcm snd_page_alloc drm_kms_helper drm acpi_cpufreq snd_seq snd_seq_device snd_timer snd evdev iTCO_wdt coretemp i2c_algo_bit tpm_tis tpm tpm_bios soundcore mperf serio_raw iTCO_vendor_support pcspkr button video processor i2c_core thermal_sys wmi ext4 crc16 jbd2 mbcache usbhid hid sg sr_mod sd_mod cdrom crc_t10dif uhci_hcd ahci libahci libata scsi_mod ehci_hcd e1000e usbcore usb_common [last unloaded: scsi_wait_scan]
[   53.270426] 
[   53.270439] Pid: 3482, comm: insmod Tainted: G           O 3.2.46 #2 Hewlett-Packard HP Compaq 8000 Elite CMT PC/3647h
[   53.270510] RIP: 0010:[<ffffffffa04aa7df>]  [<ffffffffa04aa7df>] xdma_probe+0x2b2/0x571 [xdma_a7]
[   53.270570] RSP: 0018:ffff88020f7d7ca8  EFLAGS: 00010206
[   53.270605] RAX: 00000000058a0000 RBX: ffff880212eda000 RCX: 0000000100000000
[   53.270649] RDX: 00000000058a0000 RSI: 0000000000000000 RDI: ffffffff81617d88
[   53.270693] RBP: ffff88020f7d7d08 R08: 00000000f060ffff R09: 0000000000000000
[   53.270737] R10: 0000000000000000 R11: 0000000001782000 R12: 0000000000000001
[   53.270781] R13: 0000000000000000 R14: ffff8802100e0000 R15: ffff880212eda150
[   53.270826] FS:  00007f28ff341700(0000) GS:ffff88021bc00000(0000) knlGS:0000000000000000
[   53.270876] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[   53.270912] CR2: 00000000058a0000 CR3: 000000020f214000 CR4: 00000000000406f0
[   53.270956] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[   53.271001] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[   53.271046] Process insmod (pid: 3482, threadinfo ffff88020f7d6000, task ffff8802115c5550)
[   53.271095] Stack:
[   53.271110]  ffff88020f7d7cb8 058a000000000292 ffff880212eda090 058a000000000000
[   53.271165]  ffff88020f7d7cd8 ffffffff81373dff ffff88020f7d7d08 ffff880212eda090
[   53.271218]  ffff88020f7d7d40 ffff880212eda000 ffffffffa04ac0d0 0000000000000000
[   53.271274] Call Trace:
[   53.271295]  [<ffffffff81373dff>] ? _raw_spin_unlock_irqrestore+0xf/0x11
[   53.271339]  [<ffffffff811dd440>] local_pci_probe+0x3f/0x70
[   53.271375]  [<ffffffff811dd5d3>] pci_device_probe+0xc4/0xf1
[   53.271414]  [<ffffffff8126ce60>] ? driver_probe_device+0x159/0x159
[   53.271454]  [<ffffffff8126cdb2>] driver_probe_device+0xab/0x159
[   53.271493]  [<ffffffff8126ceb9>] __driver_attach+0x59/0x7c
[   53.271529]  [<ffffffff8126b700>] bus_for_each_dev+0x54/0x86
[   53.271566]  [<ffffffff8126c998>] driver_attach+0x19/0x1b
[   53.271601]  [<ffffffff8126c702>] bus_add_driver+0xdf/0x21c
[   53.271637]  [<ffffffff8126d506>] driver_register+0x96/0x111
[   53.271673]  [<ffffffff811dc9b7>] __pci_register_driver+0x51/0xbc
[   53.271714]  [<ffffffffa0397000>] ? 0xffffffffa0396fff
[   53.271750]  [<ffffffffa0397054>] xdma_init+0x54/0x1000 [xdma_a7]
[   53.271789]  [<ffffffff81002094>] do_one_initcall+0x7a/0x132
[   53.271827]  [<ffffffffa0397000>] ? 0xffffffffa0396fff
[   53.271862]  [<ffffffff8107b18d>] sys_init_module+0x10c/0x25f
[   53.271899]  [<ffffffff81379292>] system_call_fastpath+0x16/0x1b
[   53.272732] Code: 0f b7 43 3e 4c 8b 35 d1 7e 02 00 41 89 86 a0 00 00 00 41 8b 46 20 89 45 ac 44 89 e8 44 89 6d b8 c1 e0 08 03 45 ac 89 45 bc 89 c2 <44> 8b 22 41 f6 c4 01 0f 84 c6 00 00 00 44 89 e2 83 e2 02 89 55 
[   53.272732] RIP  [<ffffffffa04aa7df>] xdma_probe+0x2b2/0x571 [xdma_a7]
[   53.272732]  RSP <ffff88020f7d7ca8>
[   53.272732] CR2: 00000000058a0000
[   53.294305] ---[ end trace 3d2184721fd0317b ]---

I traced this back to

driver/xdma/xdma_base.c:1936:ReadDMAEngineConfiguration()

... which in turn calls

driver/xdma/xdma_base.c:1951:Dma_mReadReg()

... where the crash occurs.

From the xdma/Makefile, I can see:

EXTRA_CFLAGS += -DA7_TRD -DX86_PC -DNWLDMA -DXENV_LINUX -DUSE_IO_MACROS -DXLITTLE_ENDIAN -DPM_SUPPORT -DPCI_LINUX -DFIFO_EMPTY_CHECK -I $(XDMA_PATH) -I $(ROOTDIR)/include

include/xio.h defines XIo_In32() (i.e. Dma_mIn32(), i.e. Dma_mReadReg()), depending
on above macros.

Here a similar problem is described:

http://forums.xilinx.com/t5/PCI-Express/KC705-Base-TRD-drivers-in-64-bit-Linux/m-p/371213#M4755

 

 

Would Xilinx supply an official solution for this problem (bugfix for kernel driver)? It would be very helpful in order to use the TRD!

 

Thanks a lot in advance for your support,

 

Tobias Rutz

Tags (4)
0 Kudos
1 Reply
Observer martoni
Observer
9,732 Views
Registered: ‎02-20-2009

Re: AC701 Base TRD drivers in 64-bit Linux

Hi tru_work,

 

Have you managed to solve your problem ?

I've got exactly the same problem compiling the TRD driver on my debian wheezy Linux distribution.

 

The driver work well on the same computer but with the fedora16 live DVD provided with de kit AC701.

 

Regards

Tags (4)
0 Kudos