Provide the structures and ioctl number definition for handling
PCIOCGETCONF compat32. Submitted by: John Wehle <john feith com> MFC after: 2 weeks
This commit is contained in:
parent
6fd8c2bd8a
commit
4ee107ddc9
@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/mdioctl.h>
|
||||
#include <sys/memrange.h>
|
||||
#include <sys/pciio.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/syscall.h>
|
||||
#include <sys/syscallsubr.h>
|
||||
@ -58,6 +59,9 @@ CTASSERT((sizeof(struct md_ioctl32)+4) == 436);
|
||||
CTASSERT(sizeof(struct ioc_read_toc_entry32) == 8);
|
||||
CTASSERT(sizeof(struct ioc_toc_header32) == 4);
|
||||
CTASSERT(sizeof(struct mem_range_op32) == 12);
|
||||
CTASSERT(sizeof(struct pci_conf_io32) == 36);
|
||||
CTASSERT(sizeof(struct pci_match_conf32) == 44);
|
||||
CTASSERT(sizeof(struct pci_conf32) == 44);
|
||||
|
||||
|
||||
static int
|
||||
|
@ -73,6 +73,45 @@ struct mem_range_op32
|
||||
int mo_arg[2];
|
||||
};
|
||||
|
||||
struct pci_conf32 {
|
||||
struct pcisel pc_sel; /* domain+bus+slot+function */
|
||||
u_int8_t pc_hdr; /* PCI header type */
|
||||
u_int16_t pc_subvendor; /* card vendor ID */
|
||||
u_int16_t pc_subdevice; /* card device ID, assigned by
|
||||
card vendor */
|
||||
u_int16_t pc_vendor; /* chip vendor ID */
|
||||
u_int16_t pc_device; /* chip device ID, assigned by
|
||||
chip vendor */
|
||||
u_int8_t pc_class; /* chip PCI class */
|
||||
u_int8_t pc_subclass; /* chip PCI subclass */
|
||||
u_int8_t pc_progif; /* chip PCI programming interface */
|
||||
u_int8_t pc_revid; /* chip revision ID */
|
||||
char pd_name[PCI_MAXNAMELEN + 1]; /* device name */
|
||||
u_int32_t pd_unit; /* device unit number */
|
||||
};
|
||||
|
||||
struct pci_match_conf32 {
|
||||
struct pcisel pc_sel; /* domain+bus+slot+function */
|
||||
char pd_name[PCI_MAXNAMELEN + 1]; /* device name */
|
||||
u_int32_t pd_unit; /* Unit number */
|
||||
u_int16_t pc_vendor; /* PCI Vendor ID */
|
||||
u_int16_t pc_device; /* PCI Device ID */
|
||||
u_int8_t pc_class; /* PCI class */
|
||||
u_int32_t flags; /* Matching expression */
|
||||
};
|
||||
|
||||
struct pci_conf_io32 {
|
||||
u_int32_t pat_buf_len; /* pattern buffer length */
|
||||
u_int32_t num_patterns; /* number of patterns */
|
||||
caddr_t32 patterns; /* struct pci_match_conf ptr */
|
||||
u_int32_t match_buf_len; /* match buffer length */
|
||||
u_int32_t num_matches; /* number of matches returned */
|
||||
caddr_t32 matches; /* struct pci_conf ptr */
|
||||
u_int32_t offset; /* offset into device list */
|
||||
u_int32_t generation; /* device list generation */
|
||||
u_int32_t status; /* request status */
|
||||
};
|
||||
|
||||
#define CDIOREADTOCENTRYS_32 _IOWR('c', 5, struct ioc_read_toc_entry32)
|
||||
#define CDIOREADTOCHEADER_32 _IOR('c', 4, struct ioc_toc_header32)
|
||||
#define MDIOCATTACH_32 _IOC(IOC_INOUT, 'm', 0, sizeof(struct md_ioctl32) + 4)
|
||||
@ -82,5 +121,6 @@ struct mem_range_op32
|
||||
#define FIODGNAME_32 _IOW('f', 120, struct fiodgname_arg32)
|
||||
#define MEMRANGE_GET32 _IOWR('m', 50, struct mem_range_op32)
|
||||
#define MEMRANGE_SET32 _IOW('m', 51, struct mem_range_op32)
|
||||
#define PCIOCGETCONF_32 _IOWR('p', 5, struct pci_conf_io32)
|
||||
|
||||
#endif /* _COMPAT_FREEBSD32_IOCTL_H_ */
|
||||
|
Loading…
x
Reference in New Issue
Block a user