I am using Linux on TI8168 board to access memory on a altera target board connected to PCI Express. The driver configures the BAR's to access memory on the target board, but the memory read fails for BAR2 configured addresses while it passes for BAR0 address range. The PCI status registers don't show any sign of an access error.
please let me know what other information I can provide to get some help with this issue.
here is the output of "lspci" command
00:00.0 PCI bridge: Texas Instruments Device 8888 (rev 01) (prog-if 00 [Normal decode])
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, Cache Line Size: 32 bytes
Region 0: Memory at <ignored> (32-bit, non-prefetchable)
Region 1: Memory at <ignored> (32-bit, prefetchable)
Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
Memory behind bridge: 22000000-220fffff
Prefetchable memory behind bridge: 20000000-21ffffff
Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-
BridgeCtl: Parity+ SERR- NoISA- VGA- MAbort- >Reset- FastB2B-
PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
Capabilities: <access denied>
00: 4c 10 88 88 47 01 10 00 01 00 04 06 08 00 01 00
10: 00 00 00 51 08 00 00 80 00 01 01 00 f0 00 00 00
20: 00 22 00 22 00 20 f0 21 00 00 00 00 00 00 00 00
30: 00 00 00 00 40 00 00 00 00 00 00 00 30 01 01 00
01:00.0 Unassigned class [ff00]: Altera Corporation Device 0004 (rev 01)
Subsystem: Altera Corporation Device 0004
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, Cache Line Size: 32 bytes
Interrupt: pin A routed to IRQ 128
Region 0: Memory at 20000000 (64-bit, prefetchable) [size=32M]
Region 2: Memory at 22000000 (32-bit, non-prefetchable) [size=256K]
Region 3: Memory at 22040000 (32-bit, non-prefetchable) [size=256K]
Capabilities: <access denied>
Kernel driver in use: altpciechdma
Kernel modules: altpciechdma
00: 72 11 04 00 46 05 10 00 01 00 00 ff 08 00 00 00
10: 0c 00 00 20 00 00 00 00 00 00 00 22 00 00 04 22
20: 00 00 00 00 00 00 00 00 00 00 00 00 72 11 04 00
30: 00 00 00 00 50 00 00 00 00 00 00 00 30 01 00 00
here is the error message when trying read a word from 0x22000000 address.
Unhandled fault: Precise External Abort on non-linefetch (0x1018) at 0x40021000