11-02-2020 06:07 AM
Hi, I'm trying to run the DMA examples and met a problem
My steps - I'm using Alveo U50 card with xilinx_u50_gen3x16_xdma_201920_3 shell
17:00.1 Processing accelerators [1200]: Xilinx Corporation Device [10ee:5021]
Subsystem: Xilinx Corporation Device [10ee:000e]
Flags: fast devsel, IRQ 69, NUMA node 0
Memory at 380070000000 (64-bit, prefetchable) [size=32M]
Memory at 380074000000 (64-bit, prefetchable) [size=128K]
Memory at 380060000000 (64-bit, prefetchable) [size=256M]
Capabilities: [40] Power Management version 3
Capabilities: [60] MSI-X: Enable- Count=32 Masked-
Capabilities: [70] Express Endpoint, MSI 00
Capabilities: [100] Advanced Error Reporting
Capabilities: [e00] Access Control Services
Capabilities: [e10] #15
Capabilities: [e80] Vendor Specific Information: ID=0020 Rev=0 Len=010 <?>
Kernel modules: xocl
My steps
- Clone the repo https://github.com/Xilinx/dma_ip_drivers/
- Make drivers in https://github.com/Xilinx/dma_ip_drivers/tree/master/XDMA/linux-kernel/xdma xdma.ko file was created successfully
- Install module in a root mode `insmod ../xdma/xdma.ko`
But /proc/devices still don't have xdma as a registered device.
What can be wronged?
11-04-2020 06:01 AM - edited 11-04-2020 06:02 AM
Ok, the solution was to rmmod xocl module
(unbind did not help)
17:00.1 Processing accelerators [1200]: Xilinx Corporation Device [10ee:5021]
Subsystem: Xilinx Corporation Device [10ee:000e]
Flags: bus master, fast devsel, latency 0, IRQ 67, NUMA node 0
Memory at 380070000000 (64-bit, prefetchable) [size=32M]
Memory at 380074000000 (64-bit, prefetchable) [size=128K]
Memory at 380060000000 (64-bit, prefetchable) [size=256M]
Capabilities: [40] Power Management version 3
Capabilities: [60] MSI-X: Enable+ Count=32 Masked-
Capabilities: [70] Express Endpoint, MSI 00
Capabilities: [100] Advanced Error Reporting
Capabilities: [e00] Access Control Services
Capabilities: [e10] #15
Capabilities: [e80] Vendor Specific Information: ID=0020 Rev=0 Len=010 <?>
Kernel driver in use: xdma <<< Finally :)
Kernel modules: xocl <<<<<<< Not sure about it
11-02-2020 06:46 AM
Also, I see no errors in dmesg -k
static int xdma_mod_init(void)
{
int rv;
pr_info("%s", version);
if (desc_blen_max > XDMA_DESC_BLEN_MAX)
desc_blen_max = XDMA_DESC_BLEN_MAX;
pr_info("desc_blen_max: 0x%x/%u, timeout: h2c %u c2h %u sec.\n",
desc_blen_max, desc_blen_max, h2c_timeout, c2h_timeout);
rv = xdma_cdev_init();
if (rv < 0)
return rv;
return pci_register_driver(&pci_driver);
Checked this section, no error found here
11-03-2020 02:29 AM
Driver loading finished with no errors
rv = xdma_cdev_init();
pr_info("xdma_cdev_init(): %d \n",rv);
if (rv < 0)
return rv;
rv = pci_register_driver(&pci_driver);
pr_info("pci_register_driver(): %d \n",rv);
return rv;
--------------------------
[70434.066872] xdma:xdma_mod_init: xdma_cdev_init(): 0
[70434.066997] xdma:xdma_mod_init: pci_register_driver(): 0
Also, I added my PCIe board id into the list
{ PCI_DEVICE(0x10ee, 0x6D30), },
{ PCI_DEVICE(0x10ee, 0x5021), }, <<< New line
{ PCI_DEVICE(0x10ee, 0x4808), },
{ PCI_DEVICE(0x10ee, 0x4828), },
Got it here
$ lspci -s 17:00.1 -nn -v
17:00.1 Processing accelerators [1200]: Xilinx Corporation Device [10ee:5021]
Subsystem: Xilinx Corporation Device [10ee:000e]
Flags: bus master, fast devsel, latency 0, IRQ 67, NUMA node 0
Memory at 380070000000 (64-bit, prefetchable) [size=32M]
Memory at 380074000000 (64-bit, prefetchable) [size=128K]
Memory at 380060000000 (64-bit, prefetchable) [size=256M]
Capabilities: <access denied>
Kernel driver in use: xocl
Kernel modules: xocl
11-04-2020 02:00 AM
@JohnFedakIV I'm sorry for disturbing you once again, but I didn't manage to find any relevant information
11-04-2020 05:19 AM
Rules.d files, added them to /etc/udev folder, rebuild the driver, but still failing.
Driver is loaded
$ lsmod | grep dma
xdma 90112 0
ioatdma 57344 0
dca 16384 1 ioatdma
11-04-2020 06:01 AM - edited 11-04-2020 06:02 AM
Ok, the solution was to rmmod xocl module
(unbind did not help)
17:00.1 Processing accelerators [1200]: Xilinx Corporation Device [10ee:5021]
Subsystem: Xilinx Corporation Device [10ee:000e]
Flags: bus master, fast devsel, latency 0, IRQ 67, NUMA node 0
Memory at 380070000000 (64-bit, prefetchable) [size=32M]
Memory at 380074000000 (64-bit, prefetchable) [size=128K]
Memory at 380060000000 (64-bit, prefetchable) [size=256M]
Capabilities: [40] Power Management version 3
Capabilities: [60] MSI-X: Enable+ Count=32 Masked-
Capabilities: [70] Express Endpoint, MSI 00
Capabilities: [100] Advanced Error Reporting
Capabilities: [e00] Access Control Services
Capabilities: [e10] #15
Capabilities: [e80] Vendor Specific Information: ID=0020 Rev=0 Len=010 <?>
Kernel driver in use: xdma <<< Finally :)
Kernel modules: xocl <<<<<<< Not sure about it