NOVA User-Level Environment  Version testbox/changed-memory-timing-317-g320d8b5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
HostVfPci Class Reference

A helper for PCI config space access for virtual functions. More...

#include <hostvf.h>

Inheritance diagram for HostVfPci:
HostPci DirectPciDevice

Public Types

enum  { SRIOV_VF_BAR0 = 9, EXTCAP_ARI = 0x000EU, EXTCAP_SRIOV = 0x0010U }
- Public Types inherited from HostPci
enum  {
  BAR0 = 4, MAX_BAR = 6, BAR_TYPE_MASK = 0x6, BAR_TYPE_32B = 0x0,
  BAR_TYPE_64B = 0x4, BAR_IO = 0x1, BAR_IO_MASK = 0xFFFFFFFCU, BAR_MEM_MASK = 0xFFFFFFF0U,
  CAP_MSI = 0x05U, CAP_MSIX = 0x11U, CAP_PCIE = 0x10U
}

Public Member Functions

unsigned long long vf_bar_base_size (unsigned bdf, unsigned vf_no, unsigned no, unsigned long long &size, bool *is64bit=0)
 Return the base and size of a VF BAR (inside a SR-IOV capability).
unsigned vf_bdf (unsigned parent_bdf, unsigned vf_no)
 Compute BDF of a particular VF.
unsigned vf_device_id (unsigned parent_bdf)
 HostVfPci (DBus< MessageHwPciConfig > &bus_pcicfg, DBus< MessageHostOp > &bus_hostop)
- Public Member Functions inherited from HostPci
unsigned conf_read (unsigned bdf, unsigned dword)
void conf_write (unsigned bdf, unsigned dword, unsigned value)
unsigned count_bars (unsigned bdf)
 Induce the number of the bars from the header-type.
unsigned search_device (unsigned theclass, unsigned subclass, unsigned instance)
 Searches for a given device and returns the bdf of it.
unsigned search_bridge (unsigned dst)
 Scan the PCI root bus for bridges.
unsigned get_gsi_msi (DBus< MessageHostOp > &bus_hostop, unsigned bdf, unsigned nr, void *msix_table=0)
 Program the nr-th MSI/MSI-X vector of the given device.
unsigned get_gsi (DBus< MessageHostOp > &bus_hostop, DBus< MessageAcpi > &bus_acpi, unsigned bdf, unsigned nr, bool level=false, void *msix_table=0)
 Returns the gsi and enables them.
unsigned find_cap (unsigned bdf, unsigned char id)
 Find the position of a legacy PCI capability.
unsigned find_extended_cap (unsigned bdf, unsigned short id)
 Find the position of an extended PCI capability.
unsigned long long bar_base (unsigned bdf, unsigned bar, unsigned *type=0)
 Get the base and the type of a bar.
unsigned long long bar_size (unsigned bdf, unsigned bar, bool *is64bit=0)
 Determines BAR size.
 HostPci (DBus< MessageHwPciConfig > &bus_pcicfg, DBus< MessageHostOp > &bus_hostop)

Detailed Description

A helper for PCI config space access for virtual functions.

Member Enumeration Documentation

anonymous enum
Enumerator:
SRIOV_VF_BAR0 
EXTCAP_ARI 
EXTCAP_SRIOV 

Constructor & Destructor Documentation

HostVfPci::HostVfPci ( DBus< MessageHwPciConfig > &  bus_pcicfg,
DBus< MessageHostOp > &  bus_hostop 
)
inline

Member Function Documentation

unsigned long long HostVfPci::vf_bar_base_size ( unsigned  bdf,
unsigned  vf_no,
unsigned  no,
unsigned long long &  size,
bool *  is64bit = 0 
)
inline

Return the base and size of a VF BAR (inside a SR-IOV capability).

unsigned HostVfPci::vf_bdf ( unsigned  parent_bdf,
unsigned  vf_no 
)
inline

Compute BDF of a particular VF.

unsigned HostVfPci::vf_device_id ( unsigned  parent_bdf)
inline

The documentation for this class was generated from the following file: