dm: refine the reserved bar framework

1. refine the name of some functions and struct
2. add the support for PIO bar reservation

Tracked-On: #6508

Signed-off-by: Liu,Junming <junming.liu@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
This commit is contained in:
Liu,Junming
2021-09-08 11:26:57 +00:00
committed by wenlingz
parent 2ce85a18a7
commit d700154c90
3 changed files with 31 additions and 42 deletions

View File

@@ -249,19 +249,19 @@ struct pciecap {
} __attribute__((packed));
static_assert(sizeof(struct pciecap) == 60, "compile-time assertion failed");
struct mmio_rsvd_rgn {
struct io_rsvd_rgn {
uint64_t start;
uint64_t end;
int idx;
int bar_type;
/* if vdev=NULL, it also indicates this mmio_rsvd_rgn is not used */
/* if vdev=NULL, it also indicates this io_rsvd_rgn is not used */
struct pci_vdev *vdev;
};
extern struct mmio_rsvd_rgn reserved_bar_regions[REGION_NUMS];
int create_mmio_rsvd_rgn(uint64_t start,
extern struct io_rsvd_rgn reserved_bar_regions[REGION_NUMS];
int reserve_io_rgn(uint64_t start,
uint64_t end, int idx, int bar_type, struct pci_vdev *vdev);
void destory_mmio_rsvd_rgns(struct pci_vdev *vdev);
void destory_io_rsvd_rgns(struct pci_vdev *vdev);
/* Reserved region in e820 table for GVT
* for GVT-g use: