Visible to Intel only — GUID: ldy1710986282625
Ixiasoft
Visible to Intel only — GUID: ldy1710986282625
Ixiasoft
4.5.3. Message Signal Interrupt Extended (MSI-X)
The use applicatio geeates MSI-X messages which ae sigle-Dwod memoy wites. The MSI-X Capability stuctue poits to a MSI-X table stuctue ad a MSI-X Pedig Bit Aay (PBA) stuctue which ae stoed i memoy. This scheme is diffeet tha the MSI Capability stuctue, which cotais all the cotol ad status ifomatio fo the iteupts.
The GTS AXI Steamig IP povides a Cofiguatio Itecept Iteface. Use soft logic moitos this iteface to get MSI-X Eable ad MSI-X fuctio mask elated ifomatio. Use applicatio logic implemets the MSI-X tables fo all PFs ad VFs at the memoy space poited to by the BARs as a pat of you Applicatio Laye. Fo moe ifomatio o the MSI-X elated ifomatio that you ca obtai fom the Cofiguatio Itecept Iteface, efe to the MSI-X Registes sectio i the PCI Expess* Cofiguatio Space sectio.
MSI-X is a optioal featue that allows the use applicatio to suppot lage umbe of vectos with idepedet message data ad addess fo each vecto. Whe MSI-X is suppoted, you must specify the size ad the locatio (BARs ad offsets) of the MSI-X table ad PBA.
MSI-X ca suppot up to 2048 vectos pe fuctio vesus 32 vectos pe fuctio fo MSI. A fuctio is allowed to sed MSI-X messages whe MSI-X is eabled ad the fuctio is ot masked. The applicatio uses Cofiguatio Itecept Iteface to access this ifomatio.
Whe the applicatio eeds to geeate a MSI-X, it uses the cotets of the MSI-X Table (Addess ad Data) ad geeates a Memoy Wite though the GTS AXI Steamig iteface.
If you eable the MSI-X iteupt, you must implemet the MSI-X table stuctues at the memoy space poited to by the BARs as a pat of you Applicatio Laye. The MSI-X Capability Stuctue cotais ifomatio about the MSI-X Table ad PBA Stuctue. Fo example, it cotais poites to the bases of the MSI-X Table ad PBA Stuctue, expessed as offsets fom the addesses i the fuctio's BARs. The Message Cotol egiste withi the MSI-X Capability Stuctue also cotais the MSI-X Eable bit, the Fuctio Mask bit, ad the size of the MSI-X Table.
MSI-X iteupts ae stadad Memoy Wites, theefoe Memoy Wite odeig ules apply.
MSI-X Vecto | MSI-X Uppe Addess | MSI-X Lowe Addess | MSI-X Data |
---|---|---|---|
0 | 0x00000001 | 0xAAAA0000 | 0x00000001 |
1 | 0x00000001 | 0xBBBB0000 | 0x00000002 |
2 | 0x00000001 | 0xCCCC0000 | 0x00000003 |
PBA Table | PBA Eties |
---|---|
Offset 0 | 0x0 |
If the applicatio eeds to geeate a MSI-X iteupt (vecto 1), it eads the MSI-X Table ifomatio, geeates a MWR TLP though the Avalo® steamig iteface ad assets the coespodig PBA bits (bit[1]) i a simila fashio as fo MSI geeatio.
The geeated TLP is set to addess 0x00000001_BBBB0000 ad the data is 0x00000002. Whe the MSI-X has bee set, the applicatio ca clea the associated PBA bits. The MSI-X capability stuctue poits to the MSI-X Table stuctue ad MSI-X Pedig Bit Aay (PBA) egistes. The BIOS sets up the statig addess offsets ad BAR associated with the poite to the statig addess of the MSI-X Table ad PBA egistes.
- Host softwae sets up the MSI-X iteupts i the Applicatio Laye by completig the followig steps:
- Host softwae eads the Message Cotol egiste at 0x050 egiste to detemie the MSI-X Table size. The umbe of table eties is the <value ead> + 1. The maximum table size is 2048 eties. Each 16-byte ety is divided i 4 fields as show i the figue below. Fo multi-fuctio vaiats, BAR4 accesses the MSI-X table. Fo all othe vaiats, ay BAR ca access the MSI-X table. The base addess of the MSI-X table must be aliged to a 4 KB bouday.
- The host sets up the MSI-X table. It pogams MSI-X addess, data, ad masks bits fo each ety as show i the figue below.
Figue 21. Fomat of MSI-X Table
- The host calculates the addess of the <th> ety usig the followig fomula:
th_addess = base addess[BAR]+16<>
- Whe Applicatio Laye eeds to issue a iteupt, it dives a iteupt equest to the IRQ Souce module.
- 3. The IRQ Souces sets appopiate bit i the MSI-X PBA table. The PBA ca use qwod o dwod accesses. Fo qwod accesses, the IRQ Souce calculates the addess of the <mth> bit usig the followig fomulas:
qwod addess = <PBA base add> + 8(floo(<m>/64)) qwod bit = <m> mod 64
Figue 22. MSI-X PBA Table - The IRQ Pocesso eads the ety i the MSI-X Table.
- If the iteupt is masked by the Vecto_Cotol field of the MSI-X table, the iteupt emais i the pedig state.
- If the iteupt is ot masked, IRQ Pocesso seds Memoy Wite Request to the TX slave iteface. It uses the addess ad data fom the MSI-X table. If Message Uppe Addess =0, the IRQ Pocesso ceates a thee-dwod heade. If the Message Uppe Addess > 0, it ceates a 4-dwod heade.
- The host iteupt sevice outie detects the TLP as a iteupt ad sevice it.