RtQueryPciMsiCapability

RtQueryPciMsiCapability allows a user to query a PCI device and determine if the device has MSI or MSI-X capability. RtQueryPciMsiCapability is only supported in the RTSS environment. It cannot be called from a Windows application linked to RTX.

Syntax

MSI_CAPABILITY RtQueryPciMsiCapability(
    ULONG BusNumber
    PCI_SLOT_NUMBER SlotNumber
);

Parameters

BusNumber

The bus the device is on in a multiple bus environment, with counting starting at zero.

SlotNumber

The logical slot number. This is a PCI_SLOT_NUMBER type value.

Return Values

See MSI_CAPABILITY 

Comments

Typically, the user calls RtQueryPciMsiCapability to determine if a PCI device has MSI/MSI-X capability, before calling RtAttachInterrupt to associate an IST and ISR with hardware interrupts. RtAttachInterrupt relies on an ATTACH_INTERRUPT_PARAMETERS structure to supply the parameters that describe the requested interrupt attachment. ATTACH_INTERRUPT_PARAMETERS is a union of two structures: LineBased provides parameters for a line-based interrupt while MessageBased provides parameters for an MSI or MSI-X interrupt.

If a PCI device does not have MSI/MSI-X capability, the user must use the ATTACH_LINE_BASED value for AttachVersion in the ATTACH_INTERRUPT_PARAMETERS structure to specify a line-based attachment and fill in the line-based set of input arguments.

If a PCI device has MSI/MSI-X capability, but the user does not reserve an IRQ resource or there is an IRQ resource conflict in RTX Properties, the user must use the ATTACH_MESSAGE_BASED value for AttachVersion in the ATTACH_INTERRUPT_PARAMETERS structure to specify a message-based attachment, and fill in the message-based set of input arguments.

If a PCI device has MSI/MSI-X capability, and the user reserves an IRQ resource successfully in RTX Properties, both values (ATTACH_LINE_BASED or ATTACH_MESSAGE_BASED) can be set for AttachVersion.

Requirements

Header Rtapi.h
Library Rtx_Rtss.lib

Example

See the IntelPro1000 topic for information on an example that uses the RtQueryPciMsiCapability function.

See Also:

RtAttachInterrupt

RtReleaseInterrupt

IntervalZero.com | Support | Give Feedback