summaryrefslogtreecommitdiff
path: root/usr/src/cmd/bhyve/pci_emul.h
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/cmd/bhyve/pci_emul.h')
-rw-r--r--usr/src/cmd/bhyve/pci_emul.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/usr/src/cmd/bhyve/pci_emul.h b/usr/src/cmd/bhyve/pci_emul.h
index cc3a8c048c..d01d2a7596 100644
--- a/usr/src/cmd/bhyve/pci_emul.h
+++ b/usr/src/cmd/bhyve/pci_emul.h
@@ -99,6 +99,7 @@ struct pcibar {
enum pcibar_type type; /* io or memory */
uint64_t size;
uint64_t addr;
+ uint8_t lobits;
};
#define PI_NAMESZ 40
@@ -109,7 +110,7 @@ struct msix_table_entry {
uint32_t vector_control;
} __packed;
-/*
+/*
* In case the structure is modified to hold extra information, use a define
* for the size that should be emulated.
*/
@@ -155,10 +156,12 @@ struct pci_devinst {
int table_count;
uint32_t pba_offset;
int pba_size;
- int function_mask;
+ int function_mask;
struct msix_table_entry *table; /* allocated at runtime */
void *pba_page;
int pba_page_offset;
+ uint8_t *mapped_addr;
+ size_t mapped_size;
} pi_msix;
void *pi_arg; /* devemu-private data */
@@ -257,21 +260,21 @@ void pci_write_dsdt(void);
uint64_t pci_ecfg_base(void);
int pci_bus_configured(int bus);
-static __inline void
+static __inline void
pci_set_cfgdata8(struct pci_devinst *pi, int offset, uint8_t val)
{
assert(offset <= PCI_REGMAX);
*(uint8_t *)(pi->pi_cfgdata + offset) = val;
}
-static __inline void
+static __inline void
pci_set_cfgdata16(struct pci_devinst *pi, int offset, uint16_t val)
{
assert(offset <= (PCI_REGMAX - 1) && (offset & 1) == 0);
*(uint16_t *)(pi->pi_cfgdata + offset) = val;
}
-static __inline void
+static __inline void
pci_set_cfgdata32(struct pci_devinst *pi, int offset, uint32_t val)
{
assert(offset <= (PCI_REGMAX - 3) && (offset & 3) == 0);