FPGA Intellectual Property
PCI Express*, Networking and Connectivity, Memory Interfaces, DSP IP, and Video IP

Msi-x.

Altera_Forum
Honored Contributor II
1,616 Views

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  

 

 

--- Quote Start ---  

To request service using a given MSI-X Table entry, a function performs a DWORD 

memory write transaction using the contents of the Message Data field entry for data, the 

contents of the Message Upper Address register for the upper 32 bits of address, and the 

contents of the Message Address field entry for the lower 32 bits of address. A memory 

read transaction from the address targeted by the MSI-X message produces undefined 

results. 

--- Quote End ---  

But in Linux kernel  

struct msix_entry { u32 vector; /* kernel uses to write allocated vector */ u16 entry; /* driver uses to specify entry, OS writes */ };I can't find "upper 32 bits of address".  

 

I can make a two 32 bit registers "vector" and two 16 bit register "entry". Bot I can't understand how to make interrupt? Just make memory write to address in 32 bit register? Why I need 16 bit register?
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
350 Views

Read 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.
0 Kudos
Altera_Forum
Honored Contributor II
350 Views

All thanks!!! I'm understand!

0 Kudos
Altera_Forum
Honored Contributor II
350 Views

Then: Good luck! :)

0 Kudos
Reply