Changeset View
Changeset View
Standalone View
Standalone View
sys/sys/pciio.h
Show First 20 Lines • Show All 145 Lines • ▼ Show 20 Lines | struct pci_bar_mmap { | ||||
int pbm_bar_off; /* offset from the mapped base to the | int pbm_bar_off; /* offset from the mapped base to the | ||||
start of BAR */ | start of BAR */ | ||||
struct pcisel pbm_sel; /* device to operate on */ | struct pcisel pbm_sel; /* device to operate on */ | ||||
int pbm_reg; /* starting address of BAR */ | int pbm_reg; /* starting address of BAR */ | ||||
int pbm_flags; | int pbm_flags; | ||||
int pbm_memattr; | int pbm_memattr; | ||||
}; | }; | ||||
struct pci_bar_ioreq { | |||||
struct pcisel pbi_sel; /* device to operate on */ | |||||
#define PCIBARIO_READ 0x1 | |||||
#define PCIBARIO_WRITE 0x2 | |||||
int pbi_op; | |||||
uint32_t pbi_bar; | |||||
uint32_t pbi_offset; | |||||
uint32_t pbi_width; | |||||
uint32_t pbi_value; | |||||
}; | |||||
#define PCIIO_BAR_MMAP_FIXED 0x01 | #define PCIIO_BAR_MMAP_FIXED 0x01 | ||||
#define PCIIO_BAR_MMAP_EXCL 0x02 | #define PCIIO_BAR_MMAP_EXCL 0x02 | ||||
#define PCIIO_BAR_MMAP_RW 0x04 | #define PCIIO_BAR_MMAP_RW 0x04 | ||||
#define PCIIO_BAR_MMAP_ACTIVATE 0x08 | #define PCIIO_BAR_MMAP_ACTIVATE 0x08 | ||||
#define PCIOCGETCONF _IOWR('p', 5, struct pci_conf_io) | #define PCIOCGETCONF _IOWR('p', 5, struct pci_conf_io) | ||||
#define PCIOCREAD _IOWR('p', 2, struct pci_io) | #define PCIOCREAD _IOWR('p', 2, struct pci_io) | ||||
#define PCIOCWRITE _IOWR('p', 3, struct pci_io) | #define PCIOCWRITE _IOWR('p', 3, struct pci_io) | ||||
#define PCIOCATTACHED _IOWR('p', 4, struct pci_io) | #define PCIOCATTACHED _IOWR('p', 4, struct pci_io) | ||||
#define PCIOCGETBAR _IOWR('p', 6, struct pci_bar_io) | #define PCIOCGETBAR _IOWR('p', 6, struct pci_bar_io) | ||||
#define PCIOCLISTVPD _IOWR('p', 7, struct pci_list_vpd_io) | #define PCIOCLISTVPD _IOWR('p', 7, struct pci_list_vpd_io) | ||||
#define PCIOCBARMMAP _IOWR('p', 8, struct pci_bar_mmap) | #define PCIOCBARMMAP _IOWR('p', 8, struct pci_bar_mmap) | ||||
#define PCIOCBARIO _IOWR('p', 9, struct pci_bar_ioreq) | |||||
#endif /* !_SYS_PCIIO_H_ */ | #endif /* !_SYS_PCIIO_H_ */ |