FPGA, SoC, And CPLD Boards And Kits
FPGA Evaluation and Development Kits
5925 Discussions

Using PCI Express on Linux with DE10-Pro-GX-280-4G (Stratix 10)

MMate10
Beginner
1,417 Views

Hello,

 

I'm trying to run demonstrations distributed with the DE10-Pro board on a Linux system. I have Quartus Pro 19.2 installed. I'm doing the following:

 

a) Run Demonstrations/PCIe_DDR4/demo_batch/test.sh, it successfully programs the board.

b) Soft-reboot the computer. Now I've got the following entry in lspci output:

83:00.0 Non-VGA unclassified device: Altera Corporation Device e003 (rev 01)

I have the following in dmesg:

[ 1.527793] pci 0000:83:00.0: [1172:e003] type 00 class 0x000000 [ 1.527820] pci 0000:83:00.0: reg 0x10: [mem 0x00000000-0x000001ff 64bit pref] [ 1.527843] pci 0000:83:00.0: reg 0x20: [mem 0x00000000-0x07ffffff 64bit pref] [ 1.527858] pci 0000:83:00.0: enabling Extended Tags ... [ 1.570379] pnp 00:03: disabling [mem 0x00000400-0x000004ff] because it overlaps 0000:83:00.0 BAR 4 [mem 0x00000000-0x07ffffff 64bit pref] ... [ 1.573414] pnp 00:0d: disabling [mem 0x00000000-0x0009ffff] because it overlaps 0000:83:00.0 BAR 4 [mem 0x00000000-0x07ffffff 64bit pref]

c) Compile and load the driver in Demonstrations/PCIe_SW_KIT/Linux/PCIe_Driver, and get the following in dmesg:

[ 50.093063] altera_pcie: loading out-of-tree module taints kernel. [ 50.093123] altera_pcie: module verification failed: signature and/or required key missing - tainting kernel [ 50.093492] Altera PCIE: altera_pcie_init(), Aug 5 2019 19:11:18 [ 50.093592] Altera PCIE 0000:83:00.0: can't enable device: BAR 0 [mem 0x00000000-0x000001ff 64bit pref] not claimed [ 50.093669] Altera PCIE 0000:83:00.0: pci_enable_device() failed [ 50.093713] Altera PCIE 0000:83:00.0: goto err_enable [ 50.093751] Altera PCIE 0000:83:00.0: goto err_initchrdev [ 50.093791] Altera PCIE 0000:83:00.0: goto err_bk_alloc [ 50.093894] Altera PCIE: probe of 0000:83:00.0 failed with error -22

d) the /dev/altera_pcie0 device does not show up, running Demonstrations/PCIe_DDR4/demo_batch/linux_app/PCIE_DDR4 fails.

 

My system is Debian 10 Buster, kernel 4.19.0-5-amd64. The computer is a workstation with two XEON E5 2620 v2.

0 Kudos
4 Replies
BoonT_Intel
Moderator
1,009 Views

Hi Sir,

This DE board is develop by third party vendor. I also believe the demo design /PCIe_DDR4/demo_batch/test.sh is from third party.

For the third party issue, please contact the vendor directly for better support.

Thanks.

0 Kudos
MMate10
Beginner
1,009 Views

I have found the source of the problem. The third party software was not really an issue - I've created a new project, following the instructions on https://www.intel.com/content/www/us/en/programmable/documentation/sox1520633403002.html - and I had the exact same problem. It turns out that if PCI device and class code are zero, Linux fails to initialize the card for some reason. When I changed device and class codes in my project, the card was detected successfully.

0 Kudos
MMate10
Beginner
1,009 Views

Found the problem. Looks like Linux doesn't really like zero PCI device code and class code. When I created a new project with the Avalon-MM Intel Stratix 10 Hard IP+ for PCI Express, with zero PCI device and class code, the problem persisted. With the device and class code non-zero, everything works fine.

 

0 Kudos
BoonT_Intel
Moderator
1,009 Views

Hi,

Thanks for your sharing. I think it is true that in certain system, we need to enter a non-zero value to device ID and class code. Example, in the S10 platform reference design, we also need to enter a predefined value to the device id and class code.

0 Kudos
Reply