cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
fpgalearner
Voyager
Voyager
937 Views
Registered: ‎04-11-2016

PCIE driver (KC705 <-> ARM Yocto Linux)

Hi,

Where I can get PCIE driver that is compatible with Xilinx Kc705 Eval board and ARM Yocto Linux?

0 Kudos
3 Replies
sandeepg
Moderator
Moderator
906 Views
Registered: ‎04-24-2017

Hi @fpgalearner,

 

All our pcie drivers are in https://github.com/Xilinx/linux-xlnx/blob/master/drivers/pci/host/pcie-xilinx.c 

 

Refer our wiki page and see which driver are in mainline upstream or not http://www.wiki.xilinx.com/Linux+Drivers 

 

If you are using Yocto I would suggest to use meta-xilinx and meta-xilinx-tools layer.

 

https://github.com/Xilinx/meta-xilinx/tree/rel-v2017.4

https://github.com/Xilinx/meta-xilinx-tools/tree/rel-v2017.4 

 

 

 

Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
fpgalearner
Voyager
Voyager
864 Views
Registered: ‎04-11-2016

hi @sandeepg  

I have the driver now.

As mentioned above I have connected PCIE interface of IMX7(ARM A7- Yocto-Linux) and KC705 FPGA EVAL board and both are set to Gen2, 1 Lane. https://www.nxp.com/products/processors-and-microcontrollers/applications-processors/i.mx-applications-processors/i.mx-7-processors/i.mx-7dual-processors-heterogeneous-processing-with-dual-arm-cortex-a7-cores-and-cortex-m4-core:i.MX7D

https://www.xilinx.com/support/documentation/boards_and_kits/kc705/ug810_KC705_Eval_Bd.pdf

When BARs size is set to 64 Megabytes(our requirement) in FPGA, IMX7 doesn’t support with standard Xilinx pcie driver and end up with following error:

root@imx7d-phyboard-zeta-001:/lib/modules# insmod /lib/modules/xpcie.ko
Base hw val 0
Base hw len 0
BAR0 of 0K
BAR0 of 0M
xpcie: Init: Could not remap memory.
insmod: ERROR: could not insert module /lib/modules/xpcie.ko: Operation not
permitted
root@imx7d-phyboard-zeta-001:/lib/modules#
but when BARs size is set to 4 Megabytes in FPGA, then IMX7 works. Is it due to limitation of IMX7 kernel memory size? I think default IMX7 kernel memory has to be increased by some means.

but I don't know how to increase default kernel memory size in Yocto. Is there any way for this? or there is another issue?

 

Relevant files are in attachment.

 

P.S. same Xilinx pcie driver in PC(Centos/Ubuntu) works for any setting.

bar64_pcie.png
0 Kudos
venkata
Moderator
Moderator
836 Views
Registered: ‎02-16-2010

This is a debug check:

If there are any other devices attached to IMX7 that need high BAR size to be allocated by Kernel, please check the possibility to remove them and connect KC705 alone with BAR size set to 64 Megabytes.
------------------------------------------------------------------------------
Don't forget to reply, give kudo and accept as solution
------------------------------------------------------------------------------