|
The Pedigree Project 0.1
|
#include <PciVirtualFunctions.h>
Collaboration diagram for PciVirtualFunctions:Public Member Functions | |
| PciVirtualFunctions (Device *pf) | |
| bool | enable (size_t count) |
| Device * | function (size_t index) const |
| size_t | count () const |
| bool | disable () |
Static Public Member Functions | |
| static bool | bar (Device *vf, uint8_t index, uint64_t &pciBase, uint64_t &bytes) |
Private Member Functions | |
| PciVirtualFunctions (const PciVirtualFunctions &)=delete | |
| PciVirtualFunctions & | operator= (const PciVirtualFunctions &)=delete |
| void | reclaim () |
Private Attributes | |
| Device * | m_Pf |
| Device * | m_Functions [MaxFunctions] = {} |
| bool | m_Present [MaxFunctions] = {} |
| bool | m_Reserved [6] = {} |
| size_t | m_PlannedCount = 0 |
| size_t | m_Count = 0 |
| uint16_t | m_Offset = 0 |
| uint16_t | m_NextCapability = 0 |
| PciSriov::State | m_Original |
| PciSriov::Geometry | m_Bars |
| bool | m_Touched = false |
| bool | m_EnableAttempted = false |
Static Private Attributes | |
| static constexpr size_t | MaxFunctions = 8 |
Owns an explicitly enabled, isolated group of VFs for one physical function. The PF and this group must outlive all VF users. The caller must quiesce the PF and clear its bus-master bit before enable(). VF controllers are children of the returned off-tree nodes and must be removed before disable(). The caller serializes all VF users with enable/disable.
VF Address entries named barN describe CPU-translated slices of PF VF BARs. The actual VF configuration BARs remain zero; drivers must use these assigned ranges without probing or rewriting VF BARs. Isolation covers requester DMA, not peer-to-peer routing or ACS.
Definition at line 21 of file PciVirtualFunctions.h.
|
explicit |
|
static |
| Device * PciVirtualFunctions::function | ( | size_t | index | ) | const |
|
private |
Definition at line 50 of file PciVirtualFunctions.h.
|
private |
Definition at line 46 of file PciVirtualFunctions.h.
|
private |
Definition at line 52 of file PciVirtualFunctions.h.
|
private |
Definition at line 42 of file PciVirtualFunctions.h.
|
private |
Definition at line 48 of file PciVirtualFunctions.h.
|
private |
Definition at line 47 of file PciVirtualFunctions.h.
|
private |
Definition at line 49 of file PciVirtualFunctions.h.
|
private |
Definition at line 41 of file PciVirtualFunctions.h.
|
private |
Definition at line 45 of file PciVirtualFunctions.h.
|
private |
Definition at line 43 of file PciVirtualFunctions.h.
|
private |
Definition at line 44 of file PciVirtualFunctions.h.
|
private |
Definition at line 51 of file PciVirtualFunctions.h.
|
staticconstexprprivate |
Definition at line 40 of file PciVirtualFunctions.h.