Deleted Added
full compact
pci.4 (119893) pci.4 (131530)
1.\"
2.\" Copyright (c) 1999 Kenneth D. Merry.
3.\" All rights reserved.
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
8.\" 1. Redistributions of source code must retain the above copyright

--- 8 unchanged lines hidden (view full) ---

17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23.\" SUCH DAMAGE.
24.\"
1.\"
2.\" Copyright (c) 1999 Kenneth D. Merry.
3.\" All rights reserved.
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
8.\" 1. Redistributions of source code must retain the above copyright

--- 8 unchanged lines hidden (view full) ---

17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23.\" SUCH DAMAGE.
24.\"
25.\" $FreeBSD: head/share/man/man4/pci.4 119893 2003-09-08 19:57:22Z ru $
25.\" $FreeBSD: head/share/man/man4/pci.4 131530 2004-07-03 18:29:24Z ru $
26.\"
27.Dd October 24, 1999
28.Dt PCI 4
29.Os
30.Sh NAME
31.Nm pci
32.Nd generic PCI driver
33.Sh SYNOPSIS

--- 42 unchanged lines hidden (view full) ---

76.Xr ioctl 2
77takes a
78.Va pci_conf_io
79structure.
80It allows the user to retrieve information on all
81.Tn PCI
82devices in the system, or on
83.Tn PCI
26.\"
27.Dd October 24, 1999
28.Dt PCI 4
29.Os
30.Sh NAME
31.Nm pci
32.Nd generic PCI driver
33.Sh SYNOPSIS

--- 42 unchanged lines hidden (view full) ---

76.Xr ioctl 2
77takes a
78.Va pci_conf_io
79structure.
80It allows the user to retrieve information on all
81.Tn PCI
82devices in the system, or on
83.Tn PCI
84devices matching patterns supplied by the user. The call may set
84devices matching patterns supplied by the user.
85The call may set
85.Va errno
86to any value specified in either
87.Xr copyin 9
88or
89.Xr copyout 9 .
90The
91.Va pci_conf_io
92structure consists of a number of fields:
93.Bl -tag -width match_buf_len
94.It pat_buf_len
95The length, in bytes, of the buffer filled with user-supplied patterns.
96.It num_patterns
97The number of user-supplied patterns.
98.It patterns
99Pointer to a buffer filled with user-supplied patterns.
100.Va patterns
101is a pointer to
102.Va num_patterns
103.Va pci_match_conf
86.Va errno
87to any value specified in either
88.Xr copyin 9
89or
90.Xr copyout 9 .
91The
92.Va pci_conf_io
93structure consists of a number of fields:
94.Bl -tag -width match_buf_len
95.It pat_buf_len
96The length, in bytes, of the buffer filled with user-supplied patterns.
97.It num_patterns
98The number of user-supplied patterns.
99.It patterns
100Pointer to a buffer filled with user-supplied patterns.
101.Va patterns
102is a pointer to
103.Va num_patterns
104.Va pci_match_conf
104structures. The
105structures.
106The
105.Va pci_match_conf
106structure consists of the following elements:
107.Bl -tag -width pd_vendor
108.It pc_sel
109.Tn PCI
110bus, slot and function.
111.It pd_name
112.Tn PCI

--- 129 unchanged lines hidden (view full) ---

242.El
243.It PCIOCREAD
244This
245.Xr ioctl 2
246reads the
247.Tn PCI
248configuration registers specified by the passed-in
249.Va pci_io
107.Va pci_match_conf
108structure consists of the following elements:
109.Bl -tag -width pd_vendor
110.It pc_sel
111.Tn PCI
112bus, slot and function.
113.It pd_name
114.Tn PCI

--- 129 unchanged lines hidden (view full) ---

244.El
245.It PCIOCREAD
246This
247.Xr ioctl 2
248reads the
249.Tn PCI
250configuration registers specified by the passed-in
251.Va pci_io
250structure. The
252structure.
253The
251.Va pci_io
252structure consists of the following fields:
253.Bl -tag -width pi_width
254.It pi_sel
255A
256.Va pcisel
257structure which specifies the bus, slot and function the user would like to
254.Va pci_io
255structure consists of the following fields:
256.Bl -tag -width pi_width
257.It pi_sel
258A
259.Va pcisel
260structure which specifies the bus, slot and function the user would like to
258query. If the specific bus is not found, errno will be set to ENODEV and -1 returned from the ioctl.
261query.
262If the specific bus is not found, errno will be set to ENODEV and -1 returned from the ioctl.
259.It pi_reg
260The
261.Tn PCI
262configuration register the user would like to access.
263.It pi_width
264The width, in bytes, of the data the user would like to read.
265This value
263.It pi_reg
264The
265.Tn PCI
266configuration register the user would like to access.
267.It pi_width
268The width, in bytes, of the data the user would like to read.
269This value
266may be either 1, 2, or 4. 3-byte reads and reads larger than 4 bytes are
267not supported. If an invalid width is passed, errno will be set to EINVAL.
270may be either 1, 2, or 4.
2713-byte reads and reads larger than 4 bytes are
272not supported.
273If an invalid width is passed, errno will be set to EINVAL.
268.It pi_data
269The data returned by the kernel.
270.El
271.It PCIOCWRITE
272This
273.Xr ioctl 2
274allows users to write to the
275.Tn PCI
276specified in the passed-in
277.Va pci_io
274.It pi_data
275The data returned by the kernel.
276.El
277.It PCIOCWRITE
278This
279.Xr ioctl 2
280allows users to write to the
281.Tn PCI
282specified in the passed-in
283.Va pci_io
278structure. The
284structure.
285The
279.Va pci_io
280structure is described above.
281The limitations on data width described for
282reading registers, above, also apply to writing
283.Tn PCI
284configuration registers.
285.El
286.Sh FILES

--- 32 unchanged lines hidden ---
286.Va pci_io
287structure is described above.
288The limitations on data width described for
289reading registers, above, also apply to writing
290.Tn PCI
291configuration registers.
292.El
293.Sh FILES

--- 32 unchanged lines hidden ---