How to map PCI RID to a custom ITS Device ID instead of using Stream ID?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to map PCI RID to a custom ITS Device ID instead of using Stream ID?

280件の閲覧回数
Austinn
Contributor II

Hi,

I am working on the LX2160A SoC. To my understanding, when a PCI peripheral or function triggers an MSI interrupt, it perform a PCI memory write (via a TLP), and the MSI mechanism extracts the Requester ID (RID) from the TLP header. This RID is then matched to a stream ID. All devices and functinons downstream of the PCI controller uses the same stream ID. This stream ID is then used as the device ID in the Interrupt Translation Table.

My questions are:

1. Can the stream ID be replaced with a custom ID so that there is a unique device ID for each BDF?

2. Where is the RID-to-stream ID mapping and how is this stream ID being forwarded to the ITS?

Please correct me if my understanding is incorrect. I believe Linux achieved this goal of one device ID for each BDF by using msi-map. Though I don't see where it overrides the stream ID with the custom ID and how this ID is forwarded to ITS.

Thanks,

ラベル(1)
タグ(4)
0 件の賞賛
返信
3 返答(返信)

210件の閲覧回数
yipingwang
NXP TechSupport
NXP TechSupport

Yes, it can be achieved by using the msi-map property in device tree. which allow mapping each RID to a unique Device ID. Which will bypass the default behavior. On the LX2160A, U-Boot typically sets up the msi-map during early boot and embeds it into the device tree via fixup.

0 件の賞賛
返信

194件の閲覧回数
Austinn
Contributor II

Can you let me know the how to exactly map this? Mirroring this msi-map on QNX didn't give us the expected results. Would we have to set the PCIe Look Up Table (PCIe_LUT) or something in particular?

 

Thanks,

Austin

0 件の賞賛
返信

177件の閲覧回数
yipingwang
NXP TechSupport
NXP TechSupport

Yes, In background Linux system using msi-map where GIC/ITS, MSIs are routed using StreamID with PCIe LUT and send the interrupt to right processor/core. In QNX you may need to configure PCIe LUT explicitly to achieve similar behavior, if it is handled by QNX framework.

0 件の賞賛
返信