Page MenuHomeFreeBSD

D49195.diff
No OneTemporary

D49195.diff

diff --git a/share/man/man4/pci.4 b/share/man/man4/pci.4
--- a/share/man/man4/pci.4
+++ b/share/man/man4/pci.4
@@ -22,7 +22,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd October 4, 2022
+.Dd March 1, 2025
.Dt PCI 4
.Os
.Sh NAME
@@ -624,7 +624,12 @@
Mapping of IRQ values to platform interrupt sources is machine dependent.
.El
.Sh DEVICE WIRING
-You can wire the device unit at a given location with device.hints.
+You can wire the device unit at a given location with
+.Xr device.hints 5 .
+.Ss BSF Based Wiring
+Devices may be wired to a Bus / Slot / Function (BSF) address.
+This is the form reported by
+.Xr pciconf 8
Entries of the form
.Va hints.<name>.<unit>.at="pci<B>:<S>:<F>"
or
@@ -639,7 +644,7 @@
The domain
.Pq or segment
of the PCI device in decimal.
-Defaults to 0 if unspecified
+Defaults to 0 if unspecified.
.It <B>
The bus address of the PCI device in decimal.
.It <S>
@@ -660,15 +665,18 @@
.Ss Examples
Given the following lines in
.Pa /boot/device.hints :
-.Cd hint.nvme.3.at="pci6:0:0"
-.Cd hint.igb.8.at="pci14:0:0"
+.Bd -literal
+hint.nvme.3.at="pci6:0:0"
+hint.igb.8.at="pci14:0:0"
+.Ed
+.Pp
If there is a device that supports
.Xr igb 4
at PCI bus 14 slot 0 function 0,
then it will be assigned igb8 for probe and attach.
Likewise, if there is an
.Xr nvme 4
-card at PCI bus 6 slot 0 function 0,
+device at PCI bus 6 slot 0 function 0,
then it will be assigned nvme3 for probe and attach.
If another type of card is in either of these locations, the name and
unit of that card will be the default names and will be unaffected by
@@ -676,6 +684,33 @@
If other igb or nvme cards are located elsewhere, they will be
assigned their unit numbers sequentially, skipping the unit numbers
that have 'at' hints.
+.Ss Location Based Wiring
+While simple to locate where to place a device for BSF wiring, the
+bus number of that is not invariant.
+Any number of changes to the devices within the system can cause
+this value to vary from boot to boot.
+The UEFI Standard defines a device path that's based only on the invariant parts
+of the address: The root complex (domain), the slot number and the function.
+These paths are hard to construct by hand, please see
+.Xr devctl 8
+.Sq Cm getpath
+command with a
+.Sq Ar UEFI
+locator.
+The above example could also be expressed as
+.Bd -literal
+hint.nvme.3.at="PciRoot(0x2)/Pci(0x1,0x3)/Pci(0x0,0x0)/Pci(0x0,0x0)/Pci(0x0,0x0)"
+hint.nvme.8.at="PciRoot(0x1)/Pci(0x2,0x2)/Pci(0x0,0x0)/Pci(0x0,0x0)"
+.Ed
+.Pp
+The advantage of this notation is that you can specify the exact location a
+device will be at.
+For deployments of multiple systems with the same configuration, this can be
+helpful in managing the devices.
+However, even slight variation in motherboards can cause the path to change
+substantially.
+It is also less natural to think of the UEFI Device Paths since little else
+will report it.
.Sh FILES
.Bl -tag -width /dev/pci -compact
.It Pa /dev/pci
@@ -684,6 +719,7 @@
driver.
.El
.Sh SEE ALSO
+.Xr device.hints 5
.Xr pciconf 8
.Sh HISTORY
The

File Metadata

Mime Type
text/plain
Expires
Sat, Apr 11, 6:41 PM (19 h, 50 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31302210
Default Alt Text
D49195.diff (3 KB)

Event Timeline