What role do interrupts play in PCIe

Comments and questions related to the "Down to the TLP" pages

What role do interrupts play in PCIe

Postby Guest » Wed Jul 24, 2013 4:00 pm

I have come across different type of interrupts in PCIe. These are MSI and INT-X. I have not read come across what their purpose is. Why do we have them in the first place?

Re: What role do interrupts play in PCIe

Postby support » Wed Jul 24, 2013 9:11 pm


To begin with, PCIe needs to be backwards compatible with classic PCI, so that a PCI bus can sit behind a PCI/PCIe bridge. For that reason alone, anything PCI can do, PCIe must be able to do as well.

In the beginning of PCI, there were only INTx interrupts. This turned out to be a poor solution as PCI buses became populated with more than four devices (which happened quite quickly) which forced interrupt sharing, so one faulty piece of hardware or driver could mess up a perfectly working piece of hardware or driver, making it look like it's the latter's fault.

To solve that issue, MSI was introduced at some PCI version (I don't recall exactly which). The idea is that during the enumeration, the root complex tells the peripheral something like: "To request an interrupt, write the value X to bus address Y as a bus master" by setting some registers in the peripheral's configuration space.

INTx is supported by PCIe for backward compatibility, and also to allow old operating systems that don't support MSI (e.g. Windows XP) to work with PCIe devices. It's otherwise not recommended to use INTx in PCIe designs. The MSI is not just a better solution, but it the natural way to request an interrupt, as the peripheral only needs to send a plain write TLP. INTx interrupts, on the other hand, require two control TLPs, one to assert the virtual interrupt line, and a second to deassert it.

So the bottom line is that for new designs, MSI should be used, and INTx can be made available as a fallback for Windows XP, old Linux kernels and poorly implemented PCIe interfaces on the root complex.

I hope this shed some light.
Posts: 733
Joined: Tue Apr 24, 2012 3:46 pm

Return to General PCIe