This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/TDA2EVM5777: PCIe Root Complex Example Application

Part Number: TDA2EVM5777
Other Parts Discussed in Thread: TDA2SX

Tool/software: Linux

Hello,

Is there example Linux software for a PCIe echo application running on TDA2x Linux which has the PCIe module configured as the default PCIe RC device?  I am running PROCESSOR_SDK_VISION_03_01_00_00 linux on the tda2evm5777 Vayu EVM.

I want to connect the Vayu EVM to a PCIe End Point device.  The PCIe End Point device is running as a PCIe EP device with an echo application.  The Vision SDK prebuilt Linux TDA2x on Vayu EVM detects the external PCIe EP device but I do not know how to transmit data so that I can and receive the echo from that device.  How can I echo out to the PCIe device and listen for the return?

Thank you for your help.  I have not been able to find any documentation on how to test Linux PCIe RC comms to an EP device.  I only find documentation on how to test  Linux End Point Connection, but not Root Complex. I am following the documentation under: PROCESSOR_SDK_VISION_03_01_00_00/ti_components/os_tools/linux/kernel/omap/Documentation/PCI... 

  • Hi,

    I have forwarded your question to an expert for comment.

    Regards,
    Yordan
  • Hi Yordan,

    Thank you for your reply, I was doing more research into this issue and came across a problem that appears on linux bootup when it detects my PCIe EP device. It can still detect the End Point device, but there was also a PCIe error message from Linux driver that leads me to believe any PCIe echo application would not execute properly with this Kernel and EP device and will need some help overcoming this message. Any thoughts?

    The error message is pasted below :
    [ 0.627198] pci 0000:00:00.0: BAR 9: no space for [mem size 0x18000000 pref]
    [ 0.627209] pci 0000:00:00.0: BAR 9: failed to assign [mem size 0x18000000 pref]





    [ 0.590184] PCI host bridge /ocp/axi@0/pcie_rc@51000000 ranges:
    [ 0.590197] No bus range found for /ocp/axi@0/pcie_rc@51000000, using [bus 00-ff]
    [ 0.611505] dra7-pcie 51000000.pcie_rc: PCI host bridge to bus 0000:00
    [ 0.611518] pci_bus 0000:00: root bus resource [bus 00-ff]
    [ 0.611529] pci_bus 0000:00: root bus resource [io 0x0000-0xffff]
    [ 0.611538] pci_bus 0000:00: root bus resource [mem 0x20013000-0x2fffffff]
    [ 0.611572] pci 0000:00:00.0: [104c:8888] type 01 class 0x060400
    [ 0.611613] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x000fffff]
    [ 0.611635] pci 0000:00:00.0: reg 0x14: [mem 0x00000000-0x0000ffff]
    [ 0.611700] pci 0000:00:00.0: supports D1
    [ 0.611710] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
    [ 0.612119] pci 0000:01:00.0: [104c:8888] type 00 class 0x000000
    [ 0.612247] pci 0000:01:00.0: reg 0x10: [mem 0xa0000000-0xafffffff pref]
    [ 0.612284] pci 0000:01:00.0: reg 0x14: [mem 0x00000000-0x0000ffff pref]
    [ 0.612319] pci 0000:01:00.0: reg 0x18: [mem 0x00000000-0x000fffff pref]
    [ 0.612355] pci 0000:01:00.0: reg 0x1c: [mem 0x00000000-0x0000ffff pref]
    [ 0.612391] pci 0000:01:00.0: reg 0x20: [mem 0x00000000-0x00000fff pref]
    [ 0.612425] pci 0000:01:00.0: reg 0x24: [mem 0x00000000-0x0000ffff pref]
    [ 0.612615] pci 0000:01:00.0: supports D1
    [ 0.612624] pci 0000:01:00.0: PME# supported from D0 D1 D3hot
    [ 0.627198] pci 0000:00:00.0: BAR 9: no space for [mem size 0x18000000 pref]
    [ 0.627209] pci 0000:00:00.0: BAR 9: failed to assign [mem size 0x18000000 pref]
    [ 0.627221] pci 0000:00:00.0: BAR 0: assigned [mem 0x20100000-0x201fffff]
    [ 0.627234] pci 0000:00:00.0: BAR 1: assigned [mem 0x20020000-0x2002ffff]
    [ 0.627246] pci 0000:00:00.0: PCI bridge to [bus 01]
    [ 0.627476] pcieport 0000:00:00.0: Signaling PME through PCIe PME interrupt
    [ 0.627486] pci 0000:01:00.0: Signaling PME through PCIe PME interrupt
    [ 0.627497] pcie_pme 0000:00:00.0:pcie01: service driver pcie_pme loaded
    [ 0.627613] aer 0000:00:00.0:pcie02: service driver aer loaded







    Is there a way to easily fix this in the prebuilt linux that I am running or would I have to fix this through compiling the kernel?


    Thank you,
    -iFer
  • Hello Yordan,

    Thank you very much for your help!

    I am checking in to see if there are any updates.

    Thank you,
    -iFer
  • Hi IFer,
    Yes, there's PCIE Root complex driver.
    Here's PCIE user guide for your reference : processors.wiki.ti.com/.../Linux_Core_PCIe_EP_User's_Guide

    What's the end device you are connecting ? Function, Model etc.
    A lot of network and storage drivers should be enabled by default for widely available cards such as Intel cards (wifi, eth, sata etc).

    Regards,
    RK
  • Hi IFer,
    Can you also share the boot log and out put of "lspci -vv" as an attachment?

    Regards,
    RK
  • Hello RK,

    Thank you for your response,


    I have decided to attempt to get Linux as an endpoint device instead of using it as a root complex device to see if there is an easy way to get echo example working.

    I have followed the PCIe EP User's guide, but I can't seem to figure out how to receive data from the root complex. I am able to follow section 4.4 Kernel with the exception of the initial command "mount -t configfs none /sys/kernel/config". I get the error: mount: none is already mounted or /sys/kernel/config busy 

    Regardless of the error, I was still able to continue, There is also a directory that already exists in the /sys/kernel/config/ directory called pcie_ep. When I followed the rest of section 4.4 Kernel, I created the pci_epf_test.0 directory under the pcie_ep directory. 






    Why do I get that error hen running the mount command, and how I can receive data from the root complex device and communicate with it?


    Also, the pci-endpoint-test.0 function device does not exist under the /dev/ directory. Is that not the function device that I am supposed to utilize to communicate with the other PCIe device? 
     

    Thank you,
    -iFer
  • HI,

    Sorry for the delay.

    Did you check if "configfs" was already mounted or not? In some cases it's already mounted during boot up.

    So just check if you have anything in /sys/kernel/config directory.

    If it's not there also try "mount -t configfs configfs /sys/kernel/config"

    Regards,
    RK

  • Hello RK,

    Thank you for your reply.

    There is already a directory under the/sys/kernel/configdirectory calledpci_ep.

    When I run the command mount -t configfs configfs /sys/kernel/config.

    This is the output:

    root@dra7xx-evm:~# mount -t configfs configfs /sys/kernel/config
    mount: configfs is already mounted or /sys/kernel/config busy
    configfs is already mounted on /sys/kernel/config

    By the way, I sent you a private message with more details.


    Please let me know if you need anymore information.


    Thank you,
    iFer

  • Hi iFer,

    I would appreciate if the discussion could continue publicly (as much as your business logic allows) since I want to test the same thing on TDA2SX under Linux, didn't see this post earlier. I posted similar question here: e2e.ti.com/.../680131

    Thank you in advance :)
    Regards, Nick
  • Ifer,
    If configfs is already mounted and you see a directory "pcie_ep" then you can skip the step " mount -t configfs configfs /sys/kernel/config" and continue with rest of the steps.

    Regards,
    RK