This source file includes following definitions.
- PCI_GETCONF_LAST_DEVICE
- PCI_GETCONF_LIST_CHANGED
- PCI_GETCONF_MORE_DEVS
- PCI_GETCONF_ERROR
- pci_getconf_status
- PCI_GETCONF_NO_MATCH
- PCI_GETCONF_MATCH_BUS
- PCI_GETCONF_MATCH_DEV
- PCI_GETCONF_MATCH_FUNC
- PCI_GETCONF_MATCH_NAME
- PCI_GETCONF_MATCH_UNIT
- PCI_GETCONF_MATCH_VENDOR
- PCI_GETCONF_MATCH_DEVICE
- PCI_GETCONF_MATCH_CLASS
- pci_getconf_flags
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 #ifndef _SYS_PCIIO_H_
34 #define _SYS_PCIIO_H_
35
36 #include <sys/ioccom.h>
37
38 #define PCI_MAXNAMELEN 16
39
40 typedef enum {
41 PCI_GETCONF_LAST_DEVICE,
42 PCI_GETCONF_LIST_CHANGED,
43 PCI_GETCONF_MORE_DEVS,
44 PCI_GETCONF_ERROR
45 } pci_getconf_status;
46
47 typedef enum {
48 PCI_GETCONF_NO_MATCH = 0x00,
49 PCI_GETCONF_MATCH_BUS = 0x01,
50 PCI_GETCONF_MATCH_DEV = 0x02,
51 PCI_GETCONF_MATCH_FUNC = 0x04,
52 PCI_GETCONF_MATCH_NAME = 0x08,
53 PCI_GETCONF_MATCH_UNIT = 0x10,
54 PCI_GETCONF_MATCH_VENDOR = 0x20,
55 PCI_GETCONF_MATCH_DEVICE = 0x40,
56 PCI_GETCONF_MATCH_CLASS = 0x80
57 } pci_getconf_flags;
58
59 struct pcisel {
60 u_int8_t pc_bus;
61 u_int8_t pc_dev;
62 u_int8_t pc_func;
63 };
64
65 struct pci_conf {
66 struct pcisel pc_sel;
67 u_int8_t pc_hdr;
68 u_int16_t pc_subvendor;
69 u_int16_t pc_subdevice;
70
71 u_int16_t pc_vendor;
72 u_int16_t pc_device;
73
74 u_int8_t pc_class;
75 u_int8_t pc_subclass;
76 u_int8_t pc_progif;
77 u_int8_t pc_revid;
78 char pd_name[PCI_MAXNAMELEN + 1];
79 u_long pd_unit;
80 };
81
82 struct pci_match_conf {
83 struct pcisel pc_sel;
84 char pd_name[PCI_MAXNAMELEN + 1];
85 u_long pd_unit;
86 u_int16_t pc_vendor;
87 u_int16_t pc_device;
88 u_int8_t pc_class;
89 pci_getconf_flags flags;
90 };
91
92 struct pci_conf_io {
93 u_int32_t pat_buf_len;
94 u_int32_t num_patterns;
95 struct pci_match_conf *patterns;
96 u_int32_t match_buf_len;
97 u_int32_t num_matches;
98 struct pci_conf *matches;
99 u_int32_t offset;
100 u_int32_t generation;
101 pci_getconf_status status;
102 };
103
104 struct pci_io {
105 struct pcisel pi_sel;
106 int pi_reg;
107 int pi_width;
108 u_int32_t pi_data;
109 };
110
111
112 #define PCIOCGETCONF _IOWR('p', 1, struct pci_conf_io)
113 #define PCIOCREAD _IOWR('p', 2, struct pci_io)
114 #define PCIOCWRITE _IOWR('p', 3, struct pci_io)
115 #define PCIOCATTACHED _IOWR('p', 4, struct pci_io)
116
117 #endif