mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-07-01 09:42:10 +00:00
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:
parent
0f745b4d15
commit
65f9370d76
@ -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)
|
||||
|
@ -45,26 +45,12 @@ struct pci_vdev_ops {
|
||||
uint32_t bytes, uint32_t *val);
|
||||
};
|
||||
|
||||
struct pci_bar {
|
||||
uint64_t base;
|
||||
uint64_t size;
|
||||
enum pci_bar_type type;
|
||||
};
|
||||
|
||||
struct msix_table_entry {
|
||||
uint64_t addr;
|
||||
uint32_t data;
|
||||
uint32_t vector_control;
|
||||
};
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
/* MSI capability structure */
|
||||
struct pci_msi {
|
||||
uint32_t capoff;
|
||||
|
Loading…
Reference in New Issue
Block a user