--- Quote Start ---
Which kit are you using the Arria V or the Arria 10 Dev Kit? When building the example design, did you notice the PCIe config space registers. They usually have these Vendor ID and DEvice ID registers in it, with the Vendor ID preset to the Altera one and Device ID being 00000 . If this is the case with your design, then you may need to set the appropriate DEvice ID in your PCIe component (E0073 for Arria V / E0093 for Arria 10/ or E001 for default) and build the system again. Program the FPGA on the board. Then in the driver code make sure you use the same Device ID that is in the HW and build the driver again. This way the Device ID will match. Once the Device is enumerated successfully, the BAR registers will get enabled and you should be able to read and write from them, perform DMA etc.
--- Quote End ---
Hi eapenabrm,
I just used Quartus Prime Standard Edition 16.0 successfully (1) change the device ID in the qsys file to e093, (2) generate HDL, (3) recompile the entire project. A new sof file has been successfully generated.
Then I program it to my Arria 10 FPGA, I can verify the change was effective by
$ sudo lspci -vv | grep Altera -A 50
01:00.0 Non-VGA unclassified device: Altera Corporation Device e093 (rev 01)
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0
Interrupt: pin A routed to IRQ 11
Region 0: Memory at d0020000 (64-bit, prefetchable)
Region 4: Memory at d0000000 (64-bit, prefetchable)
Unfortunately, ./install and ./run still report the same error (that /dev/altera_dma is not found).
One good(?) news is that, checking dmesg, it seems to show fewer and slightly different error messages this time:
altera_dma: module verification failed: signature and/or required key missing - tainting kernel
Altera DMA: altera_dma_init(), Nov 9 2017 19:16:36
Altera DMA 0000:01:00.0: init_chrdev() failed
Altera DMA 0000:01:00.0: goto err_initchrdev
Altera DMA 0000:01:00.0: goto err_bk_alloc
Altera DMA: probe of 0000:01:00.0 failed with error -1
Altera DMA: altera_dma_init(), Nov 9 2017 19:16:44
Altera DMA 0000:01:00.0: init_chrdev() failed
Altera DMA 0000:01:00.0: goto err_initchrdev
Altera DMA 0000:01:00.0: goto err_bk_alloc
Altera DMA: probe of 0000:01:00.0 failed with error -1
compared to the following, which are the error messages seen in most of the previous attempts:
altera_dma: module verification failed: signature and/or required key missing - tainting kernel Altera DMA: altera_dma_init(), Nov 7 2017 10:46:02
Altera DMA 0000:01:00.0: Refused to change power state, currently in D3
Altera DMA 0000:01:00.0: can't enable device: BAR 0 not claimed
Altera DMA 0000:01:00.0: pci_enable_device() failed
Altera DMA 0000:01:00.0: goto err_enable
Altera DMA 0000:01:00.0: goto err_initchrdev
Altera DMA 0000:01:00.0: goto err_bk_alloc
Altera DMA: probe of 0000:01:00.0 failed with error -22
Altera DMA: altera_dma_init(), Nov 7 2017 10:46:05
Altera DMA 0000:01:00.0: Refused to change power state, currently in D3
Altera DMA 0000:01:00.0: can't enable device: BAR 0 not claimed
Altera DMA 0000:01:00.0: pci_enable_device() failed
Altera DMA 0000:01:00.0: goto err_enable
Altera DMA 0000:01:00.0: goto err_initchrdev
Altera DMA 0000:01:00.0: goto err_bk_alloc
Altera DMA: probe of 0000:01:00.0 failed with error -22
It seems that the function pci_enable_device() now successfully executed(?) and BAR 0 is successfully claimed(??)
But the init_chrdev() function still fails. :(((
Seems like I am making progress on the correct direction??