MSI Memory Writes

In endpoint mode, the client can request interrupt service by initiating message signaled interrupts (MSI). MSI uses memory write requests (using the memory write request format) to represent interrupt messages. The client generates the MSI memory write. The typical procedure for initiating an MSI request is:

  1. Host initializes the MSI capabilities of each function in the endpoint via configuration writes:
    1. Host configures lower 32 address bits in the MSI Message Address Low Register.
    2. Host configures upper 32 address bits in the MSI Message Address High Register.
    3. Host configures data in MSI Message Data Register.
    4. Host configures per-vector mask in MSI Mask Register.
    5. Host enables MSI by configuring the MSI Control Register.
  2. Check for MSI enable by sampling the MSI_ENABLE output. When a function's MSI_ENABLE is 1, the function can generate an MSI.
  3. Wait for a new outbound MSI request for a function or an MSI_MASK cleared event for a pending MSI.
    1. New MSI request, go to step 4.
    2. Pending MSI request (mask has been cleared by the host), go to step 5.
  4. New outbound MSI request for a function:
    1. Read the MSI address and data registers from the function's MSI Capability registers.
    2. Check whether that the MSI vector is not masked by sampling MSI_MASK.
    3. If masked, set the corresponding bit in the MSI Pending Bits Register using one of these methods:
      1. Use APB (default)—You can set or clear the MSI Pending Status Register bits by writing to them through the APB interface.
      2. Set directly—You can set or clear the MSI Pending Status Register bits directly using MSI_PENDING_STATUS_IN.
        Note: You select the mode by programming bit [9] (MSI Pending Status In Mode Select) in the Debug Mux Control 2 Register local management register.
      3. Go to step 2.
    4. If not masked:
      1. Allocate an MSI region on the AXI interface by programming the AXI region base address registers.
      2. Program the AXI to PCIe address translation registers for the allocated MSI region with the MSI address.
      3. Program the PCIe descriptor registers for the allocated MSI region with required values mentioned in the Memory Write column of the PCIe descriptor registers table.
      4. Generate an outbound write to the MSI region. The AXI write data is <MSI vector number> + <MSI data register value>.
      5. Go to step 2.
  5. MSI mask is cleared for a pending MSI vector for a function:
    1. Read the MSI address and data registers from the function's MSI capability registers.
    2. Transmit the MSI vector:
      1. Allocate an MSI region on the AXI interface by programming the AXI region base address registers.
      2. Program the AXI to PCIe address translation registers for the allocated MSI region with the MSI address.
      3. Program the PCIe descriptor registers for the allocated MSI region with required values mentioned in the Memory Write column of the PCIe descriptor registers table.
      4. Generate an outbound write to the MSI region. The AXI write data is <MSI vector number> + <MSI data register value>.
    3. Clear the corresponding bit in the MSI Pending Bits Register by writing to it through the APB local management interface.
    4. Go to step 2.