Forum Discussion
Altera_Forum
Honored Contributor
16 years agoMsi-x.
Hello All. How I can generate MSI-X interrupt? I'm enable MSI-X support in megafunction. And set MSI-X table adrees in by BAR. I'm set table size is 2. I'm reading PCI_rev_3.0 --- ...
Altera_Forum
Honored Contributor
16 years agoRead the whole section 4.3 of the Linux kernel’s Documentation/PCI/MSI-HOWTO.txt. The table of type struct msix_entry *, second argument to the call to pci_enable_msix(), has to be filled by the application just for letting the kernel know which MSI-X vectors, supported by the device, should be assigned an interrupt.
This struct msix_entry has nothing to do with the MSI-X Table. The MSI-X Table, located inside your device’s application, is maintained by the kernel alone. The device driver should never touch the MSI-X Table (Section 4.3.3). The approach taken by Linux with the current struct msix_entry, leaves the option of MSI-X untouched to map (alias) different MSI-X vectors to the same interrupt vector on the lowest level. I.e. if your application is capable of generating 2048 vectors, you have to map them to 2048 different interrupts in Linux to make proper use of them. MSI-X would have allowed to map them down to a single interrupt by writing the same message address and data to the all entries in the MSI-X Table.