issues with pcie rescan

Issues related to hardware problems
Post Reply
gkm
Posts: 4
Joined: 2019/05/08 01:52:08

issues with pcie rescan

Post by gkm » 2019/05/08 02:45:50

Hi,

I'm using CentOS 7.6
The system connected to a fpga card using pcie
fpga initialization is slower then the cpu, so there is no pcie device of fpga found after os starts
After execute
echo 1 > /sys/bus/pci/rescan
the fpga pcie device found
lspci as follows
[root@localhost ~]# lspci -vxs 06:00.0
06:00.0 Memory controller: Xilinx Corporation Device 9038
Subsystem: Xilinx Corporation Device 0007
Physical Slot: 0-2
Flags: bus master, fast devsel, latency 0, IRQ 30, NUMA node 0
Memory at 90800000 (64-bit, non-prefetchable)
Memory at 91000000 (64-bit, non-prefetchable)
Capabilities: [40] Power Management version 3
Capabilities: [60] MSI-X: Enable- Count=8 Masked-
Capabilities: [70] Express Endpoint, MSI 00
Capabilities: [100] Advanced Error Reporting
Capabilities: [1c0] Secondary PCI Express <?>
00: ee 10 38 90 07 01 10 00 00 00 80 05 08 00 00 00
10: 04 00 80 90 00 00 00 00 04 00 00 91 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 ee 10 07 00
30: 00 00 00 00 40 00 00 00 00 00 00 00 0b 01 00 00

But the fpga driver read bar memory at 90800000 is all 0xffffffff
reboot will fix this issue,fpga driver can works

Why the rescan does not work?

Thanks in advance for helping with this!

aks
Posts: 3073
Joined: 2014/09/20 11:22:14

Re: issues with pcie rescan

Post by aks » 2019/05/08 17:35:58

Um, ask the vendor of the hardware (or possibly whomever wrote the driver).

gkm
Posts: 4
Joined: 2019/05/08 01:52:08

Re: issues with pcie rescan

Post by gkm » 2019/05/09 02:16:01

aks wrote:
2019/05/08 17:35:58
Um, ask the vendor of the hardware (or possibly whomever wrote the driver).
Thanks for the reply.

The cpu is Intel(R) Xeon(R) CPU D-1548 @ 2.00GHz
I try not to use fpga card driver,just map bar memory at 90800000 and read it, it's all ffffffff
I suspect x86 not support this operation(bios do the pcie initialize), or kernel driver of pcie not support ?

aks
Posts: 3073
Joined: 2014/09/20 11:22:14

Re: issues with pcie rescan

Post by aks » 2019/05/09 17:37:43

I suspect x86 not support this operation(bios do the pcie initialize), or kernel driver of pcie not support ?
I think these days, BIOS is mainly used to power on, boot, it's switched out quite early in the boot (although I'm not 100% sure in the EFI case). PCI was/is bus mastering, so I figure re-init on the fly must be supported. So on "classic" x86 BIOS you'd have to drop out of protected mode to re-init PCI - seems silly given when protected mode (286 I think) came out and PCI (486 or possibly 586).

I note the device comes up as 0007, which according to https://devicehunt.com/view/type/pci/ve ... evice/0007 is a "generic device" - I read that as device specific functionality won't be available. Given these things usually do I/O and there's an MMU (I think) I'm kind of surprised there's no DMA...

Perhaps you could identify the exact device on that website and see what sub-type it should be?

(But I'm just guessing).

gkm
Posts: 4
Joined: 2019/05/08 01:52:08

Re: issues with pcie rescan

Post by gkm » 2019/05/10 02:42:41

aks wrote:
2019/05/09 17:37:43
I suspect x86 not support this operation(bios do the pcie initialize), or kernel driver of pcie not support ?
I think these days, BIOS is mainly used to power on, boot, it's switched out quite early in the boot (although I'm not 100% sure in the EFI case). PCI was/is bus mastering, so I figure re-init on the fly must be supported. So on "classic" x86 BIOS you'd have to drop out of protected mode to re-init PCI - seems silly given when protected mode (286 I think) came out and PCI (486 or possibly 586).

I note the device comes up as 0007, which according to https://devicehunt.com/view/type/pci/ve ... evice/0007 is a "generic device" - I read that as device specific functionality won't be available. Given these things usually do I/O and there's an MMU (I think) I'm kind of surprised there's no DMA...

Perhaps you could identify the exact device on that website and see what sub-type it should be?

(But I'm just guessing).
Thanks Again.

Pcie device sub-type is to match the right device driver. Before that the pcie bus driver should make sure the bar memory can access.
So Ithink it's pcie bus driver issue.

Post Reply