add SR-IOV support in EDK II.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9269 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -35,6 +35,7 @@ typedef struct {
|
||||
UINT64 Length;
|
||||
BOOLEAN Reserved;
|
||||
PCI_RESOURCE_USAGE ResourceUsage;
|
||||
BOOLEAN Virtual;
|
||||
} PCI_RESOURCE_NODE;
|
||||
|
||||
#define RESOURCE_NODE_FROM_LINK(a) \
|
||||
@@ -174,6 +175,28 @@ CreateResourceNode (
|
||||
IN PCI_RESOURCE_USAGE ResUsage
|
||||
);
|
||||
|
||||
/**
|
||||
This function is used to extract resource request from
|
||||
IOV VF device node list.
|
||||
|
||||
@param Bridge Pci device instance.
|
||||
@param IoNode Resource info node for IO.
|
||||
@param Mem32Node Resource info node for 32-bit memory.
|
||||
@param PMem32Node Resource info node for 32-bit Prefetchable Memory.
|
||||
@param Mem64Node Resource info node for 64-bit memory.
|
||||
@param PMem64Node Resource info node for 64-bit Prefetchable Memory.
|
||||
|
||||
**/
|
||||
PCI_RESOURCE_NODE *
|
||||
CreateVfResourceNode (
|
||||
IN PCI_IO_DEVICE *PciDev,
|
||||
IN UINT64 Length,
|
||||
IN UINT64 Alignment,
|
||||
IN UINT8 Bar,
|
||||
IN PCI_BAR_TYPE ResType,
|
||||
IN PCI_RESOURCE_USAGE ResUsage
|
||||
);
|
||||
|
||||
/**
|
||||
This function is used to extract resource request from
|
||||
device node list.
|
||||
@@ -287,6 +310,19 @@ ProgramBar (
|
||||
IN PCI_RESOURCE_NODE *Node
|
||||
);
|
||||
|
||||
/**
|
||||
Program IOV VF Bar register for PCI device.
|
||||
|
||||
@param Base Base address for PCI device resource to be progammed.
|
||||
@param Node Point to resoure node structure.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
ProgramVfBar (
|
||||
IN UINT64 Base,
|
||||
IN PCI_RESOURCE_NODE *Node
|
||||
);
|
||||
|
||||
/**
|
||||
Program PCI-PCI bridge apperture.
|
||||
|
||||
|
Reference in New Issue
Block a user