Changeset View
Changeset View
Standalone View
Standalone View
sys/sys/pciio.h
Show First 20 Lines • Show All 132 Lines • ▼ Show 20 Lines | ((struct pci_vpd_element *)((char *)(pve) + \ | ||||
sizeof(struct pci_vpd_element) + (pve)->pve_datalen)) | sizeof(struct pci_vpd_element) + (pve)->pve_datalen)) | ||||
struct pci_list_vpd_io { | struct pci_list_vpd_io { | ||||
struct pcisel plvi_sel; /* device to operate on */ | struct pcisel plvi_sel; /* device to operate on */ | ||||
size_t plvi_len; /* size of the data area */ | size_t plvi_len; /* size of the data area */ | ||||
struct pci_vpd_element *plvi_data; | struct pci_vpd_element *plvi_data; | ||||
}; | }; | ||||
struct pci_bar_mmap { | |||||
void *pbm_map_base; /* (sometimes IN)/OUT mmaped base */ | |||||
size_t pbm_map_length; /* mapped length of the BAR, multiple | |||||
of pages */ | |||||
uint64_t pbm_bar_length; /* actual length of the BAR */ | |||||
int pbm_bar_off; /* offset from the mapped base to the | |||||
imp: Should this be vm_offset_t? | |||||
Not Done Inline ActionsNo, this value is small integer < PAGE_SIZE. vm_offset_t would make this structure non-invariant for ILP32/LP64 and require ABI translation for compat32. kib: No, this value is small integer < PAGE_SIZE. vm_offset_t would make this structure non… | |||||
start of BAR */ | |||||
struct pcisel pbm_sel; /* device to operate on */ | |||||
int pbm_reg; /* starting address of BAR */ | |||||
int pbm_flags; | |||||
int pbm_memattr; | |||||
}; | |||||
#define PCIIO_BAR_MMAP_FIXED 0x01 | |||||
#define PCIIO_BAR_MMAP_EXCL 0x02 | |||||
#define PCIIO_BAR_MMAP_RW 0x04 | |||||
#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) | |||||
#endif /* !_SYS_PCIIO_H_ */ | #endif /* !_SYS_PCIIO_H_ */ |
Should this be vm_offset_t?