HV: move struct pci_bar and pci_pdev to pci.h

Tracked-On: #2431
Signed-off-by: dongshen <dongsheng.x.zhang@intel.com>
Reviewed-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
dongshen
2019-01-23 14:26:50 -08:00
committed by ACRN System Integration
parent 0f745b4d15
commit 65f9370d76
2 changed files with 15 additions and 14 deletions

View File

@@ -138,6 +138,21 @@ enum pci_bar_type {
PCIBAR_MEM64,
};
struct pci_bar {
uint64_t base;
uint64_t size;
enum pci_bar_type type;
};
struct pci_pdev {
/* The bar info of the physical PCI device. */
struct pci_bar bar[PCI_BAR_COUNT];
/* The bus/device/function triple of the physical PCI device. */
union pci_bdf bdf;
};
typedef void (*pci_enumeration_cb)(uint16_t pbdf, const void *data);
static inline uint32_t pci_bar_offset(uint32_t idx)