Results 1 to 8 of 8

Thread: How to load XDMA driver?

  1. #1
    Join Date
    Nov 2024
    Beans
    4

    How to load XDMA driver?

    Earlier, this year, Xilinx (AMD) got their XDMA driver approved for integration in to the kernel (starting in v6.3). This driver is intended to interface to hardware running Xilinx (AMD) FPGAs with their proprietary PCIe IP.

    Reference: https://www.phoronix.com/news/AMD-Xilinx-XDMA-Linux-6.3

    I am trying to get this driver to run on my machine with a custom card (with a Xilinx FPGA).

    My OS is: Linux 6.8.0-50-generic 22.04.3 - Ubuntu

    I can see the driver on the machine. I have verified that my device is properly enumerating:


    Note, at the bottom it states that "Kernel driver in use: xdma" This is an older driver (from obtained from the Xilinx git repository) - from before the release in kernel v6.3. When I unload this driver, I cannot get the kernel version to recognize/associate with my card. Looking into the source code, I do not see a place where it stores supported vendorID/deviceID pairs (like the old driver did). Am I missing something basic? How can I get this driver to associate with my card?

    I apologize if any of the above questions/information seems weird. I am a hardware engineer out of his depth with Linux drivers...
    Attached Images Attached Images

  2. #2
    Join Date
    May 2018
    Location
    Here and There
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: How to load XDMA driver?

    The last I played with it, they wanted me to DL this: https://jungo.com/windriver/?product=WinDriver#download

    You may want to look at it, I did not try or use it's a PAID Or 30 Day Trial it was not worth it for me anyway.
    Before you jump on that link here is the Quote:
    evgeny.jungo (Member)
    6 years ago

    Hello,

    I saw your post and as it seems, you are having trouble with driver development for Linux I would like to offer you to try out our driver development toolkit - WinDriver.

    WinDriver is a toolkit for PCI/USB devices for the OS's of Windows/Linux, that automatically generates a driver that is specific to your hardware. WinDriver provides a sample of our XDMA PCIe driver that you can try out. The toolkit enables you to access your hardware and implement your device functionality, without having to develop in the kernel mode. For more information click here PCIe Online Demo [https://www.youtube.com/watch?v=-o6M1ljZMQk]. In order to download WinDriver's free trial version please click here [https://www.jungo.com/st/contact-for...duct=WinDriver]. For more information please contact me via email: evgenym@jungo.com or phone: 1-408-600-0851 ext.651 Best regards, Evgeny Moss Account Manager Jungo Connectivity Ltd P:+1 408-600-0851 [tel:+1%20408-600-0851] M:+1 408-351-6854 ext:651 [tel:+1%20408-351-6854] evgenym@jungo.com

    I'm running a Hybrid OS currently so I'm not much help on your current kernel.
    Code:
    lsmod | grep xdma 
    xdma                   24576  0
    ####
    Linux tuxedo-os-btrfs 6.11.0-105009-tuxedo #9tuxnoble1 SMP PREEMPT_DYNAMIC Sat Oct 26 07:13:55 UTC 2024 x86_64
     x86_64 x86_64 GNU/Linux
    
    


    We have a few extra sharp Kernel testers as well, maybe one will pop in.


    "When you practice gratefulness, there is a sense of respect toward others." >>Dalai Lama

  3. #3
    Join Date
    Nov 2024
    Beans
    4

    Re: How to load XDMA driver?

    Thank you for the response. However, it was my understanding that by getting the driver officially released into the kernel, the result was users (like me) no longer had to scrimp/scrounge/roll our own drivers to interface to cards with Xilinx FPGAs - we simply use the [released] XDMA driver - which is now integrated into the kernel.

  4. #4
    Join Date
    May 2018
    Location
    Here and There
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: How to load XDMA driver?

    They Lied....LOL

    Proof this is on Arch with tuned kernel (BORE)
    Code:
    └─> lsmod | grep xdma 
    ┌───────────────────>
    
    
    

    As you see nothing there.
    The one on Buntu flavors are very basic (Lacking Drivers)


    Refer to this: https://github.com/Xilinx/dma_ip_drivers/tree/master/XDMA/linux-kernel


    Last edited by 1fallen; 4 Weeks Ago at 07:56 PM.
    "When you practice gratefulness, there is a sense of respect toward others." >>Dalai Lama

  5. #5
    Join Date
    Nov 2024
    Beans
    4

    Re: How to load XDMA driver?

    Again, I appreciate your response. Please don't interpret my continuing questions as challenging you (as previously mentioned, I am a hardware engineer, not a programmer). The driver available at the Xilinx git repository you linked to is of... dubious quality, at best. However, the one that should be in the kernel (see here: linux/drivers/dma/xilinx/xdma.c at master · torvalds/linux · GitHub) is supposed to be much better. If I could get it to load properly...

    Series of [potentially dumb] questions/observations:
    1. When I was running an earlier kernel (6.2), I went out, got that driver from the Xilinx repo, compiled it and [sort of] used it.
    2. When I upgraded to v6.8 kernel, I saw that the xdma code was already there (as in, I did NOT need to get it and add to the machine).
    3. Even though the code for the driver is "in the kernel" do I still need to compile and load it?

  6. #6
    Join Date
    May 2018
    Location
    Here and There
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: How to load XDMA driver?

    Quote Originally Posted by hobbss View Post
    Again, I appreciate your response. Please don't interpret my continuing questions as challenging you (as previously mentioned, I am a hardware engineer, not a programmer). The driver available at the Xilinx git repository you linked to is of... dubious quality, at best. However, the one that should be in the kernel (see here: linux/drivers/dma/xilinx/xdma.c at master · torvalds/linux · GitHub) is supposed to be much better. If I could get it to load properly...
    Nope I did not feel a challenge by you, just trying to save you time is all. I got ran around for about 4 hours trying to sort all this out.
    Quote Originally Posted by hobbss View Post
    Series of [potentially dumb] questions/observations:

    3. Even though the code for the driver is "in the kernel" do I still need to compile and load it?
    Yes you will have to compile it.
    Went rather smooth but Again I have no PCIE card here at all.
    Code:
    Error: The Kernel module installed correctly, but no devices were recognized.
    
    They have a forum that, might be better suited for help there: https://adaptivesupport.amd.com/s/qu...language=en_US
    "When you practice gratefulness, there is a sense of respect toward others." >>Dalai Lama

  7. #7
    Join Date
    Nov 2024
    Beans
    4

    Re: How to load XDMA driver?

    My software contractor has told me that this driver (in the kernel) is a "platform" driver, not a "device" driver, and is meant to target Xilinx SoC devices that are running Linux and have DMA engines in them (i.e., Zynq) rather than an actual PCie/DMA combo driver targeting a PCIe device (end point) in a larger system running Linux. Does that make sense? Is there a way I can verify that?
    Last edited by hobbss; 3 Weeks Ago at 04:57 PM.

  8. #8
    Join Date
    May 2018
    Location
    Here and There
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: How to load XDMA driver?

    Platform devices are inherently not discoverable, i.e. the hardware cannot say "Hey! I'm present!" to the software.
    But yes It makes some sense:
    Please check in apt:
    Code:
    apt search Xilinx 
    Sorting... Done 
    Full Text Search... Done 
    fpga-manager-xlnx/noble 2022.1ubuntu1 amd64 
      Xilinx FPGA manager 
    
    libdfx-dev/noble 2023.2-0ubuntu4 amd64 
      library to configure Programmable Logic on Xilinx FPGAs - development files 
    
    libdfx1.0/noble 2023.2-0ubuntu4 amd64 
      library to configure Programmable Logic on Xilinx FPGAs - shared library 
    
    libfreesrp-dev/noble 0.3.0-5 amd64 
      Software defined radio support for FreeSRP hardware (development files) 
    
    libfreesrp0/noble 0.3.0-5 amd64 
      Software defined radio support for FreeSRP hardware (library) 
    
    libunilog-dev/noble 2.5-2build3 amd64 
      wrapper library for google-glog (develop) 
    
    libunilog2/noble 2.5-2build3 amd64 
      wrapper library for google-glog 
    
    libxrt-dev/noble 202210.2.13.466+dfsg-8ubuntu5 amd64 
      Xilinx Runtime (XRT) - development files 
    
    libxrt-utils/noble 202210.2.13.466+dfsg-8ubuntu5 amd64 
      Xilinx Runtime (XRT) - runtime -- utilities 
    
    libxrt1/noble 202210.2.13.466+dfsg-8ubuntu5 amd64 
      Xilinx Runtime (XRT) - runtime libraries 
    
    linux-firmware-xilinx-ap1302/noble,noble 1:2.0-0ubuntu1 all 
      Firmware for the AP1302 ISP, for Xilinx boards 
    
    linux-firmware-xilinx-vcu/noble,noble 2020.2-0ubuntu1 all 
      Xilinx VCU firmware files 
    
    linux-xilinx-headers-6.8.0-1008/noble-updates,noble-updates,noble-security,noble-security 6.8.0-1008.9 all 
      Header files related to Linux kernel version 6.8.0 
    
    linux-xilinx-tools-common/noble-updates,noble-updates,noble-security,noble-security 6.8.0-1008.9 all 
      Linux kernel version specific tools for version 6.8.0 
    
    linux-xilinx-tools-host/noble-updates,noble-updates,noble-security,noble-security 6.8.0-1008.9 all 
      Linux kernel VM host tools 
    
    openfpgaloader/noble 0.12.0-1 amd64 
      Universal utility for programming FPGAs 
    
    xc3sprog/noble 0+svn795+dfsg-4 amd64 
      JTAG flashing tool for FPGAs, CPLDs and EEPROMs 
    
    xilinx-bootgen/noble 2022.2-2ubuntu3 amd64 
      boot image converter for Xilinx ARM SoCs 
    

    Also run through this list:
    Code:
    apt search Zynq 
    Sorting... Done 
    Full Text Search... Done 
    fpga-manager-xlnx/noble 2022.1ubuntu1 amd64 
      Xilinx FPGA manager 
    
    libxrt-dev/noble 202210.2.13.466+dfsg-8ubuntu5 amd64 
      Xilinx Runtime (XRT) - development files 
    
    libxrt-utils/noble 202210.2.13.466+dfsg-8ubuntu5 amd64 
      Xilinx Runtime (XRT) - runtime -- utilities 
    
    libxrt1/noble 202210.2.13.466+dfsg-8ubuntu5 amd64 
      Xilinx Runtime (XRT) - runtime libraries 
    
    xilinx-bootgen/noble 2022.2-2ubuntu3 amd64 
      boot image converter for Xilinx ARM SoCs
    



    I have no Idea which you will need though or how old they are. Whithout me having that card physically attached to my machine...I'm shooting in the dark.
    "When you practice gratefulness, there is a sense of respect toward others." >>Dalai Lama

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •