blob: 4d9e1cc8a08c921bd22e95436ed004297ab5f2f9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
#ifndef _PCI_IOCTL_H
#define _PCI_IOCTL_H 1
#include <sys/ioccom.h>
struct pcisel {
u_char pc_bus; /* bus number */
u_char pc_dev; /* device on this bus */
u_char pc_func; /* function on this device */
};
struct pci_conf {
struct pcisel pc_sel; /* bus+slot+function */
u_char pc_hdr; /* PCI header type */
pcidi_t pc_devid; /* device ID */
pcidi_t pc_subid; /* subvendor ID */
u_int32_t pc_class; /* device class */
};
struct pci_conf_io {
size_t pci_len; /* length of buffer */
struct pci_conf *pci_buf; /* buffer */
};
struct pci_io {
struct pcisel pi_sel; /* device to operate on */
int pi_reg; /* configuration register to examine */
int pi_width; /* width (in bytes) of read or write */
u_int32_t pi_data; /* data to write or result of read */
};
#define PCIOCGETCONF _IOWR('p', 1, struct pci_conf_io)
#define PCIOCREAD _IOWR('p', 2, struct pci_io)
#define PCIOCWRITE _IOWR('p', 3, struct pci_io)
#endif /* _PCI_IOCTL_H */
|