OID_SRIOV_PROBED_BARS
NDIS issues an object identifier (OID) query request of OID_SRIOV_PROBED_BARS to obtain the values of a network adapter's PCI Express (PCIe) Base Address Registers (BARs). This function returns the BAR values that were reported by the network adapter following a query performed by the PCI bus driver. This query determines the memory or I/O address space that is required by the network adapter.
NDIS issues OID query requests of OID_SRIOV_PROBED_BARS to the miniport driver for the network adapter's PCIe Physical Function (PF). This OID query 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 is formatted to contain the following:
An NDIS_SRIOV_PROBED_BARS_INFO structure that contains the parameters for a read operation on the PCI BARs of a network adapter.
An array of ULONG values for each BAR of the PCIe network adapter. The maximum number of elements within this array is PCI_TYPE0_ADDRESSES.
Remarks
The PCI bus driver, which runs in the management operating system of the Hyper-V parent partition, queries the memory or I/O address space requirements of each PCI Base Address Register (BAR) of the network adapter. The PCI bus driver performs this query when it first detects the adapter on the bus.
Through this PCI BAR query, the PCI bus driver determines the following:
Whether a PCI BAR is supported by the network adapter.
If a BAR is supported, how much memory or I/O address space is required for the BAR.
The virtual PCI (VPCI) bus driver runs in the guest operating system of a Hyper-V child partition. When a PCI Express (PCIe) Virtual Function (VF) is attached to the child partition, the VPCI bus driver will expose a virtual network adapter for the VF (VF network adapter). Before it does this, the VPCI bus driver must perform a PCI BAR query to determine the required memory or address space that is required by the VF network adapter.
Because access to the PCI configuration space is a privileged operation, it can only be performed by components that run in the management operating system of a Hyper-V parent partition. When the VPCI bus driver queries the PCI BARs, NDIS issues an OID query request of OID_SRIOV_PROBED_BARS to the PF miniport driver. The results returned by this OID query request are forwarded to the VPCI bus driver so that it can determine how much memory address space would be needed by the VF network adapter.
Note OID requests of OID_SRIOV_PROBED_BARS can only be issued by NDIS. The OID request must not be issued by overlying drivers, such as protocol of filter drivers.
The OID_SRIOV_PROBED_BARS query request contains an NDIS_SRIOV_PROBED_BARS_INFO structure. When the PF miniport driver handles this OID, the driver must return the PCI BAR values within the array referenced by the BaseRegisterValuesOffset member of the NDIS_SRIOV_PROBED_BARS_INFO structure. For each offset within the array, the PF miniport driver must set the array element to the ULONG value of the BAR at the same offset within the physical adapter's PCI configuration space.
Each BAR value returned by the driver must be the same value that would follow a PCI BAR query as performed by the PCI driver that runs in the management operating system. The PF miniport driver can call NdisMQueryProbedBars to determine this information.
For more information about the BARs of a PCI device, see the PCI Local Bus Specification.
For more information on how to query PCI BAR registers for a VF, see the Querying the PCI Base Address Registers of a Virtual Function.
Return Status Codes
The PF miniport driver returns one of the following status codes for the query request of OID_SRIOV_PROBED_BARS:
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_PROBED_BARS_INFO structure have invalid values. |
NDIS_STATUS_INVALID_LENGTH |
The information buffer is less than (sizeof(NDIS_SRIOV_PROBED_BARS_INFO) + PCI_TYPE0_ADDRESSES). The PF miniport driver must set the DATA.QUERY_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) |