pci.4 (85ae35ef37c07c32d4e923435b637cbf0df3e8a3) | pci.4 (7e14be0b0717105f4b3b8c62df82a1e883d8ebb6) |
---|---|
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 --- 10 unchanged lines hidden (view full) --- 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$ 26.\" | 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 --- 10 unchanged lines hidden (view full) --- 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$ 26.\" |
27.Dd July 27, 2021 | 27.Dd August 13, 2021 |
28.Dt PCI 4 29.Os 30.Sh NAME 31.Nm pci 32.Nd generic PCI/PCIe bus driver 33.Sh SYNOPSIS 34To compile the PCI bus driver into the kernel, 35place the following line in your --- 389 unchanged lines hidden (view full) --- 425Without the flag, read-only mapping is established. 426Note that it is common for the device registers to have side-effects 427even on reads. 428.It PCIIO_BAR_MMAP_ACTIVATE 429(Unimplemented) If the BAR is not activated, activate it in the course 430of mapping. 431Currently attempt to mmap an inactive BAR results in error. 432.El | 28.Dt PCI 4 29.Os 30.Sh NAME 31.Nm pci 32.Nd generic PCI/PCIe bus driver 33.Sh SYNOPSIS 34To compile the PCI bus driver into the kernel, 35place the following line in your --- 389 unchanged lines hidden (view full) --- 425Without the flag, read-only mapping is established. 426Note that it is common for the device registers to have side-effects 427even on reads. 428.It PCIIO_BAR_MMAP_ACTIVATE 429(Unimplemented) If the BAR is not activated, activate it in the course 430of mapping. 431Currently attempt to mmap an inactive BAR results in error. 432.El |
433.It PCIOCBARIO 434This 435.Xr ioctl 2 436command allows users to read from and write to BARs. 437The I/O request parameters are passed in a 438.Va struct pci_bar_ioreq 439structure, which has the following fields: 440.Bl -tag 441.It Vt struct pcisel pbi_sel 442Describes the device to operate on. 443.It Vt int pbi_op 444The operation to perform. 445Currently supported values are 446.Dv PCIBARIO_READ 447and 448.Dv PCIBARIO_WRITE . 449.It Vt uint32_t pbi_bar 450The index of the BAR on which to operate. 451.It Vt uint32_t pbi_offset 452The offset into the BAR at which to operate. 453.It Vt uint32_t pbi_width 454The size, in bytes, of the I/O operation. 4551-byte, 2-byte, 4-byte and 8-byte perations are supported. 456.It Vt uint32_t pbi_value 457For reads, the value is returned in this field. 458For writes, the caller specifies the value to be written in this field. 459.Pp 460Note that this operation maps and unmaps the corresponding resource and 461so is relatively expensive for memory BARs. 462The 463.Va PCIOCBARMMAP 464.Xr ioctl 2 465can be used to create a persistent userspace mapping for such BARs instead. |
|
433.El | 466.El |
467.El |
|
434.Sh LOADER TUNABLES 435Tunables can be set at the 436.Xr loader 8 437prompt before booting the kernel, or stored in 438.Xr loader.conf 5 . 439The current value of these tunables can be examined at runtime via 440.Xr sysctl 8 441nodes of the same name. --- 234 unchanged lines hidden --- | 468.Sh LOADER TUNABLES 469Tunables can be set at the 470.Xr loader 8 471prompt before booting the kernel, or stored in 472.Xr loader.conf 5 . 473The current value of these tunables can be examined at runtime via 474.Xr sysctl 8 475nodes of the same name. --- 234 unchanged lines hidden --- |