IMX8DXL PCIe Endpoint enumeration

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

IMX8DXL PCIe Endpoint enumeration

跳至解决方案
3,054 次查看
KK-SIE
Contributor II

Hello Everyone,

It is related to PCIe link training + Enumeration.

Our setup:

Host: Intel with BIOS + Windows 10/Linux (debian) OS + PCIe Host

Device: imx8dxl PCIe Endpoint

I have imx8dxl configured as PCIe Endpoint. The link is up.

[   10.037555] pci_epf_test pci_epf_test.0: Failed to get private DMA rx channel. Falling back to generic one
[   10.037569] pci_epf_test pci_epf_test.0: Failed to get DMA channel
[   10.069805] imx6q-pcie 5f010000.pcie_ep: PCIe Gen.1 x1 link up
[   10.069841] imx6q-pcie 5f010000.pcie_ep: PCIe Gen.1 x1 link up
[   10.069855] imx6q-pcie 5f010000.pcie_ep: Link up, Gen1

Problem: imx8dxl PCIe endpoint device is not detected by Windows OS or Linux.

Questions:

1. What could be possible cause for not getting detected, inspite Link is Up?

2. As per PCIe Spec, after device power on + stable clock + PERST, we have 20 ms for Link training and 100ms for enumeration, is this correct? if so, how to achieve this with imx8dxl with uboot + Kernel which takes around 5 seconds for complete boot?

0 项奖励
回复
1 解答
2,873 次查看
KK-SIE
Contributor II

I got the document at the link: https://community.nxp.com/t5/P-Series/Configuring-PCIe-ports-in-endpoint-mode-in-uboot-and-Linux/m-p...

Answer: We need to do it in Uboot. Recommended to repartition the PCI Express initialization code and move it ahead of other code blocks irrelevant to PCI Express.

Snip:

Because a PCI Express endpoint card seated in each PCI Express slot of a x86 PC motherboard is only one of the many components that the entire PC system interoperates with, the system BIOS can not wait forever to discover the PCI Express endpoint card. To synchronize the PCI Express endpoint discovery process between the x86 PC host and the PCI Express endpoint card, the PCI Express CEM Specification defines a 100-msec rule from the de-assertion time of the PERST# (slot reset) to the time that a PCI Express root complex (host) is allowed to probe the connected downstream endpoint.

If a PCI Express endpoint card fails to respond the x86 PC host’s configuration cycle correctly at the time when the 100 msec expires, the host assumes it is malfunctioning. The x86 PC host BIOS might not wait for such PCI Express endpoint card to become available even the endpoint card might just need some more time to initialize itself. Such a PCI Express endpoint card would be disabled by the BIOS and become an undiscoverable PCI Express endpoint in the system.

....

In general, introducing less than a 10msec delay is fine. However, any delay beyond 10msec reduces the 100msec budget allocated from the slot reset’s deassertion to the configure cycle being responded by PCI Express end point. Therefore, it is recommended to repartition the PCI Express initialization code and move it ahead of other code blocks irrelevant to PCI Express.

在原帖中查看解决方案

0 项奖励
回复
3 回复数
2,874 次查看
KK-SIE
Contributor II

I got the document at the link: https://community.nxp.com/t5/P-Series/Configuring-PCIe-ports-in-endpoint-mode-in-uboot-and-Linux/m-p...

Answer: We need to do it in Uboot. Recommended to repartition the PCI Express initialization code and move it ahead of other code blocks irrelevant to PCI Express.

Snip:

Because a PCI Express endpoint card seated in each PCI Express slot of a x86 PC motherboard is only one of the many components that the entire PC system interoperates with, the system BIOS can not wait forever to discover the PCI Express endpoint card. To synchronize the PCI Express endpoint discovery process between the x86 PC host and the PCI Express endpoint card, the PCI Express CEM Specification defines a 100-msec rule from the de-assertion time of the PERST# (slot reset) to the time that a PCI Express root complex (host) is allowed to probe the connected downstream endpoint.

If a PCI Express endpoint card fails to respond the x86 PC host’s configuration cycle correctly at the time when the 100 msec expires, the host assumes it is malfunctioning. The x86 PC host BIOS might not wait for such PCI Express endpoint card to become available even the endpoint card might just need some more time to initialize itself. Such a PCI Express endpoint card would be disabled by the BIOS and become an undiscoverable PCI Express endpoint in the system.

....

In general, introducing less than a 10msec delay is fine. However, any delay beyond 10msec reduces the 100msec budget allocated from the slot reset’s deassertion to the configure cycle being responded by PCI Express end point. Therefore, it is recommended to repartition the PCI Express initialization code and move it ahead of other code blocks irrelevant to PCI Express.

0 项奖励
回复
2,872 次查看
KK-SIE
Contributor II

attached the document from the link

0 项奖励
回复
2,980 次查看
KK-SIE
Contributor II

Dear NXP Support team,

You expertise in this domain will be valuable direction to the project.

Kindly share you solutions. We look forward to your response.

Best regards,

KK

0 项奖励
回复
%3CLINGO-SUB%20id%3D%22lingo-sub-2057870%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EIMX8DXL%20PCIe%20%E7%AB%AF%E7%82%B9%E6%9E%9A%E4%B8%BE%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2057870%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E5%A4%A7%E5%AE%B6%E5%A5%BD%EF%BC%8C%3C%2FP%3E%3CP%3E%E5%AE%83%E4%B8%8E%20PCIe%20%E9%93%BE%E8%B7%AF%E8%AE%AD%E7%BB%83%20%2B%20%E6%9E%9A%E4%B8%BE%E7%9B%B8%E5%85%B3%E3%80%82%3C%2FP%3E%3CP%3E%E6%88%91%E4%BB%AC%E7%9A%84%E8%AE%BE%E7%BD%AE%EF%BC%9A%3C%2FP%3E%3CP%3E%E4%B8%BB%E6%9C%BA%EF%BC%9A%E8%8B%B1%E7%89%B9%E5%B0%94%EF%BC%88%E5%B8%A6%20BIOS%EF%BC%89%2B%20Windows%2010%2FLinux%EF%BC%88debian%EF%BC%89%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F%2B%20PCIe%20%E4%B8%BB%E6%9C%BA%3C%2FP%3E%3CP%3E%E8%AE%BE%E5%A4%87%EF%BC%9Aimx8dxl%20PCIe%20%E7%AB%AF%E7%82%B9%3C%2FP%3E%3CP%3E%E6%88%91%E5%B7%B2%E5%B0%86%20imx8dxl%20%E9%85%8D%E7%BD%AE%E4%B8%BA%20PCIe%20%E7%AB%AF%E7%82%B9%E3%80%82%E9%93%BE%E6%8E%A5%E5%B7%B2%E5%BB%BA%E7%AB%8B%E3%80%82%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-c%22%3E%3CCODE%20translate%3D%22no%22%3E%5B%20%20%2010.037555%5D%20pci_epf_test%20pci_epf_test.0%3A%20Failed%20to%20get%20private%20DMA%20rx%20channel.%20Falling%20back%20to%20generic%20one%0A%5B%20%20%2010.037569%5D%20pci_epf_test%20pci_epf_test.0%3A%20Failed%20to%20get%20DMA%20channel%0A%5B%20%20%2010.069805%5D%20imx6q-pcie%205f010000.pcie_ep%3A%20PCIe%20Gen.1%20x1%20link%20up%0A%5B%20%20%2010.069841%5D%20imx6q-pcie%205f010000.pcie_ep%3A%20PCIe%20Gen.1%20x1%20link%20up%0A%5B%20%20%2010.069855%5D%20imx6q-pcie%205f010000.pcie_ep%3A%20Link%20up%2C%20Gen1%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%E9%97%AE%E9%A2%98%EF%BC%9AWindows%20%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F%E6%88%96%20Linux%20%E6%97%A0%E6%B3%95%E6%A3%80%E6%B5%8B%E5%88%B0%20imx8dxl%20PCIe%20%E7%AB%AF%E7%82%B9%E8%AE%BE%E5%A4%87%E3%80%82%3C%2FP%3E%3CP%3E%E9%97%AE%E9%A2%98%EF%BC%9A%3C%2FP%3E%3CP%3E1.%20%E5%B0%BD%E7%AE%A1%E9%93%BE%E8%B7%AF%E5%B7%B2%E8%BF%9E%E6%8E%A5%EF%BC%8C%E4%BD%86%E6%9C%AA%E8%A2%AB%E6%A3%80%E6%B5%8B%E5%88%B0%E7%9A%84%E5%8F%AF%E8%83%BD%E5%8E%9F%E5%9B%A0%E6%98%AF%E4%BB%80%E4%B9%88%EF%BC%9F%3C%2FP%3E%3CP%3E2.%20%E6%A0%B9%E6%8D%AE%20PCIe%20%E8%A7%84%E8%8C%83%EF%BC%8C%E8%AE%BE%E5%A4%87%E4%B8%8A%E7%94%B5%20%2B%20%E7%A8%B3%E5%AE%9A%E6%97%B6%E9%92%9F%20%2B%20PERST%20%E5%90%8E%EF%BC%8C%E6%88%91%E4%BB%AC%E6%9C%89%2020%20ms%20%E7%9A%84%E6%97%B6%E9%97%B4%E8%BF%9B%E8%A1%8C%E9%93%BE%E8%B7%AF%E8%AE%AD%E7%BB%83%EF%BC%8C100%20ms%20%E7%9A%84%E6%97%B6%E9%97%B4%E8%BF%9B%E8%A1%8C%E6%9E%9A%E4%B8%BE%EF%BC%8C%E8%BF%99%E6%98%AF%E6%AD%A3%E7%A1%AE%E7%9A%84%E5%90%97%EF%BC%9F%E5%A6%82%E6%9E%9C%E6%98%AF%E8%BF%99%E6%A0%B7%EF%BC%8C%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8%E5%B8%A6%E6%9C%89%20uboot%20%2B%20%E5%86%85%E6%A0%B8%E7%9A%84%20imx8dxl%20%E5%AE%9E%E7%8E%B0%E8%BF%99%E4%B8%80%E7%82%B9%EF%BC%8C%E5%A4%A7%E7%BA%A6%E9%9C%80%E8%A6%81%205%20%E7%A7%92%E6%89%8D%E8%83%BD%E5%AE%8C%E6%88%90%E5%90%AF%E5%8A%A8%EF%BC%9F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2086697%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9AIMX8DXL%20PCIe%20%E7%AB%AF%E7%82%B9%E6%9E%9A%E4%B8%BE%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2086697%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E9%99%84%E4%B8%8A%E9%93%BE%E6%8E%A5%E4%B8%AD%E7%9A%84%E6%96%87%E6%A1%A3%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2062830%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9AIMX8DXL%20PCIe%20%E7%AB%AF%E7%82%B9%E6%9E%9A%E4%B8%BE%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2062830%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E5%B0%8A%E6%95%AC%E7%9A%84%E6%81%A9%E6%99%BA%E6%B5%A6%E6%94%AF%E6%8C%81%E5%9B%A2%E9%98%9F%EF%BC%8C%3C%2FP%3E%3CP%3E%E6%82%A8%E5%9C%A8%E8%AF%A5%E9%A2%86%E5%9F%9F%E7%9A%84%E4%B8%93%E4%B8%9A%E7%9F%A5%E8%AF%86%E5%B0%86%E4%B8%BA%E8%AF%A5%E9%A1%B9%E7%9B%AE%E6%8F%90%E4%BE%9B%E5%AE%9D%E8%B4%B5%E7%9A%84%E6%96%B9%E5%90%91%E3%80%82%3C%2FP%3E%3CP%3E%E8%AF%B7%E5%88%86%E4%BA%AB%E6%82%A8%E7%9A%84%E8%A7%A3%E5%86%B3%E6%96%B9%E6%A1%88%E3%80%82%E6%88%91%E4%BB%AC%E6%9C%9F%E5%BE%85%E6%82%A8%E7%9A%84%E5%9B%9E%E5%A4%8D%E3%80%82%3C%2FP%3E%3CP%3E%E9%A1%BA%E7%A5%9D%E5%95%86%E7%A5%BA%EF%BC%81%3C%2FP%3E%3CP%3E%E4%B9%9D%3C%2FP%3E%3C%2FLINGO-BODY%3E