OID_SRIOV_BAR_RESOURCES
NDIS issues an object identifier (OID) method request of OID_SRIOV_BAR_RESOURCES to determine the memory resources that were allocated to a PCI Express (PCIe) Base Address Register (BAR) of a PCIe Virtual Function (VF).
NDIS issues this OID method request to the miniport driver for the network adapter's PCIe Physical Function (PF). This OID method request is required for PF miniport drivers that support the single root I/O virtualization (SR-IOV) interface.
The InformationBuffer member of the NDIS_OID_REQUEST structure contains a pointer to a buffer. This buffer contains the following structures:
An NDIS_SRIOV_BAR_RESOURCES_INFO structure that specifies the VF and BAR for which the PF miniport driver returns resource information.
A CM_PARTIAL_RESOURCE_DESCRIPTOR structure which follows the NDIS_SRIOV_BAR_RESOURCES_INFO structure. The CM_PARTIAL_RESOURCE_DESCRIPTOR structure contains information about the memory resources that were allocated to the specified BAR.
Remarks
NDIS issues an OID method request of OID_SRIOV_BAR_RESOURCES to obtain the system physical address and length of the memory resources that were allocated to a VF BAR. Before it issues the OID method request, NDIS formats the NDIS_SRIOV_BAR_RESOURCES_INFO structure in the following way:
NDIS sets the VFId member of the NDIS_SRIOV_BAR_RESOURCES_INFO structure to the identifier associated with the VF.
NDIS sets the BarIndex member of the NDIS_SRIOV_BAR_RESOURCES_INFO structure to the BAR index for the specified VF. The BAR index is the offset of the register within the table of BARs in the PCI configuration space.
NDIS sets the BarResourcesOffset member of the NDIS_SRIOV_BAR_RESOURCES_INFO structure to the offset, in units of bytes, from the beginning of the NDIS_SRIOV_BAR_RESOURCES_INFO structure to a CM_PARTIAL_RESOURCE_DESCRIPTOR structure.
Note Overlying drivers, such as protocol or filter drivers, cannot issue OID method requests of OID_SRIOV_BAR_RESOURCES to the PF miniport driver.
When the PF miniport driver receives the OID method request, the driver returns the resources for the specified BAR by formatting the CM_PARTIAL_RESOURCE_DESCRIPTOR structure within the InformationBuffer member of the NDIS_OID_REQUEST structure. The driver formats the CM_PARTIAL_RESOURCE_DESCRIPTOR structure with the system hardware resources associated with the BAR for the specified VF.
Note The driver must format the structure for a resource type of CmResourceTypeMemory.
Return Status Codes
The PF miniport driver returns one of the following status codes for the method request of OID_SRIOV_BAR_RESOURCES.
Status Code | Description |
---|---|
NDIS_STATUS_SUCCESS |
The OID request completed successfully. |
NDIS_STATUS_NOT_SUPPORTED |
The PF miniport driver either does not support the single root I/O virtualization (SR-IOV) interface or is not enabled to use the interface. |
NDIS_STATUS_INVALID_PARAMETER |
One or more of the members of the NDIS_SRIOV_BAR_RESOURCES_INFO structure have invalid values. |
NDIS_STATUS_INVALID_LENGTH |
The information buffer is less than (sizeof(NDIS_SRIOV_BAR_RESOURCES_INFO) + sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR). The PF miniport driver must set the DATA.METHOD_INFORMATION.BytesNeeded member in the NDIS_OID_REQUEST structure to the minimum buffer size that is required. |
NDIS_STATUS_FAILURE |
The request failed for other reasons. |
Requirements
Version |
Supported in NDIS 6.30 and later. |
Header |
Ntddndis.h (include Ndis.h) |